Show Percentage Discounts in Shopify to Boost Sales
Published on Jun 18, 2024
In the competitive world of e-commerce, displaying discounts effectively can significantly boost sales and customer engagement. One powerful way to showcase savings is by showing percentage discounts on products. This guide will walk you through the process of adding percentage discounts to your Shopify store, focusing on the Debut theme but also providing insights for other themes.
Understanding the Importance of Displaying Discounts
Why Percentage Discounts Matter
Percentage discounts are a powerful psychological tool in e-commerce. They provide a clear, easy-to-understand value proposition for customers. When shoppers see a “20% off” tag, it immediately communicates the savings they’ll receive, often more effectively than a fixed dollar amount.
Impact on Customer Behavior
Displaying percentage discounts can:
- Increase perceived value
- Create a sense of urgency
- Improve conversion rates
Enhancing User Experience
By clearly showing discounts, you’re improving the overall shopping experience. Customers appreciate transparency and the ability to quickly understand the deal they’re getting.
Implementing Percentage Discounts in Shopify
The Basic Code Solution
The most straightforward way to display percentage discounts on your Shopify store is by adding a simple code snippet to your theme files. Here’s the code that can be added to display the discount percentage:
{% if compare_at_price %}
{% capture discount %}
{{ compare_at_price | minus:price | times:100 | divided_by:compare_at_price }}%
{% endcapture %}
{{ discount }}
{% endif %}
This code calculates the percentage difference between the compare-at price and the current price, displaying it as a percentage.
Where to Add the Code
For the Debut theme:
- Go to your Shopify admin panel
- Navigate to Online Store > Themes
- Click “Actions” > “Edit code”
- Find the “product-price.liquid” file
- Insert the code after line 12 (or where appropriate in your theme structure)
For other themes, the location might vary. Common places to add this code include:
- Sections > product-template.liquid
- Assets > product-price.liquid
Customizing the Display
You can further customize how the discount appears by wrapping it in HTML tags:
{% if compare_at_price %}
{% capture discount %}
{{ compare_at_price | minus:price | times:100 | divided_by:compare_at_price }}%
{% endcapture %}
<span class="discount-badge">{{ discount }} off</span>
{% endif %}
This allows you to style the discount display using CSS for better visibility and integration with your store’s design.
Advanced Techniques and Considerations
Rounding Down Discounts
To avoid potentially misleading customers with high decimal percentages, you can round down the discount:
{% assign percentDiscount = comparePrice | minus: price | times: 0.10 | divided_by: comparePrice | times: 1000.00 | floor %}
This approach ensures that the displayed discount is always slightly lower than the actual discount, maintaining customer trust.
Displaying Discounts on Collection Pages
To show discounts on collection pages, you’ll need to modify the collection template or product grid item snippet. The exact location depends on your theme, but it’s often in files like:
- Sections > collection-template.liquid
- Snippets > product-grid-item.liquid
Handling Multiple Variants
For products with multiple variants, ensure your code updates dynamically when a customer selects different options. This often requires JavaScript to recalculate and update the displayed discount when variant selection changes.
Troubleshooting Common Issues
Discount Not Appearing
If your discount isn’t showing up:
- Verify that you’ve added the code to the correct file
- Ensure the product has both a regular price and a compare-at price set
- Check for any theme-specific overrides that might be preventing the code from executing
Incorrect Calculations
If discounts are displaying but seem incorrect:
- Double-check your math in the Liquid code
- Ensure you’re using the correct price variables (price vs compare_at_price)
- Consider implementing rounding to avoid strange decimal percentages
Theme Compatibility
Not all themes handle custom code the same way. If you’re having persistent issues:
- Consult your theme’s documentation
- Reach out to the theme developer for guidance
- Consider using a Shopify app designed for discount display if manual implementation proves too challenging
Enhancing the Discount Display
Adding Visual Elements
To make your discounts stand out:
- Use contrasting colors for the discount badge
- Add icons or graphics to draw attention
- Animate the discount display on page load or hover
A/B Testing Different Displays
Experiment with different ways of showing discounts:
- Test percentage off vs. amount saved
- Try different placements on the product page
- Vary the language used (e.g., “Save 20%” vs “20% Off”)
Integrating with Other Marketing Features
Combine your discount display with:
- Countdown timers for limited-time offers
- Stock level indicators to create urgency
- Bundle deals to increase average order value
By implementing these strategies, you can effectively display percentage discounts on your Shopify store, potentially boosting sales and improving customer experience. Remember to always test your implementations thoroughly and monitor their impact on your store’s performance.
Take Our Quick Quiz:
Which primary product image do you think has the highest conversion rate?