';
}
if ( ! function_exists( 'bevro_woo_shop_thumbnail_wrap_start' ) ){
/**
* Thumbnail wrap start.
*/
function bevro_woo_shop_thumbnail_wrap_start(){
echo '
';
}
}
if ( ! function_exists( 'bevro_woo_shop_thumbnail_wrap_end' ) ){
/**
* Thumbnail wrap end.
*/
function bevro_woo_shop_thumbnail_wrap_end(){
echo '
';
}
}
if ( ! function_exists( 'bevro_woo_woocommerce_template_loop_product_title' ) ) {
/**
* Show the product title in the product loop. By default this is an H2.
*/
function bevro_woo_woocommerce_template_loop_product_title() {
echo '';
woocommerce_template_loop_product_title();
echo '';
}
}
/**
* Shop page - Short Description
*/
if ( ! function_exists( 'bevro_woo_shop_product_short_description' ) ) :
/**
* Product short description
*
* @hooked woocommerce_after_shop_loop_item
*
* @since 1.1.0
*/
function bevro_woo_shop_product_short_description() {
?>
get_categories( ';', '', '' );
$product_categories = htmlspecialchars_decode( strip_tags( $product_categories ) );
if ( $product_categories ) {
list( $parent_cat ) = explode( ';', $product_categories );
echo esc_html( $parent_cat );
}
?>
';
do_action( 'bevro_woo_shop_summary_wrap_top' );
foreach ( $shop_structure as $value ){
switch ( $value ){
case 'title':
/**
* Add Product Title on shop page for all products.
*/
do_action( 'bevro_woo_shop_title_before' );
bevro_woo_woocommerce_template_loop_product_title();
do_action( 'bevro_woo_shop_title_after' );
break;
case 'price':
/**
* Add Product Price on shop page for all products.
*/
do_action( 'bevro_woo_shop_price_before' );
woocommerce_template_loop_price();
do_action( 'bevro_woo_shop_price_after' );
break;
case 'ratings':
/**
* Add rating on shop page for all products.
*/
do_action( 'bevro_woo_shop_rating_before' );
woocommerce_template_loop_rating();
do_action( 'bevro_woo_shop_rating_after' );
break;
case 'short_desc':
do_action( 'bevro_woo_shop_short_description_before' );
bevro_woo_shop_product_short_description();
do_action( 'bevro_woo_shop_short_description_after' );
break;
case 'add_cart':
do_action( 'bevro_woo_shop_add_to_cart_before' );
woocommerce_template_loop_add_to_cart();
do_action( 'bevro_woo_shop_add_to_cart_after' );
break;
case 'category':
/**
* Add and/or Remove Categories from shop archive page.
*/
do_action( 'bevro_woo_shop_category_before' );
bevro_woo_shop_parent_category();
do_action( 'bevro_woo_shop_category_after' );
break;
default:
break;
}
}
do_action( 'bevro_woo_shop_summary_wrap_bottom' );
echo '';
do_action( 'bevro_woo_shop_after_summary_wrap' );
}
}
}
// search widget style
if ( ! function_exists( 'bevro_custom_product_searchform' ) ){
function bevro_custom_product_searchform( $form ){
$form = '';
return $form;
}
}
/**********************/
// Add to cart
/**********************/
/**
* Query WooCommerce activation
*/
function bevro_is_woocommerce_activated(){
return class_exists( 'woocommerce' ) ? true : false;
}
if ( ! function_exists( 'bevro_cart_total_item' ) ){
/**
* Cart Link
* Displayed a link to the cart including the number of items present and the cart total
*/
function bevro_cart_total_item(){
global $woocommerce;
$bevro_woo_cart_disable = get_theme_mod('bevro_woo_cart_disable','icon');
$ordertotal = wp_kses_data( $woocommerce->cart->get_total() );
$productadd = wp_kses_data($woocommerce->cart->cart_contents_count);
?>
cart->cart_contents_count); ?>cart->cart_contents_count); ?>