迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
POSCMS 商城模块,添加了自定义字段,但是在前台是每一个商品都调用了一份字段,相当于重复调用,我在数据库里看其实之录入了一份,怎么实现之调用一份,而不是没个商品都重复调用了一份字段,,
{loop $order_list $u $store} <div class="portlet light"> <div class="portlet-title"> <div class="caption">商家:<a href="{$store.url}" target="_blank">{$store.name}</a></div> <div class="actions"> </div> </div> <div class="portlet-body"> <div class="row"> {loop $store.goods $t} <div class="col-md-9 col-sm-12"> <div class="media"> <a class="pull-left" href="javascript:;"> <img src="{dr_thumb($t.thumb, 55, 55)}" width="55" height="55"> </a> <div class="media-body"> <h5 class="media-heading"><a href="{$t.url}" target="_blank">{$t.title}</a></h5> {loop $t.sku $sname $svalue} <lable>{$sname}:{$svalue} </lable> {/loop} <lable> {if $t.use}x{$t.quantity}{else}<span style="color:#e4393c">无货</span>{/if} </lable> </div> </div> </div> <div class="col-md-3 text-right"> <b class="font-red">{if $t.order_score}{intval($t.price)}{SITE_SCORE}{else}¥{number_format($t.price, 2)}元{/if}</b> </div> {/loop} <div class="col-md-8 col-sm-12" style="margin-top: 15px"> <textarea placeholder="限45个字(定制类商品,请将购买需求在备注中做详细说明)" class="form-control" name="data[{$u}][buy_note]"></textarea> {if $myfield} {str_replace('data[', 'data['.$u.'][', $myfield)} {/if} </div> <div class="col-md-4 col-sm-12 text-right" style="margin-top: 15px"> 运费:¥<span class="font-red" id="dr_order_yunfei_{$u}">{number_format($store.yunfei, 2)}</span>元<br> 店铺合计(含运费):¥<span class="font-red" id="dr_order_total_{$u}">0.00</span>元 <span id="dr_order_total_score_{$u}">0</span>{SITE_SCORE} </div> </div> </div> </div> {/loop}
{loop $order_list $u $store} {if $myfield} {str_replace('data[', 'data['.$u.'][', $myfield)} {/if} {/loop}