• 在ECSHOP分类列表页中调用商品货号


    标题大家都能看明白吧,那就不多说了,下面是教程:

    打开  /category.php 文件
    找到

    $sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' .


    修改为

    $sql = 'SELECT g.goods_id, g.goods_name,g.goods_sn, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' .


    继续往下找,找到

    $arr[$row['goods_id']]['name']             = $row['goods_name'];


    在它下面添加

    $arr[$row['goods_id']]['goods_sn']             = $row['goods_sn'];


    然后就可以在模板文件中调用商品货号了,
    打开模板文件 /themes/default/library/goods_list.lbi ,
    调用方法如下:

    {$lang.goods_sn}{$goods.goods_sn}

    最后晒下效果:

  • 相关阅读:
    python--模块
    python--*args与**kw
    python--偏函数
    Reversible Cards ARC111 -B 思维,图论
    Simple Math ARC111
    状压DP详解(位运算)
    E
    Ball CodeForces
    Reward HDU
    Choosing Capital for Treeland CodeForces
  • 原文地址:https://www.cnblogs.com/cqchai/p/3016029.html
Copyright © 2020-2023  润新知