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

Enhancing Productivity with Dynamics 365: The Power of Session Restore

Spread the love Enhancing Productivity with Dynamics 365:

Salesforce Admin

Spread the love In our last blog, we discussed common

Unlocking AI with Spring Boot: Real-World Use Cases and Solutions

Spread the love Artificial Intelligence (AI) has moved from

Enhancing Performance with Reactive Java: A Beginner-Friendly Guide

Spread the love In today’s fast-paced software

Integrating Azure Function with Dynamics 365

Spread the love Signup on azure portal and make sure to

How to Create a Power Apps Component Framework (PCF) with React

Spread the love If youʼve been looking to supercharge your

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

bluethinkinc Blogs