我正在使用最新版本的 EE2 和一个名为 Exp:resso store 的插件。
我将产品分配到一个类别,并且在大多数情况下,所有这些都运行良好。下面是我的代码:
<div class="col-md-7">
{exp:channel:categories channel="products" style="linear"}
<section class="section accordion repeater">
<h3>
{category_name}
<div class="icon">
<img src="/assets/local/img/plus-icon.jpg" alt="">
</div>
</h3>
<div class="accordion-content">
{exp:store:search orderby="title" sort="asc" category="{category_id}"}
{exp:store:product entry_id="{entry_id}"}
<p class="accordion-download">
<a href="#">{title} - {price}</a>
<span><a href="#"><img src="/assets/local/img/add-to-cart.jpg" alt="">Add to cart</a></span>
</p>
{/exp:store:product}
{/exp:store:search}
</div>
</section>
{/exp:channel:categories}
</div>
No products exist
如果类别中没有任何内容,我正在尝试找到一种显示消息的方法。我尝试使用{count}
, {total_results}
&{total_rows}
来检查是否没有任何产品。问题是我尝试的一切显然都是错误的,因为没有任何输出:/
提前致谢