Hide Flat Rate When Free Shipping Is Active In Magento 2

Posted on Leave a commentPosted in Magento 2

Lets hide Flat Rate when free shipping method is active in magento 2. Assuming you know how to create a module in magento 2 we will just show you how to hide flat rate using plugin. app/code/Vendor/Cart/etc/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\OfflineShipping\Model\Carrier\Flatrate”> <plugin name=”disable-flatrate” type=”Vendor\Cart\Model\Carrier\Flatrate” sortOrder=”1″ /> </type> </config> app/code/Vendor/Cart/Model/Carrier/Flatrate.php <?php namespace DigitalAptech\Cart\Model\Carrier; […]

Add Custom menu collection in Magento 2

Posted on Leave a commentPosted in Magento 2

What do we do if we want to show our own menu collection than the traditional list of menu that comes from adding categories ? Simple just make Plugin for that. Assuming you all know how to declare your modules i will skip that part. app/code/Vendor/Menu/etc/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\Theme\Block\Html\Topmenu”> <plugin name=”catalogTopmenu” […]

How to add custom tabs in Product Page in Magento 2

Posted on Leave a commentPosted in Magento 2

In your theme add “catalog_product_view.xml” file path would be app/design/frontend/{{vendor}}/{{theme}}/Magento_Catalog/layout <?xml version=”1.0″?> <!– /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ –> <page layout=”1column” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_configuration.xsd”> <body> <referenceBlock name=”product.info.details”> <block class=”Magento\Catalog\Block\Product\View\Description” name=”product.use” as=”use” template=”product/view/use.phtml” group=”detailed_info”> <arguments> <argument translate=”true” name=”title” xsi:type=”string”>How to use</argument> <argument name=”sort_order” xsi:type=”string”>15</argument> </arguments> </block> […]