You can add a variable which contains the HTML in Magento 2 email templates. But you have to follow some format to allow HTML data in variables.
Continue reading “Magento 2 allow HTML in variables in email template”Magento 2 Get Inventory Source Code from Shipment
Magento offers MSI (Multi Souce Invetnory) features that allow adding multiple sources or locations for delivery. You have to choose the source of inventory at the time of shipment. Now if your requirement is to know which inventory source is selected for the existing shipment then you can do it and to know how to do it, keep reading 🙂
Continue reading “Magento 2 Get Inventory Source Code from Shipment”How to get auth.json keys in Adobe Commerce Cloud
When you cloned the Adobe Commerce Cloud project to your local system it does not contain the auth.json file with the public and private of repo.magento.com. These keys of Magento are required to validate your Adobe Commerce Cloud version and use it to install/upgrade Commerce Cloud native modules.
Continue reading “How to get auth.json keys in Adobe Commerce Cloud”Magento 2 Redirect to admin shipment view page
Generally, as Magento developers, we copy the redirect path from the browser URL, but it does not work for many admin URLs.
When you want to redirect to the shipment view page in the Magento 2 admin page, for that you copy the shipment controller path from the browser and set to redirect path but it’s redirecting to 404 even though the same path you used which shows in the browser of shipment view page. At this stage you might get stuck because all looks good then why it’s not redirecting to the shipment page in Magento 2 admin? Don’t worry we Dhairvi Solutions explain you what you should do and what you are doing wrong.
Magento 2 get product salable qty
If a Magento store has multi-source inventory (MSI) enabled and you want to get the total qty of all the stores which are available to purchase then it is called the salable qty. The salable qty is not the same as the actual qty when MSI is enabled so if you wanted to get the salable qty then this blog post will show you how to do this.
Continue reading “Magento 2 get product salable qty”Order fails event in Magento 2
There is an event observer in Magento which calls when a payment fails on your Magento 2 website. This Magento order fails observer helps developers when they want to take some action on order fails like sending an email to the customer that your order failed due to so on so reasons.
Below event fires when the order fails in Magento 2
sales_model_service_quote_submit_failureContinue reading “Order fails event in Magento 2”
Magento 2 add form key to Ajax URL
When you do an Ajax call in the admin for example adding some button to the system configuration page which calls some URL by Ajax then you have to insert the form key to that URL otherwise it will not call the controller successfully by Ajax.
Continue reading “Magento 2 add form key to Ajax URL”Magento 2 The Consumer isn’t Authorized to Access Resources
You get the consumer isn’t authorized to access resources in the REST API response. This issue is due the Magento version upgrade from Magento 2.3.x to Magento 2.4.5 and above. We also faced the same issue when we upgraded one of the out Adobe Commerce Cloud clients’ website from Magento 2.3.5 to Magento 2.4.5 like Magento website data stopped syncing with the ERP. If you are facing the same issue then this blog post has a solution to this REST API access problem.
Continue reading “Magento 2 The Consumer isn’t Authorized to Access Resources”Magento 2 The Update With the ID doesn’t Exist. Verify the ID and Try Again
The error message updated with the ID doesn’t exist when saving products from the admin side occurs when content staging is enabled in your Adobe Commerce or Magento 2 commerce cloud website.
Continue reading “Magento 2 The Update With the ID doesn’t Exist. Verify the ID and Try Again”Magento 2 display simple product image of configurable product in cart and mini cart
If you are looking for a way to display configurable product selected options images on the cart and mini cart page in Magento 2 then it can be done by changing one setting from the Magento 2 admin. Magento 2 by default provides a way to display simple product images of the configurable product on the cart and min cart page.
Continue reading “Magento 2 display simple product image of configurable product in cart and mini cart”