How to prevent customers access to a collection or product in Shopify without app

Sell Online With Shopify
Trusted by millions of businesses worldwide
Sign up for a free trial and enjoy 3 months of Shopify for $1/month on select plans.

If for some reason you do not want your customers to access a certain collection or product on your Shopify store but you don’t want to hide them. This article will guide you how to prevent customers from accessing a collection or product page without a Shopify app.

  • From your Shopify admin, go to Online Store > Themes.
  • Find the theme you want to edit, and then click Actions > Edit code.
  • In the Templates directory, click Add a new template.
  • In the dialog appear, you choose Collection or Product for the select box dropdown and fill prevent for the next input field.
  • Removing all exist code, then inserting below code to this file
  • Click Save.

Now, you need to open the collection or product you want to prevent access and set the default template for them.

You are done and you can check it out.

Now, if someone accesses this collection or product page, the browser will automatically redirect them to the homepage.

I hope this article is helpful for you.

Looking for Shopify Experts?

Hura Apps can help you take your store to the next level

Our team of experienced designers and developers can help you create a beautiful, high-converting Shopify store that will drive sales and increase customer satisfaction. From custom design to app development and optimization, we have the skills and expertise to help you achieve your eCommerce goals.

Get in touch

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *