How to Control the Visibility of Product Samples?

You can control who sees the sample button, and where it appears in your store.

Restrict the button to selected users or user roles in User Specific. In Basic Configuration, you can hide the button on the shop or categories page, or add a Sample Products item to your store’s primary menu with Include on Store Menu.

Restrict by user or user role

  1. Go to Dotstore Plugins > Product Sample and open the Manage Sample tab and open the User Specific section.
  2. Use User Based to select specific users who should see the sample button.
  3. Use User Role Based to select user roles, such as Administrator or Shop manager.
  4. Click Save Changes.
User Specific section with User Based and User Role Based fields
Figure - User Specific settings with User Based and User Role Based

Hide the button on shop or category pages

In Basic Configuration, you can hide the sample button on the shop page or the categories (archive) page so it appears only on single product pages.

  1. Turn on Hide on Shop Page to remove the sample button from the shop page.
  2. Turn on Hide on Categories Page to remove the sample button from category and archive pages.
  3. Click Save Changes.
Basic Configuration toggles for Hide on Shop Page, Hide on Categories Page, and Include on Store Menu
Figure - Hide on Shop Page, Hide on Categories Page, and Include on Store Menu in Basic Configuration
Shop page product cards without a sample add to cart button
Figure - A shop page without the sample button
Shop page product cards with a sample add to cart button visible
Figure - A shop page with the sample button

Add a Sample Products menu item

When you enable Include on Store Menu in Basic Configuration, the plugin adds a Sample Products item to your store’s primary menu. Customers can open that page to view and purchase the sample products in your store.

  1. In Basic Configuration, turn on Include on Store Menu.
  2. Click Save Changes.
  3. Check your storefront menu for the Sample Products item.
Storefront primary menu showing a Sample Products menu item and a sample products page
Figure - The Sample Products item in the store menu

Pro Tips

  • Use User Role Based when you want a whole role, such as subscribers or reviewers, to see samples.
  • Use User Based when only a few specific accounts should see the button.
  • If you only want the button on the product page, turn on both Hide on Shop Page and Hide on Categories Page.
  • Turn on Include on Store Menu when you want a dedicated page that lists your sample products.

Common Use Cases

Here are some popular ways to control sample visibility:

1. Offer samples only to selected users or roles

Use User Based or User Role Based so only reviewers, resellers, or other selected accounts see the sample button.

2. Show the button only on the product page

Turn on Hide on Shop Page and Hide on Categories Page so the button does not appear in product listings.

3. Add a Sample Products menu item

Enable Include on Store Menu so customers can browse all sample products from the store menu.

FAQs

1. How do I limit the sample button to certain users or roles?

Go to Dotstore Plugins > Product Sample and open the Manage Sample tab, open User Specific, and use User Based and/or User Role Based. Then click Save Changes.

2. How do I hide the sample button on the shop page?

In Basic Configuration, turn on Hide on Shop Page and click Save Changes. Use Hide on Categories Page for category and archive pages.

3. What does Include on Store Menu do?

It adds a Sample Products item to your store’s primary menu. Customers can use that page to view and purchase your sample products.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.