Magento 2.x – how to force redirect to controller on observer
In this tutorial i am going to show you how to redirect a user to any particular controller. This was made on an observer, but could be po..
Magento 2.x – Rest APIs – Fix The consumer isn’t authorized to access %resources.
If you face the following message when you try to access to the Magento Rest API, it is because you do not have the authorization to acces..
Magento 2.x – how to set and get with a custom customer attribute programmatically
If you added an EAV attribute for your customer, and you now need to set it in a piece of code, the following snippet will be helpfull for..
How to map an image on different locations
If you need to locate where a user clicked over an image, in order to proceed with something according the placed clicked, you can use thi..
Magento 2.x – How to lock and unlock customers programatically
If you want to lock a customer programatically, you can perform the following steps.
- You can Lock it directly over the database chang..
Magento 2.3.x – Fix “Stock item was unable to be saved” when save products on admin
If you are getting the following error message, when trying to save an existing product, or creating a new one:
you have to do the..
Magento 2.3x – Configure declarative schema
Before Magento 2.3, every developer needs to write PHP scripts like InstallData / UpgradeData / Recurring, to interact with database, whic..
Magento 2.x – Using Confirmation and Alert Jquery Widget popups
In some cases you will need to show a confirmation modal popup, or an alert. To make it Magento way, i will show you some pretty usefull j..
Magento 2.x – How to create a frontend modal popup from scratch
A Modal Window helps with this by making the whole page darker and highlighting the modal window in the center.
You can perform the fol..
Magento 2.x – How to override a template file in a module
If you are creating a new module, where you want to override an existing and used template, you can perform the following and easy step: