Shopify themes, liquid, logos, and UX
Hello everyone,
Do you guys know if there is a way to show on the featured collection products a little badge for the Buy x Get y discount?
I set this type of discount for some of my products, and I would like to have it displayed in a badge.
I saw that the discount title is available in the cart (cart.item.discount.title) but I couldn't find this information in featured-collection.
Can any of you give me a hand with the issue and suggest a workaround? I would highly appreciate it.
Thank you a million.
Yes you can di it by
Identify the discount title: First, make sure you have the discount title handy. This is the title you assigned to the "Buy x Get y" discount in your Shopify admin.
Edit your featured collection template: Access your Shopify theme editor and locate the template responsible for rendering the featured collection section on your store's homepage or collection page. This might vary depending on the theme you're using, but commonly it's the collection-template.liquid or featured-collection.liquid.
Add code to display the discount badge: Within the featured collection template, find the code that displays each product within the collection. You can typically look for a loop that iterates through the collection's products
Hi, the problem is that the information I need does not seem to be available in featured-collection. The product does not have a discount property that I can target and display.
I could add it myself to the product, but I wonder where are the discounts saved, and how can I reach them? Any guess?
User | RANK |
---|---|
182 | |
150 | |
80 | |
72 | |
61 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023