fix count child on folder and category folder. Doubitch
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
@@ -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())
|
||||
;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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}
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number="{$TAXED_PROMO_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number=$TAXED_PROMO_PRICE} {currency attr="symbol"}</span></span>
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number=$TAXED_PRICE} {currency attr="symbol"}</span></span>
|
||||
{/loop}
|
||||
{else}
|
||||
<span class="regular-price"><span itemprop="price" class="price">{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
<span class="regular-price"><span itemprop="price" class="price">{format_number number=$BEST_TAXED_PRICE} {currency attr="symbol"}</span></span>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="product-btn">
|
||||
<a class="btn btn-cart" href="#">Add to cart</a>
|
||||
<button class="btn btn-cart">Add to cart</button>
|
||||
</div>
|
||||
</div>
|
||||
</article><!-- /product -->
|
||||
@@ -101,9 +101,14 @@
|
||||
<aside class="col-left" role="complementary" itemscope itemtype="http://schema.org/WPSideBar">
|
||||
|
||||
<section id="categories" class="block block-nav" role="navigation" aria-labelledby="categories-label">
|
||||
<div class="block-heading"><h3 class="block-title" id="categories-label">Categories</h3></div>
|
||||
<div class="block-heading"><h3 class="block-title" id="categories-label">{intl l="Categories"}</h3></div>
|
||||
<div class="block-content">
|
||||
<nav class="nav-categories">
|
||||
{loop name="cat-parent" type="category-tree" category="0"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" >{$LEVEL} {$ID} {$PARENT} {$TITLE}</option>
|
||||
{/loop}
|
||||
|
||||
|
||||
<ul id="category" class="accordion">
|
||||
<li>
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#category" href="#collapse1">Category 1 <span class="amount">(3)</span></a>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</span><!-- /.sort-by -->
|
||||
|
||||
<span class="view-mode">
|
||||
<span class="view-mode-label">View as:</span>
|
||||
<span class="view-mode-label">{intl l="View as"}:</span>
|
||||
<span class="view-mode-btn">
|
||||
<a href="?mode=grid" data-toggle="view" role="button" class="btn btn-grid"><i class="icon-grid"></i></a>
|
||||
<a href="?mode=list" data-toggle="view" role="button" class="btn btn-list "><i class="icon-list"></i></a>
|
||||
@@ -38,7 +38,7 @@
|
||||
</div><!-- /.sorter -->
|
||||
|
||||
<div class="pagination-container" role="pagination" aria-labelledby="pagination-label-{$toolbar}">
|
||||
<strong id="pagination-label-{$toolbar}" class="pagination-label">Pagination</strong>
|
||||
<strong id="pagination-label-{$toolbar}" class="pagination-label">{intl l="Pagination"}</strong>
|
||||
<ul class="pagination">
|
||||
<li><a href="?page=<?php echo $page-1; ?>" class="prev"><i class="icon-prev"></i></a></li>
|
||||
<li class="active"><a href="?page=1" tabindex="-1"'; >1</a></li>
|
||||
|
||||
Reference in New Issue
Block a user