Relative Content

Tag Archive for magentomagento2

Custom Magento form redirecting to homepage unless there is a breakpoint in Magento Generated client.js in Safari

I have an issue that has been confounding me. I recently upgraded Magento from 2.4.3 to 2.4.6. I have a custom form that since then has been redirecting to the home page rather than submitting, but only in Safari. I ruled out CSP issues, Form Key issues, and have no errors in the console. I discovered that if I put a breakpoint in the _save function in client.js (which is a file generated by Magento) the form operates correctly. This leads me to believe it is a timing issue, but since it is generated and handled by Magento I am not sure how to fix it.

Custom Magento form redirecting to homepage unless there is a breakpoint in Magento Generated client.js in Safari

I have an issue that has been confounding me. I recently upgraded Magento from 2.4.3 to 2.4.6. I have a custom form that since then has been redirecting to the home page rather than submitting, but only in Safari. I ruled out CSP issues, Form Key issues, and have no errors in the console. I discovered that if I put a breakpoint in the _save function in client.js (which is a file generated by Magento) the form operates correctly. This leads me to believe it is a timing issue, but since it is generated and handled by Magento I am not sure how to fix it.

Magento deprecated MagentoFrameworkAppActionAction

Magento 2.4 deprecates class MagentoFrameworkAppActionAction
and suggests using MagentoFrameworkAppActionInterface.
But what about dispatch() method?
I need to do some checks in controller (e.g. check config variable).
Can you give me some example of dispatch method in this case

Magento 2 UI Listing: show/hide grid columns based on condition

I am writing listing UI Component (local_comments_grid_listing.xml).
It has <dataSource> with <dataProvider class=”LocalCommentsUiComponentDataProviderListingDataProvider”>.
It works fine, but I need to hide column ‘visibility’ depends on current store mode (hide in single-store mode and show in multi-store mode).
I tried to implement ListingDataProvider::getMeta() method:

How to Customize the Magento 2 Checkout Page?

Customizing the Magento 2 checkout page can be achieved through various methods, including creating a custom module, modifying existing layout files, and using JavaScript mixins. Here’s a step-by-step guide to adding a custom step and custom fields to the checkout page.