Hiding prices from customers who are not logged in

Last updated

You can hide prices from visitors who are not logged in. Your catalog will be available to all visitors, but only registered customers can see prices and shop. This is particularly helpful if you want to keep wholesale pricing private.

See below the CSS codes for hiding the prices and Add to Bag and Buy Now buttons.

Before you get started, familiarize yourself with how to add the CSS codes to your store theme.

Here are the codes to hide prices and buttons from the customers who are not logged in.


/*Hide price in the catalog page*/
body.ecwid-customer-loggedOut .grid-product__price { 
     display: none; 
} 

/*Hide Buy Now buttons in the catalog page*/
body.ecwid-customer-loggedOut .grid-product__button.grid-product__buy-now {
    display: none;
}

/*Hide price in the product details page*/
body.ecwid-customer-loggedOut .details-product-price__value,
body.ecwid-customer-loggedOut .details-product-price-compare__container {
    display: none;
} 

/*Hide Add to Bag in the product details page*/ 
body.ecwid-customer-loggedOut .details-product-purchase__add-buttons {
    display: none;
} 
If you want to give discounts to customers from different groups, you can add them to groups and provide discounts using our article Store Memberships.

Related articles

Adding CSS codes to your store
Professional services from Ecwid
Themes for sitebuilders

Back to top
Has the article answered your question?

Awesome! Thanks for your feedback!

Please send us that question. We will be happy to help by email.

Send a message