服务报价 | 域名主机 | 网络营销 | 软件工具| [加入收藏]
 热线电话: #
当前位置: 主页 > php教程 > OpenCart教程 >

Opencart商品页添加浏览次数

时间:2016-12-24 14:01来源:未知 作者:最模板 点击:
Opencart商品页添加浏览次数, vim catalog/controller/product/product.php $data[text_model] = $this-language-get(text_model); $data[text_viewed] = $this-language-get(text_viewed); //获取语言包中的字符 $data[manufacturers] =
Opencart商品页添加浏览次数,
vim catalog/controller/product/product.php
$data['text_model'] = $this->language->get('text_model');
$data['text_viewed'] = $this->language->get('text_viewed');//获取语言包中的字符

$data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']);
$data['model'] = $product_info['model'];
$data['viewed'] = $product_info['viewed'];//取出数据库中的记录值


vim catalog/language/english/product/product.php//添加语言包内容
$_['text_manufacturer'] = 'Brand:';
$_['text_model'] = 'Product Code:';
$_['text_viewed'] = '被浏览次数:';

vim catalog/view/theme/default/template/product/product.tpl
//把下面这条语句放到适合的位置
<?php echo $text_viewed.$viewed ?>(责任编辑:最模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
热点内容