All things Shopify and commerce
We need to display on the product page the lowest selling price of the last 30 days.
See example below.
the lowest price in the last 30 days X.00 RON
This text & price (the lowest price in the last 30 days X.00 RON
) must be displayed when 'Price' is lower than 'Compare-at price'.
Example:
Price 80
Historical Price Evaluation 100
Compare-at price 100
Display "the lowest price in the last 30 days 80 RON"
Price 70
Historical Price Evaluation 80
Compare-at price 100
Display "the lowest price in the last 30 days 80 RON"
If Price < 'Compare-at price' -> displays "the lowest price in the last 30 days X.00 RON". But it must be displayed on the product page as long as Price < compared price.
If 'Price' = 'Compare-at price' -> "the lowest price in the last 30 days X.00 RON" is not displayed
If 'Price' > 'Compare-at price' -> "the lowest price in the last 30 days X.00 RON" is not displayed
Can you help us?
You can do it like this
{% if product.compare_at_price > product.price %}
the lowest price in the last 30 days X.00 RON
{% endif %}
Hi. Where exactly do you need to paste this code?
Hi @GJack2
You can add the code on product page, You can add this in main-product.liquid to a place where you want this.
{% if product.compare_at_price > product.price %}
You can update your messaging here
{% endif %}
Thanks!
If you're open to using an app our Ablestar Bulk Product Editor stores a history of all prices it sees for products and lets you set a field or metafield to the lowest price from the last 30 days.
Here's a two-minute video showing you how it works:
The app has a free plan with five free edits a month (no limit on products) so if you just update your prices occasionally you can get by with that.
Best,
Daniel
Hi - does the app track all price edits or just price edits done through the app?
Hi @JohnBoye,
Yes, we keep track of all price updates since the app was installed, not just the ones that were done through the app.
If the lowest price is shown in order to comply with the EU pricing directive (omnibus) you actually need to calculate the lowest price from the 30-day period prior to a discount. In other words the lowest prior price does not change during the discount but it is in practice used to display the correct discount. It is not allowed, according to the directive, to say that a product is discounted X% compared to the compare at price if the lowest prior price is lower than the compare at price.
Luckily there are apps that take care of the calculations and theme integrations. Here's one example: https://apps.shopify.com/omnibus-price
Hi!
You can achieve it by setting your app display lowest price block only for discounted products. I use Omnibus Insight and it worked for me. The good thing is that it does all the calculations for you.
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024