Section Source in Magento2

The section source class is responsible for retrieving data for the section. As a best practice, we recommend that you put your code within the Vendor/ModuleName/CustomerData namespace. Your classes must implement the Magento\Customer\CustomerData\SectionSourceInterface interface. The public method getSectionData must return an array with data for a private block. <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Customer:etc/sections.xsd”> <action name=”customer/account/editPost”> <section name=”*”/> </action> </config> Eg: <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Customer:etc/sections.xsd”>… Continue reading Section Source in Magento2

Published
Categorized as Magento

How to set and delete Magento Product special price using Rest API

Set products/special-price Add or update product’s special price. If any items will have invalid price, store id, sku or dates, they will be marked as failed and excluded from update list and \Magento\Catalog\Api\Data\PriceUpdateResultInterface[] with problem description will be returned. If there were no failed items during update empty array will be returned. If error occurred during the… Continue reading How to set and delete Magento Product special price using Rest API

How to use JSON web tokens with Node.js ?

JSON Web Token (JWT) is an Internet Standard that is used for exchanging data between two parties in a secure manner. It can’t be easily hacked as it creates a digital signature with the secret key along with the HMAC algorithm). JWT Structure: JSON Web Tokens consist of three parts separated by dots (xxxxx.yyyyy.zzzzz), which are: Header: This… Continue reading How to use JSON web tokens with Node.js ?

The Sequelize include option

The Sequelize include option is commonly added in a model finder method (findOne(), findAll(), etc.)This option is used to add a JOIN clause to the generated SQL query, enabling you to retrieve data from multiple tables with one query.For example, suppose you have two related SQL tables named Cities and Countries.Each Cities row stores the information of which country it belongs to with the CountryId column as… Continue reading The Sequelize include option

Change Payment Terms on Invoice Sourced from Sales Order Instead of Billing Schedule via CSV

When the Billing Schedule attached to a Sales Order has Payment Terms assigned, the Invoice created will follow the terms set on the Billing Schedule instead of the Sales Order, which populates from the Customer Record. If you want to change Invoices already created to use the terms from the Sales Order instead a search… Continue reading Change Payment Terms on Invoice Sourced from Sales Order Instead of Billing Schedule via CSV