Category: Technology

Magento 2 Redirect disabled product to other URL

Magento 2 Redirect Disabled Product To Other URL, You can achieve this functionality using override Magento\Cms\Controller\Noroute\Index controller Create di.xml filePath: app/code/VenderName/ModuleName/etc/di.xml <?xml version=”1.0″?> <config xmlns:xsi=”” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <preference for=”Magento\Cms\Controller\Noroute\Index” type=”VenderName\ModuleName\Rewrite\Controller\Noroute\Index” /> </config> Create Index.php filePath: app/code/VenderName/ModuleName/Rewrite/Controller/Noroute/Index.php <?php /** * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace VenderName\ModuleName\Rewrite\Controller\Noroute; […]

Magento 2 create category attribute using upgradeData

Today we discuss about the Magento 2 create category attribute using upgradeData using the script. We are creating a select box category attribute using the below steps. Increase the module version from 1.0.0 to 1.0.1 in module.xml filePath: app/code/Custom/CategoryAttribute/etc/module.xml <?xml version=”1.0″ ?> <config xmlns:xsi=”” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Module/etc/module.xsd”> <module name=”Custom_CategoryAttribute” setup_version=”1.0.1″> <sequence> <module name=”Magento_Catalog”/> </sequence> </module> </config> Create […]

Create category custom layout in Magento 2

Today we discuss to create a category custom layout in Magento2 Create layout.xml fine in your theme app/design/frontend/ABC/XYZ/Magento_Theme/layouts.xml <page_layouts xmlns:xsi=”” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/PageLayout/etc/layouts.xsd”> <layout id=”customlayout”> <label translate=”true”>Custom Layout Page</label> </layout> </page_layouts> Layout id = customlayout Create customlayout.xml file, Layout id name file name will same. app/design/frontend/ABC/XYZ/Magento_Theme/page_layout/customlayout.xml <?xml version=”1.0″?> <layout xmlns:xsi=”” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_layout.xsd”> <update handle=”empty”/> <referenceContainer name=”page.wrapper”> <container name=”header.container” […]

Access denied for user ‘phpmyadmin’@’localhost’ (using password: YES)

In this blog, we will see how to fix the error “Access denied for user ‘phpmyadmin’@’localhost’ (using password: YES)” following simple steps. Once you follow the below you will be able again to use your phpMyAdmin@localhost database. Below are the steps:- You have to open XAMPP Control Panel ->Click MySql Config->Click my.ini. It will open […]

Back To Top