Opencart 1.5.1.3 displays a special price with a start and end date on the product display page

I am working on Opencart 1.5.1.3

On the product display page, the Active Special Price is displayed, as well as the Normal Special Price with a line in the middle.

For all the special prices available for the product, I want to display: a special price with a start and end date

I tried my best, changing the data in the tpl file, as well as in the module php file, but this did not work.

How can i do this?

+1
source share
1 answer

I canโ€™t give you the exact code because I donโ€™t want to change my own installation, but you will need to change /catalog/model/catalog/product.php and edit the line ~ 14 "$ query = ..." so that it returns start and end date to the controller.

Then edit /catalog/controller/product/category.php line ~ 187 and add to the array "$ this-> data ['products'] [] = array (" information about the beginning and end of the date.

Now you can access this information and format it as you want in / catlog / view / theme / THEME / template / product / category.tpl

0
source

Source: https://habr.com/ru/post/1379775/


All Articles