Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi Everyone,
I have a website: https://www.scrapdivadesigns.com/ (published and Live)
I have two sides to my website. One is for normal customers with regular pricing, and another side where once an account with a wholesale tag is logged in, the website changes and shows only Wholesale products.
But my issue is that my regular customers can see my Wholesale products and prices if they use the search engine and the product recommends my Wholesale products to my regular customers.
I am well versed in coding, but I can't figure out how to exclude my Wholesale products.
Any suggestions would be very helpful, and thank you in advance!
Hi @A1i
Although we cannot access the theme's code, we would like to suggest a solution.
- To exclude wholesale products displayed in the recommendation section, you need to determine the section that renders all recommended products. Normally, it's in the file product-recommendations.liquid (theme Dawn), but I'm not sure about your theme.
- Search and then determine the line which runs a loop to render all products. For example {% for recommendation in recommendations.products %}
- The idea is to add your condition below this code to prevent product rendering. For example, exclude product with id 12345678 for the non-logged customers:
{% for recommendation in recommendations.products %}
{% if recommendation.id == 12345678 and customer %}<render product...>{% endif %}
- Do similar with search results:
I hope that it's useful for you.
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025