Month: July 2023
API call in Vue.js using a Suitelet external URL as the endpoint.
Saved search formula to display class of an item without displaying the parent class.
Select “Formula (Text)” field. Give formula as TRIM(REPLACE({class}, {parentclass} || ‘ :’, ”))
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
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
Varnish, Redis, and Memcached in Magento2
For Magento to perform well, you’ll need Redis and Varnish. Redis is a distributed key-value store that is used to cache information coming from the database Varnish is a reverse caching proxy that is used to cache entire pages Memcached, it performs the same role as Redis. Memcached is the predecessor of Redis and Redis… Continue reading Varnish, Redis, and Memcached in Magento2
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
Restricting the sales order creation based on the checkbox field in the customer record
Description Upon saving the sales order record, the script will verify whether the customer’s checkbox named “Disallow Create Order” is checked. If the checkbox is found to be checked, it will restrict the update or creation of the sales order each time on its save.