本博客基于Opencart2.1.0.1源码,架设在阿里云香港机房!  技术交流QQ群:103164069
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 ?>

Write a review

Please login or register to review
浏览次数:1952

Opencart商品页添加浏览次数

  • Product Code: Opencart商品页添加浏览次数
  • Availability: In Stock
  • ¥1.00


Tags: Opencart商品页添加浏览次数