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 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

Google Ads Conversion Tracking Through Magento Platform:

Spread the love Google Ads Conversion Tracking Through

Object Pool Pattern in Magento2

Spread the love What is Object Pool Pattern in Magento 2 An

JENKINS

Spread the love JENKINS Introduction and Installation

Virtual Type and Type

Spread the love Virtual type is one of the most common

Customize the length of Input field

Spread the love Sometimes we need to change the limit the

How to Add Custom Tab on Admin Dashboard and Count Website Total Visitor in Magento 2?

Spread the love In this blog we’ll see How to Add Custom

bluethinkinc Blogs