As e-commerce merchants sometimes we got called from customer to transfer their purchased downloadable products from one account to another account and unfortunately, there is no way to do this in native Magento. As Magento 2 developer we got the same requirements like one customer purchased a downloadable product from the Magento 2 website from their email ID and that customer no longer works with that company and their email ID also no more exist, so that company manager contact us to transfer that downloadable product link to another active customer account and we did in Magento directly updating the customer ID from the database.
Continue reading “Magento 2 Transfer Ordered Downloadable Product from One Customer to Another”Magento 2 How to Update Order Email ID
If you are looking for a way to update the order email ID, customer name and customer account link in Magento 2 directly from the database then this blog post will show you exactly this.
Continue reading “Magento 2 How to Update Order Email ID”Magento 2 Add JavaScript with Tag Attribute From Block File
If you are looking for a way to include JavaScirpt with a tag attribute from the block file in Magento 2 then this blog post shows you exactly what you are looking for. Sometimes the JavaScript link is different as per admin config values. Also, JavaScript has different data tag values as per admin config values, at that time, this is the best way to include JS from the Block file to the front end.
Continue reading “Magento 2 Add JavaScript with Tag Attribute From Block File”Magento 2 Update Product Attribute Values from Database
Magento 2 product attributes have many values, you can update them directly from the Database if you are having any difficulties updating from the admin.
Continue reading “Magento 2 Update Product Attribute Values from Database”Magento 2 Redirect Customer to Login Page if Not Logged In
Adobe Commerce provides a feature to restrict guest users’ access by enabling Website Restriction Mode. If users try to access any page without login then they will be redirected to the login page and asked to log in before accessing the website’s page.
Continue reading “Magento 2 Redirect Customer to Login Page if Not Logged In”How to Whitelist Inline Script for CSP | Content Security Policies
Content Security Policy is an extra layer of security to reduce attacks of Cross-Site Scripting. Magento supports CSP from Magento 2.3.5 version. Magento_Csp native module has logic in Magento to manage the CSP. In Magento, if you want to whitelist any script and style then you can easily do it by creating one file csp_whitelist.xml under your custom module’s \etc directory and then you can add any script and style to that file and that script and style which will be bypassed from CSP. Click here to check the csp_whitelist.xml sample file.
Continue reading “How to Whitelist Inline Script for CSP | Content Security Policies”Magento 2 Get Vault Payment Token from Order
If Magento 2 website has a feature to save credit cards for future use, then in reality, full credit card data is never saved to Magento database, but each payment gateway generates one token for the credit card and Magento saves that payment token.
Sometimes merchant wants to fetch that saved payment token with an order and pass that payment token to some ERP or somewhere else then you can get that payment token using order data.
Continue reading “Magento 2 Get Vault Payment Token from Order”How to Get Magento Quality Patch Files in .patch format
Patch (we can say diff) files are text files that contain the details of the file to be changed. Magento 2 quality patches has the new code which will be replaced with the old one to fix Magento 2 core module issues.
Continue reading “How to Get Magento Quality Patch Files in .patch format”Magneto 2 Disable Remote Shopping Assistance
Remote shopping assistance is a feature that allows the admin user to login as customer to fulfil the order. Before admin takes access to the customer login the user must have to provide permission by checking the checkbox “Allow remote shopping assistance” as shown in the following screenshot.
Continue reading “Magneto 2 Disable Remote Shopping Assistance”Create Custom Cron Job in Magento 2 Commerce Cloud
Adobe commerce cloud provides a feature to create a custom cron job by adding them to .magento.app.yaml file. You can execute any command by adding it to .magento.app.yaml file.
Continue reading “Create Custom Cron Job in Magento 2 Commerce Cloud”