Wednesday , February 21 2024
Home > Magezon Extensions > Other Extensions > How to Hide Product Price From Logged-in Customers in Magento 2

How to Hide Product Price From Logged-in Customers in Magento 2

magento 2 hide price if not logged in

Although price is the thing that customers are most concerned about before making a purchase, it doesn’t mean that showing price is always advantageous.

In some cases, you want to offer a special deal for potential customers such as wholesalers or retailers, and have different policies for other groups like guests. Therefore, hiding the price will make your business strategy more flexible in accordance to your purposes.

If you’re also implementing this kind of strategy, the article is for you. We’ll clarify the question “Magento 2 hide price if not logged in” in this tutorial. Let’s explore and learn how to do it with Magento 2 Hide Price extension!

I. Why do you need to hide price from not logged in customers?

Before going into details, you should know some vital reasons why you need to hide price from logged in customers.

1. Increase customers engagement

First, hiding price helps to increase customers’ engagement for your online store. Without price, not logged in customers are motivated to login or register to get product information.

Through registration, store owners not only get closer to customers but also easily collect customers information such as name, phone number, age, and email. Obtaining their databases will be better for customer segmentation. Therefore, admins can provide suitable service for each group effectively and appropriately.

2. Build flexible price policy

In fact, each customer group will receive a different price policy based on their repeat purchase behaviour. For example, wholesalers and retailers often buy a huge number of products so they will be prioritized compared to another group like guests. Therefore, by hiding price, store owners can flexibly build various price policies applying to different groups. 

II. How to Hide Product Price From Logged-in Customers – Make it active with Magezon Hide Price Extension

Below is the detailed instruction we would like to provide for you. Let’s get going! 

From the admin panel, navigate to the Magezon >> Hide Price >> Manage Rules

Then click on the Add New Rule button near the right corner to create a new one.

add a new rule

First, go to configure the General Info of the rule.

hide price rule info
  • Enable: Turn on this button to enable the rule.
  • Rule Label: Enter a title for the rule.
  • Select Type: There are 4 action types for you to select. In this tutorial, select the Login to see type. It means that when not logged in users want to see the price of your selected product, they have to register or login.
  • Store view: Select specific store views that you want to apply the rule to.
  • Customer Groups: This tutorial targets to not logged in customers, so in this field, choose NOT LOGGED IN option. 
  • From-To: Set active time for the rule.
  • Priority: Enter a value to determine the priority for it compared to other rules. The rule with lower value will be applied first. 
  • Hide Add to Wish List: Turn on/off this button to hide/show Add to Wish List on all pages.
  • Hide Add to Compare: Turn on/off the button to hide/show Add to Compare on all pages.

Next, move to modify another section that is Conditions.

When opening the Conditions section, you will see the sentence “If ALL of these conditions are TRUE”. This sentence offers 2 links – ALL and TRUE to edit:

  • Click the ALL link to choose ALL or ANY.
  • Click the TRUE link to choose TRUE or FALSE.
  • Leave the Conditions section blank if you want to apply this rule to all products.
open conditions section

Then, hit the plus icon to set new conditions based on Product Attribute

click on plus icon

In this article, we’ll choose Category attribute and choose Fitness Equipment category. It means that the price of all products belonging to the Fitness Equipment category will be hidden on all pages. 

add conditions

After that you can hit the Preview Products button to view all selected products:

preview products

After you’ve completed creating the rule, move to the Configuration section to customize the Button that replaces the price on the frontend.

customize button
  • Effect: Choose an effect for the button. Magento 2 Hide Price supports 4 types of effect. All you need to do is pick the one you like. Your selected effect will activate when hovering over the button.
  • Color: Set color for the rule label in this field. 
  • Hover color: Set hover color for the rule label. 

NOTE: Be noted that these colors are applied for all rule labels.

  • Background color: Customize background color for the button.  
  • Hover background color: Customize hover background color for the button.

NOTE: Also, these background colors are applied for all buttons.

  • Icon color: Set color for the icon. The icon will display when you hover over the button.
  • Preview Button: You can view the change of button right on the backend thanks to this field.
  • Custom style: In case you have CSS knowledge, you can customize the button in every way you want in this field.

After setting all sections above, on the frontend, the price will be hidden and replaced by a button along with the message that you’ve configured in the rule general info section.

The result on the Category page:

magento 2 hide price if not logged in - category page

The result on the Product page:

magento 2 hide price if not logged in - product page

Final words

Above is the detailed instruction on how to hide price for not logged in customers by Magento 2 Hide Price extension. Hope this tutorial is helpful for your business. Feel free to leave comments down below if you have any questions. 

Optimize Your Magento Store With Powerful Extensions

Looking for fast, efficient and well-coded extensions to build or optimize your Magento stores for sales boosting? Then visit Magezon website and grab necessary add-ons for yours today!

About Jen Tran

Jen Tran
Jen Tran works for Magezon as a marketer. She is responsible for writing blogs about Magento and Magezon extensions to help Magento users have a better understanding of it.

Check Also

The ultimate guide to using Magento 2 Login & Registration Page

Magento 2 Login & Registration Page Builder: All You Should Know

Sometimes, the default Magento 2 login and registration page doesn’t satisfy all your needs. You …

Leave a Reply