How to Add Sample Price with Sample Button?

You can show the sample price on the sample button by adding the {PRICE}  code to the Button Label.

The button then displays the current sample price, so customers see the cost before they add the sample to the cart.

How to add the sample price to the button

  1. Go to Dotstore Plugins > Product Sample and open the Manage Sample tab and open Basic Configuration.
  2. In the Button Label field, include the {PRICE}  code with your button text. For example: Order a Sample - {PRICE}.
  3. Click Save Changes.
  4. Open a product page and confirm that the button shows the sample price.
Basic Configuration Button Label field with the PRICE code included in the sample button text
Figure - Button Label settings with the {PRICE} code
Storefront sample button displaying the sample price as part of the button label
Figure - A sample button that shows the sample price

Pro Tips

  • Use {PRICE}  exactly as written, including the curly brackets.
  • Set your sample price in Price Adjustment or in the product’s Sample price ($) field first, so the button shows the correct amount.
  • Keep the rest of the Button Label short so the price stays easy to read.

Common Use Cases

Here are some popular ways to use this:

1. Show a paid sample price on the button

Add {PRICE}  to the Button Label so customers see the flat or percentage sample price before they click.

2. Confirm a free sample

If the sample price is 0, the button can show that free price when {PRICE}  is in the label.

FAQs

1. Where do I add the {PRICE} code?

Go to Dotstore Plugins > Product Sample and open the Manage Sample tab, open Basic Configuration, and add {PRICE}  to the Button Label field.

2. Why doesn’t the button show a price?

Confirm that {PRICE}  is in the Button Label, that you clicked Save Changes, and that a sample price is set in Price Adjustment or on the product.

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