[SOLVED] Where did the Discount class go?
Siteboost last edited by Siteboost
I’ve installed MyPresta’s Voucher generator module, but get an exception when I try to mass generate vouchers through the module.
The exception starts with the following:
Class ‘Discount’ not found
at line 652 in file
After examining the classes folder, I can see that the Discount class found in Prestashop 1.6, has been removed from Thirty Bees.
Does anyone know the reason behind this (I guess a lot of 3rd party modules rely on this class) or what it will take to modify my module in order to get it to work in Thirty Bees?
musicmaster last edited by
If you look at the file classes/discount.php in Prestashop you will see that in its header it displays the comment " * @deprecated 126.96.36.199". It has been replaced by classes/specificPrice.php. As TB has thrown out some old stuff it has been discarded.
So you will need either to contact the author of the module or experiment yourself with using the specificPrice or specificPriceRule class instead of the Discount class.
Siteboost last edited by
Ahh… Thank you so much for the clarification.
As the module is already compatible with PS1.7 (which also uses the specificPrice class), all I had to to do in order to fix the module, was to change line 646 in
if (parent::psversion()== 7)
if (parent::psversion() > 5)
It now works flawlessly with Thirty Bees