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 ?> (责任编辑:最模板) |
------分隔线----------------------------