Category: Magento

How to add custom select box in window.checkoutConfig on Checkout

Sometimes you need a custom variable add-in window.checkoutConfig dynamically and display on the checkout page according to requirement, follow steps to add custom select box in window.checkoutConfig on Checkout. Step 1 : Create di.xml file and add below code File : Vendor/Module/etc/frontend/di.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <type name=”Magento\Checkout\Model\DefaultConfigProvider”> <plugin name=”CustomCheckoutModelDefaultConfigProvider” type=”Vendor\Module\Plugin\Checkout\Model\DefaultConfigProvider” sortOrder=”100″/> </type> </config> […]

Request validation failed for action in Magento 2

Today in this post we will found a solution for Request validation failed for action issue in Magento. Sometime custom controller redirect to dashbord in magento admin panel There are below method to solve this kind of issue. Sulution 1. Add below in your claass use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Request\InvalidRequestException; and implements CsrfAwareActionInterface class […]

Magento 2 maintenance mode

Magento provides a maintenance mode, it’s used when taking database backup and others We can apply maintenance mode using command-line interface in this case connect SSH and go to Magento root dir. When uploading something on a live website then need to enable maintenance mode Maintenance mode enable command: bin/magento maintenance:enable Maintenance mode enable white […]

How to reset Customer Password from Database in Magento 2

Magento 2 update customer password using the database:- Run/execute below query in database SET @email=’[email protected]’, @passwd=’asd123′, @salt=MD5(RAND()); UPDATE customer_entity SET password_hash = CONCAT(SHA2(CONCAT(@salt, @passwd), 256), ‘:’, @salt, ‘:1’) WHERE email = @email; Magento 2 update admin password using database:- Run/execute below query in database SET @salt = MD5(UNIX_TIMESTAMP()); UPDATE admin_user SET password = CONCAT(SHA2(CONCAT(@salt, ‘admin@1234#’), […]

Add Recaptcha in Custom From Magento 2.4

This post is related to add Google Recaptcha to Custom Form in Magento 2.4.X Module Name: Integerbyte_MyRecaptcha Files List: app/code/Integerbyte/MyRecaptcha/registration.php app/code/Integerbyte/MyRecaptcha/etc/module.xml app/code/Integerbyte/MyRecaptcha/etc/adminhtml/system.xml app/code/Integerbyte/MyRecaptcha/etc/config.xml app/code/Integerbyte/MyRecaptcha/etc/frontend/routes.xml app/code/Integerbyte/MyRecaptcha/etc/frontend/events.xml app/code/Integerbyte/MyRecaptcha/Observer/RecapchaObserver.php app/code/Integerbyte/MyRecaptcha/Controller/Index/Index.php app/code/Integerbyte/MyRecaptcha/Controller/Index/Save.php app/code/Integerbyte/MyRecaptcha/view/frontend/layout/myrecaptcha_index_index.xml app/code/Integerbyte/MyRecaptcha/view/frontend/templates/form.phtml 1. Module Registarion file app/code/Integerbyte/MyRecaptcha/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, ‘Integerbyte_MyRecaptcha’, __DIR__ ); 2. Create module.xml file app/code/Integerbyte/MyRecaptcha/etc/module.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Module/etc/module.xsd”> <module name=”Integerbyte_MyRecaptcha” setup_version=”1.0.0″> </module> […]

Open popup on grid row click in Magento 2

When you need to open popup on grid button, Follow the steps given below to add a view button in the admin grid: 1. Add component in column in grid layout file and add js and class file path File path: app/code/IntegerByte/Popup/view/base/web/js/grid/columns/email.jsFile path : app/code/IntegerByte/Popup/Ui/Component/Listing/Column/Email.php <column name=”email” class=”IntegerByte\Popup\Ui\Component\Listing\Column\Email”> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item […]

Back To Top