Author: IntegerByte

Magento 2 – Cannot find field “newsletter_enabled” on type StoreConfig pwa-studio

“Cannot query field “newsletter_enabled” someone face this kind of issue when setup PWA with magento. Error :- Error: Cannot query field “newsletter_enabled” on type “StoreConfig”. (… 1 errors total) at /var/www/vhosts/mysite.com/htdocs/pwa-studio/node_modules/@magento/pwa-buildpack/lib/Utilities/graphQL.js:54:21 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async module.exports (/var/www/vhosts/mysite.com/htdocs/pwa-studio/webpack.config.js:62:29) Solution:- Run the below command in Magento root which is defined in the .env file of the […]

Magento 2 get Helper function in XML

Create a dynamic link in the customer account. Here you make the dynamic link as per your logic. 1) Define helper class {vendor}\{Module}\Helper\Data in navigation link <?xml version=”1.0″?> <page xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_configuration.xsd”> <body> <referenceBlock name=”customer_account_navigation”> <block class=”Magento\Customer\Block\Account\SortLinkInterface” name=”customer-account-navigation-new-product-link” after=”-“> <arguments> <argument name=”label” xsi:type=”string”>Some link</argument> <argument name=”path” xsi:type=”helper” helper=”{Vendor}\{Module}\Helper\Data::getLink”></argument> </arguments> </block> </referenceBlock> </body> </page> 2) Now create […]

Back To Top