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