Daresh Posted January 20, 2023 Share Posted January 20, 2023 (edited) The EU Omnibus directive states that: Quote Any announcement of a price reduction shall indicate the prior price applied by the trader for a determined period of time prior to the application of the price reduction. I've developed a simple module, that allows to fullfill this requirement for simple stores and fair merchants. All it does is displaying regular product price as the prior price for discounted products. You can safely use this module in case the following conditions are met: The regular price is the real lowest price, that the product had within 30 days before start of the current promotion and you are able to prove it in case of a control. During the promotion, both regular and discounted price never change (no price edits in the panel, no external influences like currency rates or price import software) After the promotion is finished, the product stays on the regular price for longer than 30 days. This module works for PrestaShop 1.7, it requires the following hook to be present in \templates\catalog\_partials\product-prices.tpl: {hook h='displayProductPriceBlock' product=$product type="after_price"} (this hook should be by default in every well made and not broken theme) The configuration panel allows you to set colors for the text and the price. Happy using! gmomni_1_0_0.zip gmomni_1_0_1.zip Latest version: gmomni_1_0_2.zip Edited February 8, 2023 by Daresh (see edit history) 1 2 Link to comment Share on other sites More sharing options...
gusman126 Posted January 21, 2023 Share Posted January 21, 2023 (edited) I don't understand the code, where it reads and saves the previous price, I don't see anywhere that checks or saves the price of -30 days Edited January 21, 2023 by gusman126 (see edit history) Link to comment Share on other sites More sharing options...
endriu107 Posted January 21, 2023 Share Posted January 21, 2023 As I understand it doesn't save any price in database, it's only display some text and regular price for products with discounted price. Link to comment Share on other sites More sharing options...
gusman126 Posted January 21, 2023 Share Posted January 21, 2023 hace 33 minutos, endriu107 dijo: As I understand it doesn't save any price in database, it's only display some text and regular price for products with discounted price. So it is not 100% legal, if I have changed prices 3 times in a month, it should show the lowest price over -30 days Including the discounted prices made in that period Obviously, thank you very much for giving a simple solution that can be useful to the vast majority of sellers. Link to comment Share on other sites More sharing options...
Daresh Posted January 21, 2023 Author Share Posted January 21, 2023 It is clearly stated under what conditions this module can be used: Quote The regular price is the real lowest price, that the product had within 30 days before start of the current promotion and you are able to prove it in case of a control. This is the simplest and lightweight solution to fullfill the requirement about showing the prior price. 1 Link to comment Share on other sites More sharing options...
Soyons Solidaire Posted January 22, 2023 Share Posted January 22, 2023 (edited) Thank for the sharing. you wash for version 1.6 Edited January 22, 2023 by Soyons Solidaire (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted January 22, 2023 Author Share Posted January 22, 2023 Version for 1.6 would require additional JavaScript to adjust the displayed price when changing combinations. If your store does not have combinations or they all have the same prices, you can try to use this module. Just change in the code the version compliancy to: $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); 1 Link to comment Share on other sites More sharing options...
gusman126 Posted January 23, 2023 Share Posted January 23, 2023 En 21/1/2023 a las 4:39 PM, Daresh dijo: It is clearly stated under what conditions this module can be used: This is the simplest and lightweight solution to fullfill the requirement about showing the prior price. For the vast majority of stores that do not usually make price changes or continuous offers, YES for that I have thanked you, although you must record price changes in a table, in many types of product the price changes every week and an offer can be greater than the price of 28 days ago. EX: Oil -> Prices over 1 month -> 1.5 -> 1.7 -> 2.3 -> (offer 1.9). As can be seen, the lowest price is 1.5 not 2.3 of -30 days. Obviously thanks for the module, as I say it can be useful to many stores Link to comment Share on other sites More sharing options...
StrefaBiznesu Posted April 21, 2023 Share Posted April 21, 2023 Hello @Daresh. I am using 1.7.8.7 . I have installed this module. Using custom theme. Hook is there but module doesn't show on front. Cache cleared etc. So i have installed clean 1.7.8.7 with only classic theme. Same thing. Hook is there in position. Not showing on front. Where i can search to fix it? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now