'; global $product, $post; $current_product = $product; $product_id = $current_product->get_id(); $product_type = $current_product->get_type(); if( function_exists('yith_wishlist_constructor') ) { echo ' '; } if( function_exists('yith_woocompare_constructor') ) { $args = array( 'action' => 'yith-woocompare-add-product', 'id' => $product_id ); $lang = defined( 'ICL_LANGUAGE_CODE' ) ? ICL_LANGUAGE_CODE : false; if( $lang ) { $args['lang'] = $lang; } $url = esc_url_raw( add_query_arg( $args, home_url() ) ); echo 'oo'; } if( function_exists('yith_wcqv_init') ) { echo ' '; } echo ''; } /**===================================== * For Image Flip *=======================================*/ function store_hub_remove_default_image(){ remove_action( 'woocommerce_before_shop_loop_item_title','wpparallax_product_wrap', 10 ); } add_action('init','store_hub_remove_default_image'); add_action ( 'woocommerce_before_shop_loop_item_title', 'store_hub_product_thumb_wrapp',10); if( ! function_exists('store_hub_product_thumb_wrapp') ){ function store_hub_product_thumb_wrapp(){ $is_flip = get_theme_mod('shop_image_flip','true'); $gallery = get_post_meta(get_the_ID(), '_product_image_gallery', true); if($gallery == '' || $is_flip == false){ $class = 'no-flip'; }else{ $class = 'flip'; } $size = 'shop_catalog'; echo '
'; echo '
'; echo woocommerce_template_loop_product_thumbnail($size); echo '
'; if($is_flip == true){ store_hub_product_thumbnail_hover(); } echo '
'; } } function store_hub_product_thumbnail_hover() { $change_hover_image = true; if( ! $change_hover_image ) return; $id = get_the_ID(); $size = 'shop_catalog'; $gallery = get_post_meta($id, '_product_image_gallery', true); $attachment_image = ''; if (!empty($gallery) && $change_hover_image ) { $gallery = explode(',', $gallery); if ( $change_hover_image ) { $first_image_id = $gallery[0]; $attachment_image = wp_get_attachment_image($first_image_id , $size, false, array('class' => 'hover-image')); } echo '
'; // show images echo wp_kses_post($attachment_image); echo '
'; } } //Off Canvas Cart add_action('wp_parallax_before_footer','store_hub_offcanvas_cart',0); function store_hub_offcanvas_cart(){ $cart_enable = get_theme_mod('wp_parallax_show_mini_cart','show'); $mini_layout = get_theme_mod('wp_parallax_minicart_layout','offcanvas'); $minicart_heading = get_theme_mod('wpparallax_minicart_label',__('Shopping Cart Items','store-hub')); if($cart_enable == 'show' && $mini_layout=='offcanvas'){ ?>