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
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.
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
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.