求助管理员!!!!!!

2020-12-01 10:00

<!--{foreach $volist_productcategory  as $volist}-->

      
        
  <!--{$volist.catename}-->
     
<!--{/foreach}-->


这样可以取出  catename   那么我要加条件限制怎么取 ?    比如类别ID小于5的数据。。


如果  <!--{foreach name=product_catdata item=volist from=Mod_Product::volist("AND v.cateid=1","",0)}-->
          循环输出<!--{$volist.产品字段名}-->
            <!--{/foreach}-->

   只能取product表中数据  无法关联 productcate 中的productname

2975 次浏览 2 条评论 收藏

说说我的看法

登录后可以发表评论 登录
2个评论
-- 楼主 2020-12-01 10:00
非常感谢
回复
-- 2020-12-01 10:00
输出cateid小于5的一级分类

<!--{assign var=\'category\' value=Mod_Product::category(\"AND c.cateid<5\",\"\",0)}-->
<!--{foreach $category as $volist}-->
<a href=\"<!--{$volist.url}-->\"><!--{$volist.catename}--></a>
<!--{/foreach}-->

输出分类ID小于5的产品数据
<!--{assign var=\'product\' value=Mod_Product::product(\"AND v.cateid<5\",\"\",0)}-->
<!--{foreach $product as $volist}-->
<a href=\"<!--{$volist.caturl}-->\"><!--{$volist.catename}--></a>
<a href=\"<!--{$volist.url}-->\"><!--{$volist.productname}--></a>
<!--{/foreach}-->
回复
作者信息

26
贴子
0
粉丝
热门贴子

免费试用


咨询热线


在线咨询