HIDE WHEN NOT LOGGED IN

HIDE WHEN NOT LOGGED IN

Luxurymrkt
Navigator
615 2 107

HI,

I'd like to hide the circled items when a customer is not logged into the site.

my site is luxurymrkt.com/products/gucci-womens-platform-sandal?pr_prod_strat=collection_fallback&pr_rec_id=0d4...

Luxurymrkt_0-1718918134572.png

LOGGED IN.png

 

Thank You | mike
Replies 4 (4)

AnneLuo
Shopify Partner
718 139 145

You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the theme.liquid file and add the following code above the </head> tag

{% unless customer %}
.product-block--price .product__price-savings,
.product-block a:first-child,
.grid-product__price .grid-product__price--savings {
   display: none !important;
}
{% endunless %}


Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me   

Buy Me A Coffee

Dan-From-Ryviu
Shopify Partner
8382 1650 1661

Hi @Luxurymrkt 

You can do that by adding this code to theme.liquid file after <head>

{% if customer %}
<style>
.grid-product__price--savings,
.product-single__meta .product__price-savings,
.product-single__meta .product-block--price + .product-block { display: none !important; }
</style>
{% endif %}

 

- Helpful? Like and Accept solution to let me know or Buy me Coffee ❤️!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.

ZestardTech
Shopify Expert
5624 1024 1352

Hi @Luxurymrkt 

 

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find layout > theme.liquid and paste this at the bottom of the file:
 

 

 

{% unless customer %}
  <style>
  .product__price-savings {
    display: none!important;
}
.product-single__meta .product-block--price + .product-block {
    display: none!important;
}
.grid-product__price--savings {
    display: none!important;
}
  </style>
{% endunless %}

 

 

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing

BSSCommerce-B2B
Shopify Expert
551 110 133

Hi @Luxurymrkt 

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file theme.css. Add the following CSS snippet

[data-product-blocks]:has(.notAuthorizedBoxText) [data-save-price], .product-block:has(.notAuthorizedBoxText)+.product-block {
    display: none !important;
}

Result

BSSCommerceB2B_0-1718954313928.png

If it helps you, please like and mark it as the solution.

Best Regards

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


B2B Solution & Custom Pricing |BSS: B2B Portal, Quote, Net 30 | BSS: B2B Login Lock Hide Price


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency