How to show discounted price for limited time on product page with timer
Url - www.jagstore.in
like below image
Or Get 10% extra off
Or Get at Rs 450
Please suggest..
A merchant seeks to display time-limited discounted prices on product pages with countdown timers, similar to promotional banners showing “Get 10% extra off” or specific discounted amounts.
Proposed Solutions:
App-based approach: Multiple responders recommend using Shopify apps with “urgency” features, such as Adsgun or Growth Suite, which offer countdown timer functionality without custom coding. These typically include free trials.
Custom implementation: A detailed technical solution involves:
Status: The discussion remains open with no indication the merchant has chosen a specific approach. The custom solution requires moderate technical knowledge of Liquid templating and JavaScript, while app solutions offer simpler implementation.
How to show discounted price for limited time on product page with timer
Url - www.jagstore.in
like below image
Or Get 10% extra off
Or Get at Rs 450
Please suggest..
You can have a look at apps that offer “Urgency” features
Hey there,
Below is a step-by-step guide on how you can display a discounted price along with a live countdown timer on your Shopify product page.
1. Set Up Discount Data
First, you need to store your discount details using Shopify’s Metafields. For example, add these fields for each product:
discount_price: The amount or percentage off.
discount_start: When the discount starts.
discount_end: When the discount ends.
discount_type: Whether the discount is a percentage or a fixed amount.
This way, you can manage your discount information easily through the Shopify admin or API.
2. Update Your Product Template
In your product.liquid file (or your specific product template), insert Liquid code to check if the discount is active. Here’s an example:
{% assign current_time = 'now' | date: '%s' %}
{% assign discount_start = product.metafields.discount.discount_start | date: '%s' %}
{% assign discount_end = product.metafields.discount.discount_end | date: '%s' %}
{% if discount_start and discount_end and current_time >= discount_start and current_time <= discount_end %}
Discounted Price:
{% if product.metafields.discount.discount_type == 'percentage' %}
Enjoy an extra {{ product.metafields.discount.discount_price }}% off!
{% elsif product.metafields.discount.discount_type == 'fixed' %}
Now only Rs {{ product.metafields.discount.discount_price }}!
{% else %}
Rs {{ product.metafields.discount.discount_price }}
{% endif %}
{% else %}
Price: Rs {{ product.price | money }}
{% endif %}
This code checks the product’s discount details. If the discount period is active, it shows the discounted price and leaves a space for the countdown timer.
3. Add a Countdown Timer with JavaScript
Next, add a JavaScript snippet to calculate and update the countdown timer dynamically. Insert this code into your template:
This script calculates the remaining time until the discount ends and updates the countdown every second. Once the time is up, it displays a message letting customers know the discount period is over.
If you don’t want to deal with all of these details you can check out Growth Suite on the Shopify App store…
Hi @Jayesh-Agarwal,T
There’s no native way to display this, but I’d suggest trying the Adsgun Shopify App - it does exactly what you need while following your theme structure, or it can even be custom designed upon request.
We’ve helped many merchants with the exact same problem.
You’ll get a 7-day free trial when you install, so you don’t have anything to lose.
Hope this helps!