diff --git a/core/lib/Thelia/Core/Template/Loop/Category.php b/core/lib/Thelia/Core/Template/Loop/Category.php index bd1c32de2..df993c62d 100755 --- a/core/lib/Thelia/Core/Template/Loop/Category.php +++ b/core/lib/Thelia/Core/Template/Loop/Category.php @@ -206,7 +206,8 @@ class Category extends BaseI18nLoop ->set("POSTSCRIPTUM", $category->getVirtualColumn('i18n_POSTSCRIPTUM')) ->set("PARENT", $category->getParent()) ->set("URL", $category->getUrl($locale)) - ->set("PRODUCT_COUNT", $category->countChild()) + ->set("PRODUCT_COUNT", $category->countAllProducts()) + ->set("CHILD_COUNT", $category->getCount()) ->set("VISIBLE", $category->getVisible() ? "1" : "0") ->set("POSITION", $category->getPosition()) diff --git a/core/lib/Thelia/Core/Template/Loop/Folder.php b/core/lib/Thelia/Core/Template/Loop/Folder.php index cfd54db4f..5c56dff94 100755 --- a/core/lib/Thelia/Core/Template/Loop/Folder.php +++ b/core/lib/Thelia/Core/Template/Loop/Folder.php @@ -162,7 +162,8 @@ class Folder extends BaseI18nLoop ->set("POSTSCRIPTUM", $folder->getVirtualColumn('i18n_POSTSCRIPTUM')) ->set("PARENT", $folder->getParent()) ->set("URL", $folder->getUrl($locale)) - ->set("CONTENT_COUNT", $folder->countChild()) + ->set("CHILD_COUNT", $folder->countChild()) + ->set("CONTENT_COUNT", $folder->countAllContents()) ->set("VISIBLE", $folder->getVisible() ? "1" : "0") ->set("POSITION", $folder->getPosition()) ; diff --git a/core/lib/Thelia/Model/Tools/UrlRewritingTrait.php b/core/lib/Thelia/Model/Tools/UrlRewritingTrait.php index 19947efa6..0a8af40c8 100644 --- a/core/lib/Thelia/Model/Tools/UrlRewritingTrait.php +++ b/core/lib/Thelia/Model/Tools/UrlRewritingTrait.php @@ -44,8 +44,11 @@ trait UrlRewritingTrait { * * @param string $locale a valid locale (e.g. en_US) */ - public function getUrl($locale) + public function getUrl($locale = null) { + if(null === $locale) { + $locale = $this->getLocale(); + } return URL::getInstance()->retrieve($this->getRewrittenUrlViewName(), $this->getId(), $locale)->toString(); } diff --git a/templates/default/category.html b/templates/default/category.html index 153dafc9d..ba1574072 100644 --- a/templates/default/category.html +++ b/templates/default/category.html @@ -77,16 +77,16 @@ {if $IS_PROMO } {loop name="productSaleElements_promo" type="product_sale_elements" product=$ID limit="1" order="min_price"} {assign var="default_product_sale_elements" value=$ID} - {intl l="Special Price:"} {format_number number="{$TAXED_PROMO_PRICE}"} {currency attr="symbol"} - {intl l="Regular Price:"} {format_number number="{$TAXED_PRICE}"} {currency attr="symbol"} + {intl l="Special Price:"} {format_number number=$TAXED_PROMO_PRICE} {currency attr="symbol"} + {intl l="Regular Price:"} {format_number number=$TAXED_PRICE} {currency attr="symbol"} {/loop} {else} - {format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"} + {format_number number=$BEST_TAXED_PRICE} {currency attr="symbol"} {/if}