联系官方销售客服

1835022288

028-61286886

应用插件 版主:官方插件技术组
在提交订单页面,品所属分类栏目标签应该怎么写
类型:迅睿CMS 更新时间:2020-07-22 10:28:17 网店系统

插件名称:网店系统

在提交订单页面,我用{$t.id}掉不出商品的id,用{dr_cat_value("store",$t.catid, 'name')}掉不出商品所属分类栏目,请问这里标签应该怎么写呢?

{loop $list $i $t}
{php $sku_name=dr_string2array($t.sku_name);}
 
                <h2 class="subtitle">{dr_strcut($t.title, 60)}</h2>

<div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">商品价格</label>
                            <span class="weui-form-preview__value price">¥{number_format($t.price, 2)}</span>
 </div>
<div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">商品编号</label>
                            <span class="weui-form-preview__value">{$t.id}</span>
</div>
<div class="weui-form-preview__item">
                          <label class="weui-form-preview__label">所属分类</label>
                          <span class="weui-form-preview__value">{dr_cat_value("store",$t.catid, 'name')}</span>
</div>                    

{/loop}

image

回帖
  • 官方实习技术
    #1楼    官方实习技术
    2020-07-22 09:20:16
    Chrome 0
    {loop $list $i $t}
    {php print_r($t);}
                   
    
    {/loop}
    看看结果
  • 志伟
    #2楼    志伟
    2020-07-22 09:25:06
    Chrome 0
    官方实习技术
    Array ( [mid] => buy-1_store-3-92-1-null [num] => 1 [price] => 99 [price_sku] => [total] => 99 [table] => 1_store [sn] => 5665 [quantity] => 96 [sku_name] => [sku_string] => [sku_value] => [touid] => 1 [tousername] => [title] => 测试账号 [thumb] => 28 [url] => /index.php?s=store&c=show&id=3 [data] => Array ( [id] => 3 [catid] => 12 [title] => 测试账号 [thumb] => 28 [keywords] => [description] => [hits] => 11 [uid] => 1 [author] => admin [status] => 9 [url] => /index.php?s=store&c=show&id=3 [link_id] => 0 [tableid] => 0 [inputip] => 36.57.146.218 [inputtime] => 1594444344 [updatetime] => 1594789840 [comments] => 1 [avgsort] => 0.00 [displayorder] => 0 [price] => 99.00 [price_sku] => [price_quantity] => 96 [price_sn] => 5665 [shipping] => 0 [shipping_param] => {"value":"","param":"1"} [volume] => 3 [is_sale] => 1 [zhms] => <p><span style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-size: 16px; font-family: &quot;Microsoft YaHei&quot;; background-color: rgb(255, 255, 255);">荣耀水晶:全息碎影,武则天</span><br/><span style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-size: 16px; font-family: &quot;Microsoft YaHei&quot;; background-color: rgb(255, 255, 255);">星元皮肤:金色仲夏夜</span><br/><span style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-size: 16px; font-family: &quot;Microsoft YaHei&quot;; background-color: rgb(255, 255, 255);">内测英雄皮肤:艾琳(有皮肤)</span><br/><span style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-size: 16px; font-family: &quot;Microsoft YaHei&quot;; background-color: rgb(255, 255, 255);">传说皮肤:地狱火</span></p> [favorites] => 0 [footprint] => 0 ) [yuan] => [p_name] => [p_info] => [give_money] => 0 [give_score] => 0 )

  • 官方实习技术
    #3楼    官方实习技术
    2020-07-22 09:32:14
    Chrome 0
    {loop $list $i $t}
    
    {loop $t.data $tt}
    {dr_cat_value("store",$tt.catid, 'name')}
    {/loop}
    {/loop}
  • 志伟
    #4楼    志伟
    2020-07-22 09:37:15
    Chrome 0
    官方实习技术一下子循环出来了一堆商品,正常应该只有这个订单里的商品显示才对
    image
  • 易学习
    #5楼    易学习
    2020-07-22 09:38:56
    Chrome 0
    {loop $t.data $tt}
    {dr_cat_value("store",$tt.catid, 'name')}
    {/loop}
    这个写法没错的
    满意答案
  • 志伟
    #6楼    志伟
    2020-07-22 09:47:54
    Chrome 0
    官方实习技术我用这个循环之后 会出现几十个商品 ,正常应该是下单的这一个商品才对。
    {loop $list $i $t}
    
    {loop $t.data $tt}
    
    {$tt.id}
    {dr_cat_value("store",$tt.catid, 'name')}
    
    {/loop}
    
    {/loop}
  • 志伟
    #7楼    志伟
    2020-07-22 10:26:43
    Chrome 0
    增加悬赏(设置悬赏)金:10元,希望大家给予帮助!
  • 志伟
    #8楼    志伟
    2020-07-22 10:28:17
    Chrome 0
    @易学习:感谢私信帮助,谢谢了。