Duplicate orders with same Quote Id

This problem is so hard to detect a cause. This one #25222 is one of a cause to make multiple duplicated orders. And Amazon Pay as well, I can’t recall exactly.But generally, for somewhat reason is that the function Magento\Quote\Model\QuoteManagement::submitQuote is called on twice or even more. So my solution is to make a hook/plugin on the…

TinyMCE Can’t add tags into tag a

Issue is that I tried to add tag <span> and <i> to tag </a>, but it does not work. This is solution to resolve it. Issue link : https://github.com/magento/magento2/issues/4536 Magento 2.4, TinyCME 4.0 Fixing lib/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js.Function : getSettings, variable settings, add new config value : ‘valid_elements’: ‘*[*]’ `getSettings: function () {var settings,eventBus = this.eventBus; …`Then it works.

M2 – Uncaught TypeError: Cannot read property ‘items’ of undefined – /Magento_Checkout/js/model/totals.js

A bug story: I faced an issue on a checkout that the JS error happen when selecting a shipping method. I tried to check in some extension mixins javascript files but did not found anything wrong. When I check if it has an error in XHR ajax calls. Then I found https://x-x-x.com/rest/dk/V1/guest-carts/xxx–xxx/shipping-information Problem is: total…

Choose an event after making an order successfully

If you want to do something business right away a user placing an order, You can subscribe to an event checkout_submit_all_after. But If a user uses a Paypal Express, it does not help. For somewhat reason, a place order process of Paypal Express does not dispatch an event checkout_submit_all_after. So If you want to cover…

Customer data can’t be found in Local Storage of a browser

Link an issue: https://github.com/magento/magento2/issues/14912 I came across this issue on my customer website. I added a downloadable product ( which needs to be login to checkout), then I logged into, but when I clicked on the checkout button in cart sidebar, it gave me authentication popup. Due to customer data on Local Storage is not…

How to Magento-2 get a template file path

This way is how to Magento 2 find a template file path for a block. Example, a template defined in a layout file is FixBugs_Debug::panel/dashboard.pthml => Then a template file will be renderred is [Magento Root]/app/code/FixBugs/Debug/view/frontend/templates/panel/dashboard.phtml