Re: HIDE WHEN NOT LOGGED IN

HIDE WHEN NOT LOGGED IN

Luxurymrkt
Globetrotter
769 2 163

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
1299 228 266

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
11708 2294 2476

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 & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

ZestardTech
Shopify Partner
6144 1097 1474

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 Partner
1972 564 568

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

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now