Opencart 1.5.1.3在产品显示页面上显示特价以及开始和结束日期 [英] Opencart 1.5.1.3 display special price with start and end date on product display page

查看:110
本文介绍了Opencart 1.5.1.3在产品显示页面上显示特价以及开始和结束日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Opencart 1.5.1.3

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

我通过更改 tpl 文件和模块 php 文件中的数据来尽力而为,但这没有用.

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

我该怎么做?

推荐答案

我无法为您提供确切的代码,因为我不想更改自己的安装,但是您需要更改/catalog/model/catalog /product.php并编辑第14行"$ query = ...",以便它将开始和结束日期返回给控制器.

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.

然后编辑/catalog/controller/product/category.php第〜187行并将其添加到数组"$ this-> data ['products'] [] = array("的开始和结束日期信息.

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

您现在应该可以在/catlog/view/theme/THEME/template/product/category.tpl

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

这篇关于Opencart 1.5.1.3在产品显示页面上显示特价以及开始和结束日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆