{$_cart_url = $wa->getUrl('shop/frontend/cart')} {if method_exists($wa->shop, 'checkout')} {$_cart_url = $wa->shop->checkout()->cartUrl()} {/if} {if !empty($sorting)} {$sort_fields = [ 'name' => _w('Name'), 'price' => _w('Price'), 'total_sales' => _w('Bestsellers'), 'rating' => _w('Customer rating'), 'create_datetime'=>_w('Date added'), 'stock' => _w('In stock')]} {if !isset($active_sort)} {$active_sort = $wa->get('sort', 'create_datetime')} {/if} {/if} {if $wa->shop->cart->total() > 0}{$add2cart_label = _wd('shop', 'Add to cart')}{else}{$add2cart_label = _wd('shop', 'Buy')}{/if} {if isset($pages_count) && $pages_count > 1}
{wa_pagination total=$pages_count attrs=['class' => "menu-h"]}
{/if}