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

不想你离开。 提交于 2020-01-13 06:53:07

问题


I am working on Opencart 1.5.1.3

On the product display page, it's displaying the Active Special Price and also the Normal Price with a line in the middle.

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

I tried my best by changing data in the tpl file and also in the module php file, but it didn't work.

How can I do this?


回答1:


I can't give you the exact code because I don't want to change my own installation, but you would need to change /catalog/model/catalog/product.php and edit line~14 "$query = ..." so that it returns the 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(" the start and end date information.

You should now be able to access that information and format it however you want in /catlog/view/theme/THEME/template/product/category.tpl



来源:https://stackoverflow.com/questions/8015765/opencart-1-5-1-3-display-special-price-with-start-and-end-date-on-product-displa

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!