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

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

Implementation of WireMock for better testing

Spread the love WireMock is a flexible and powerful tool

Magento 2: How to selected default option in configurable options?

Spread the love Configurable products in Magento 2 allow

How To Implement Simple JWT Authentication in Django Rest Framework

Spread the love We’ll learn how to use simple JWT

Optimizing Search: Integrating Elasticsearch in Django Applications

Spread the love What is Elasticsearch? Elasticsearch is a

How to create Customer Segments

Spread the love In Magento 2, “customer

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

bluethinkinc Blogs