Hide Prices for Not logged in user for specific categories

Blog
Spread the love

Magento has an out of box feature to hide price in Adobe Commerce version (Enterprise Edition). Navigate to Catalog > Categories. Open the desired category. Scroll down to reveal the “Category Permissions” tab like below screenshot.

extention_2023

Create permission rule following below steps:

Step1: Click on the New Permissions Button, permissions option fields look like below screenshot.

extention_2023

Step2: Select the Customer Group, Browsing Category, Display Product Prices and Add To cart according to the requirement.

extention_2023

Step3: Last step, save the configuration and flush full-page cache.

The price will hide and denied add to cart for guest user as per set the rule.

Community Edition:

We need to do some customization on code level to achieve this task in community edition.

Step1: create store configuration to configure category id for those need to hide price.

extention_2023

Step2: Override the function: Magento\Catalog\Pricing\Render\FinalPriceBox:: wrapResult($html)

Step2.1: create Bluethink/Catalog/etc/di.xml

Step2.2: create file Bluethink\Catalog\Pricing\Render\FinalPriceBox.php

Step3: Run the below commands

sudo php bin/magento s:d:c

sudo php bin/magento c:f

Vikas Mishra

Vikas Mishra

2024-01-10

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

Customize lead qualification for a seamless experience

Spread the love When the 2024 Release Wave 2 was launched,

Create a Custom Console Command in Spryker

Spread the love In Spryker, developers can create custom

SALESFORCE

Spread the love Salesforce is a cloud-based software

CRUD Operation in Spryker Backoffice with a Custom Module

Spread the love Spryker is a highly flexible and modular

How to create custom module on Spryker for Backoffice?

Spread the love Creating a custom module in Spryker

How to Install Spryker Project with Docker on Local Machine

Spread the love Spryker is a flexible and scalable commerce

How to Add a Custom Tab to the Customer Order Detail Page in Magento 2

Spread the love Adding a custom tab to the Order Detail

Exception Handling in Java

Spread the love Introduction – Exception:An unwanted

How to add custom less file in Magento2

Spread the love Source files *.css included into layout

Spring Boot Microservices

Spread the love Microservices architecture has become

bluethinkinc Blogs