业务经理

微信扫描以上二维码

028-61286886

技术咨询

购物车列表怎么调用该商品的栏目呢

迅睿框架 更新 2020-08-27 20:35:41 志伟

插件名称:网店系统

image

购物车列表怎么调用该商品的栏目id呢?


<tbody>
{loop $list $i $t} 
{php $sku_name=dr_string2array($t.sku_name);}
  <tr id="dr_row_{$t.id}">
    <td style="">
      <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
        <input type="checkbox" checked="checked" class="checkboxes" name="ids[]" value="{$t.id}" />
        <span></span></label>
    </td>
    <td class="cart_product" style="text-align: center">
      <a href="{$t.url}" title="{$t.title}">
        <img style="width: 70px; height: 70px;" src="{dr_thumb($t.thumb, 70, 70)}"></a>
    </td>
    <td class="cart_description">
      <p class="product-name">
        <a href="{$t.url}" title="{$t.title}">{dr_strcut($t.title, 50)}</a></p>{loop $sku_name $i $c}
      <small class="cart_ref">{$i}: {$c}</small>{/loop}</td>
    <td class="price pprice">{if $t.yuan}
      <p>¥
        <span class="regular-price">{number_format($t.price, 2)}</span>元</p>
      <p class="pyuan">¥
        <span>{number_format($t.yuan, 2)}</span>元</p>
      <p>{$t.p_info}</p>{else} ¥
      <span class="regular-price">{number_format($t.price, 2)}</span>元 {/if}</td>
    <td class="qty" style="width: 150px">
      <input class="dr_buy_num" iid="{$t.id}" type="text" value="{$t.quantity}"></td>
    <td class="price">¥
      <span id="dr_total_{$t.id}" class="regular-price">{number_format($t.price * $t.quantity, 2)}</span>元</td>
    <td class="action">
      <a href="[removed]dr_cart_del('{$t.id}');">删除</a></td>
  </tr>
  {/loop}
  </tbody>


方案

  • 官方插件实习技术 #1 · 2020-08-27 13:24:07
     {/loop}
      </tbody> {var_dump($t)}
    看看输出的数据
  • 志伟 #2 · 2020-08-27 13:26:30
    官方插件实习技术 array(11) { ["id"]=> string(1) "3" ["mid"]=> string(17) "1_store-4-5-%-0_0" ["uid"]=> string(1) "1" ["price"]=> string(5) "18.00" ["quantity"]=> string(1) "1" ["sku_name"]=> string(20) "{"规格":"300*300"}" ["sku_value"]=> string(3) "0_0" ["title"]=> string(41) "诺贝尔瓷砖 伊丽莎白 厨卫地砖" ["thumb"]=> string(1) "2" ["url"]=> string(30) "/index.php?s=store&c=show&id=4" ["inputtime"]=> string(10) "1598421687" }
  • 官方插件实习技术 #3 · 2020-08-27 13:27:23
    很明显,这个数据没有存储栏目id号,所以不能调用出栏目
  • 易学习 #4 · 2020-08-27 20:11:39
    满意答案
    我私信发给你了,测试下
  • 志伟 #5 · 2020-08-27 20:35:14
    增加悬赏(设置悬赏)金:20元,希望大家给予帮助!
  • 志伟 #6 · 2020-08-27 20:35:41
    @易学习:感谢帮忙,完美可以用了。

迅睿系统漏洞

独立站群系统
独立站群系统(2026-09-14)
子站独立部署时修复同步附件失败问题
在线客服
在线客服(2026-09-13)
修复删除会话报错问题 删除会话时联动删除聊天图片
在线考试竞赛系统
在线考试竞赛系统(2026-09-12)
增加投票功能 考试功能拓展 注意:更新后需要执行系统更新,更新数...
网上信箱
网上信箱(2026-09-12)
修复新版本兼容问题
GeoSeo收录宝
GeoSeo收录宝(2026-09-12)
1 优化Update.php文件,解决版本在线升级不完整问题 2 ...
GeoSeo工具箱
GeoSeo工具箱(2026-09-11)
修正历史记录推送
微信系统
微信系统(2026-09-11)
增加数据统计总览界面 账号管理增加服务和公众号的区别 菜单管理支持更...
答题系统
答题系统(2026-09-11)
一站式在线答题系统,支持真题考试、题库练习和错题本,适合培训、考证、...
阿里云滑动验证码
阿里云滑动验证码(2026-09-10)
采用阿里云验证码替换迅睿系统自带的图片验证码和滑动验证码。后台设置方...
下载Plus
下载Plus(2026-09-09)
为网站附件下载加上“计数、限次、统计、防护”四重能力:按用户组控制下...