Configuration Updated June 30, 2025

How to prevent user from viewing Sample Product?

1 min read
324 views
Helpful (2)

All Samples products will be redirected to Homepage. Follow these bellow guide to secure your Sample page.

  1. From Shopify admin dashboard.
  2. Navigate to Online Store > Themes tab.
  3. Edit code of your Live theme. Edit theme
  4. From the left side panel, click Add a new template, select product and name it samples and hit Create template Add new template
    Add this code bellow:

    {% layout none %}
    <!DOCTYPE HTML>
    <html lang="en-US">
    <head>
      <meta charset="UTF-8">
      <meta http-equiv="refresh" content="0; url={{ shop.url }}">
      <script type="text/javascript">
        window.location.href = "{{ shop.url }}";
      </script>
      <title>Redirecting...</title>
    </head>
    </html>
    
  5. Navigate to Products section
  6. Finding Samples products created on your store, click to open
    Edit Sample Products
  7. After opening Product sample, scroll down to section Theme templates on your right hand side.
    Edit Sample PDP Template
  8. Hit Save button on top right corner

Was this article helpful?

Help us improve our documentation

Still need help?

Can't find what you're looking for? Our support team is here to help.

Contact Support

Related Help Articles

Integration

Integrating With Product Samples App: Event Hooks & Advanced Settings

The Product Samples App fires custom JavaScript events at key stages, making it easy to…

Read Article → 3 min read
Configuration

Creating a Separated Sample Box

With this option enabled, NO ADDITIONAL PRODUCT is added into your store. App creates Draft…

Read Article → 1 min read
Configuration

Customizing Sample Templates

You can easily update the text and markup shown in your sample widgets directly from…

Read Article → 1 min read