From b5bd437d91478118ce3c7f1aa111b7a7759ec12e Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Thu, 23 Jan 2014 18:10:12 +0100 Subject: [PATCH] use count smarty function instead of loop for retrieving number of results --- templates/frontOffice/default/includes/menu.html | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/templates/frontOffice/default/includes/menu.html b/templates/frontOffice/default/includes/menu.html index de39f9fe6..a34e99a1e 100644 --- a/templates/frontOffice/default/includes/menu.html +++ b/templates/frontOffice/default/includes/menu.html @@ -20,19 +20,12 @@ {loop name="cat-parent-$level" type="category" parent=$parent} - {assign var="product_count" value="0"} - {loop name="product_count" type="product" category="{$ID}"} - {if $LOOP_COUNT == 1} - {assign var="product_count" value="{$LOOP_TOTAL}"} - {/if} - {/loop} - {if $CHILD_COUNT> 0}
  • {menu parent=$ID level=$level+1}
  • {else} -
  • {$TITLE} ({$product_count})
  • +
  • {$TITLE} ({count type="product" category="{$ID}"})
  • {/if} {/loop}