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”

Magento 2 Disable Remote Shopping Assistance

The success of any online firm in the e-commerce industry depends on offering a smooth and safe buying experience. One of the most potent e-commerce platforms, Magento 2, provides a number of features to improve store functionality and client experience. Remote shopping assistance is one of these features.

Although the purpose of this technology is to provide live support to customers during their purchasing experience, some store owners may want to turn it off for security or better control reasons. We will walk you through the process of turning off Magento 2’s Remote Shopping Assistance in this blog post.

Continue reading “Magento 2 Disable Remote Shopping Assistance”

How to Update etc/env.php file in Adobe Commerce Cloud

The etc/env.php file differs for each environment, such as your local, staging, and production. That means you can not edit this file and push this file from your local setup to the cloud environment as this is ignored by Git. In some situations, you have to add some variables or edit values in the /app/etc/env.php file. If you are considering how to edit the env.php file in Magneto 2 commerce cloud or Adobe commerce cloud then this blog post by Dhairvi Solutions is for you.

Continue reading “How to Update etc/env.php file in Adobe Commerce Cloud”

Warning: file_put_contents in plugin-list.php and PluginListGenerator.php in Magento 2 while compiling

While you are running your Magento 2 website in XAMPP and you run “php bin/magento setup:di:compile” and you see the error in line number 412 in vendor/magento/framework/Interception/PluginListGenerator.php file then this blog post helps you to fix this issue in your localhost Magento setup.

Continue reading “Warning: file_put_contents in plugin-list.php and PluginListGenerator.php in Magento 2 while compiling”

Magento 2 Get Currency Symbol in JS File.

If you are looking to get the current currency symbol in Magento 2 JavaScript file and want a formatted price in Magento 2 JS file then this blog post is for you.

When you add the custom price somewhere on your Magento 2 quote, that price should be in the proper formats, like with a currency symbol, current store currency, and 2 decimal points. Magento provides Magenot_Catalog/js/price-utils JS file which does this for you.

Continue reading “Magento 2 Get Currency Symbol in JS File.”

Magento 2 bin/magento Missing

You’ve probably run into the problem of the bin/magento file being missing if you’re using Magento 2. Developers and business owners frequently encounter this issue, particularly following a new installation or upgrade. All CLI commands stop working because bin/magento is missing.

Your Magento 2 development can come to a complete stop if you encounter the annoying “bin/magento Missing” issue. As a firm that develops e-commerce websites, we know how important it is to find rapid and effective solutions for these kinds of problems. We’ll take you through the root causes of this issue and offer workable fixes in this extensive tutorial.

Continue reading “Magento 2 bin/magento Missing”
Privacy Policy © 2024-2026 Dhairvi Solutions LLP. All Rights Reserved.