Page 1 of 1
Products - displaying all products from selected categories
Posted: Sat Jan 30, 2010 6:50 pm
by lollol
I have a single
Product-A in
three different categories: Bold 9000, Bold 9700, Curve 8900.
This
Code: Select all
{Products category="Bold 9000,Bold 9700,Curve 8900,Curve 8520,Storm 9520"}
... displays
Product-A three times...
Question:
Can I make it skip douplicate products in the list?
Thanks!
Re: Products - displaying all products from selected categories
Posted: Sun Jan 31, 2010 6:09 pm
by lollol
No one out there who can help with an idea?
Re: Products - displaying all products from selected categories
Posted: Sun Jan 31, 2010 7:13 pm
by jmcgin51
there must be a way within Smarty to check for duplicate product IDs in a result set, and only show the product ID once... don't know right off how it would be done.
Re: Products - displaying all products from selected categories
Posted: Mon Feb 01, 2010 11:04 am
by lollol
I have been thinking about the same thing... not a smarty guru tho

Here is the template code for the summary template, in case some wizz comes by

Thanks!
Code: Select all
<div class="ProductListWrap">
{if isset($catformstart)}
{$catformstart}
{$catdropdown}{$catbutton}
{$catformend}
{/if}
{if isset($pagecount) && $pagecount gt 1}
{$firstlink} {$prevlink} {$pagetext} {$curpage} {$oftext} {$pagecount} {$nextlink} {$lastlink}
{/if}
{assign var='counter' value=0}
{foreach from=$items item=entry}
<div class="ProductRow">
{foreach from=$entry->fields item=prod}
{if $prod->id == 2}
<div class="productImgholder"><img alt="{$entry->product_name}" src="{$entry->file_location}/{$prod->thumbnail}" /></div>
{/if}
{/foreach}
<div class="productDescWrap">
<div class="productTitle"><a href="{$entry->detail_url}&productName={$entry->product_name}">{$entry->product_name}</a></div>
<div class="productSummary">{$entry->details|substr:0:200}</div>
<div class="productButton"><a href="{$entry->detail_url}&productName={$entry->product_name}"><img alt="More info" src="uploads/images/btn-moreinfo.jpg"/></a></div>
</div>
<div class="devider"> </div>
</div>
<!-- {$counter++} -->
{if $counter >= 2}
{assign var='counter' value=0}
<div class="rowDevider"> </div>
{/if}
{/foreach}
</div>