Tag Archives: Add To Cart

Magento 2 Hide Price

Basically we have to override class ‘Magento\Catalog\Pricing\Render\FinalPriceBox ‘ to achieve this. Here I am creating an extension ‘PHPCodez_Hideprice’ that will allow you to hide price from certain user groups and diaplay a text inplace of price.

1) Declare a module

<?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="PHPCodez_Hideprice" setup_version="0.0.1" />
</config>

2) Register a module. Continue reading Magento 2 Hide Price

Magento 2 Disable Add To Cart Customer Group

I am creating an extension that will allow you to hide/disable add to cart button for certain customer groups.

1) Declare a module.

<?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="PHPCodez_Disableaddtocart" setup_version="0.0.1" />
</config>

2) Register a module. Continue reading Magento 2 Disable Add To Cart Customer Group