cart->get_cart_contents_count());
echo ($cart_items != 0) ? '' . intval($cart_items) . '' : '';
?>
is_on_sale()):
echo apply_filters('hypermarket_show_product_loop_sale_flash_markup', '
' . esc_html__('Sale', 'hypermarket') . '', $post, $product);
endif;
endif;
}
endif;
// ======================================================================
// Hooked into "woocommerce_before_shop_loop_item_title"
// ======================================================================
/**
* Shop tools (Button(s)) wrapper start tag.
*
* @package Hooked into "woocommerce_before_shop_loop_item_title"
* @since 1.0.0
*/
if (!function_exists('hypermarket_shop_item_tools_wrapper_start')):
function hypermarket_shop_item_tools_wrapper_start()
{
if (hypermarket_is_woocommerce_activated()):
?>
' . esc_html(get_the_title()) . '';
endif;
}
endif;
/**
* Shop item price(s).
*
* @package Hooked into "woocommerce_after_shop_loop_item"
* @since 1.0.4.2
*/
if (!function_exists('hypermarket_template_loop_price')):
function hypermarket_template_loop_price()
{
if (hypermarket_is_woocommerce_activated()):
global $product;
if ($price_html = $product->get_price_html()):
echo '
';
echo wp_kses($price_html, array(
'a' => array(
'id' => array() ,
'href' => array() ,
'title' => array() ,
'class' => array()
) ,
'span' => array(
'id' => array() ,
'class' => array()
),
'del' => array(
'id' => array() ,
'class' => array()
),
'ins' => array(
'id' => array() ,
'class' => array()
)
));
echo '';
endif;
endif;
}
endif;
/**
* Shop item details wrapper end tag.
*
* @package Hooked into "woocommerce_after_shop_loop_item"
* @since 1.0.0
*/
if (!function_exists('hypermarket_shop_item_details_wrapper_end')):
function hypermarket_shop_item_details_wrapper_end()
{
if (hypermarket_is_woocommerce_activated()):
?>
';
}
endif;
// ======================================================================
// Hooked into "subcategory_archive_thumbnail_size"
// ======================================================================
/**
* Subcategory thumbnails size.
*
* @package Hooked into "subcategory_archive_thumbnail_size"
* @since 1.0.4
*/
if (!function_exists('hypermarket_subcategory_archive_thumbnail_size')):
function hypermarket_subcategory_archive_thumbnail_size()
{
return 'full';
}
endif;
// ======================================================================
// Hooked into "woocommerce_shop_loop_subcategory_title"
// ======================================================================
/**
* Show the subcategory title in the product loop.
*
* @package Hooked into "woocommerce_shop_loop_subcategory_title"
* @since 1.0.4.1
*/
if (!function_exists('hypermarket_template_loop_subcategory_title')):
function hypermarket_template_loop_subcategory_title($category)
{
echo esc_html($category->name);
}
endif;
// ======================================================================
// Hooked into "woocommerce_before_single_product"
// ======================================================================
/**
* Navigation to next/previous set of products.
*
* @package Hooked into "woocommerce_before_single_product"
* @since 1.0.0
*/
if (!function_exists('hypermarket_product_paging_navigation')):
function hypermarket_product_paging_navigation()
{
if (hypermarket_is_woocommerce_activated()):
get_template_part('template-parts/woocommerce/hypermarket-product-paging-navigation');
endif;
}
endif;
/**
* WooCommerce notice wrapper start tag(s).
*
* @package Hooked into "woocommerce_before_single_product"
* @since 1.0.2
*/
if (!function_exists('hypermarket_product_notice_wrapper_start')):
function hypermarket_product_notice_wrapper_start()
{
if (hypermarket_is_woocommerce_activated()):
?>
');
break;
endswitch;
endif;
return $translated_text;
}
endif;
// ======================================================================
// Hooked into "woocommerce_review_order_before_submit"
// ======================================================================
/**
* Back to cart button.
*
* @package Hooked into "woocommerce_review_order_before_submit"
* @since 1.0.4.1
*/
if (!function_exists('hypermarket_back_to_cart_btn_before_submit')):
function hypermarket_back_to_cart_btn_before_submit()
{
if (hypermarket_is_woocommerce_activated()):
echo '';
echo '';
esc_html_e('Back To Cart', 'hypermarket');
echo '';
endif;
}
endif;
// ======================================================================
// Hooked into "woocommerce_no_products_found"
// ======================================================================
/**
* No products are found matching the current query.
*
* @package Hooked into "woocommerce_no_products_found"
* @since 1.0.4
*/
if (!function_exists('hypermarket_no_products_found')):
function hypermarket_no_products_found()
{
if (hypermarket_is_woocommerce_activated()):
get_template_part('template-parts/woocommerce/hypermarket-no-products-found');
endif;
}
endif;