fontsstyle = parent::alanah_fonts_styles(); //Make close Div globally for current class $this->close_wrap = $this->close_wrapper = ''; } /** * Print Start Ratings on Shop loop */ public static function alanah_print_stars() { if ( get_option('woocommerce_enable_review_rating') != 'yes' ) return false; //Count Overall ratings $count = parent::wpdb_count( 'COUNT' ); //Sum of reviews $rating = parent::wpdb_count( 'SUM' ); if ( $count > 0 ) { $average = number_format( $rating / $count, 2 ); echo '
' . $average . '
'; } } /** * Woo subcategories thumbnail overide */ public function woo_subcategories_thumb( $category ) { $small_thumbnail_size = apply_filters( 'single_product_small_thumbnail_size', 'shop_catalog' ); $dimensions = wc_get_image_size( $small_thumbnail_size ); $thumbnail_id = get_term_meta( $category->term_id, 'thumbnail_id', true ); if ( $thumbnail_id ) { $image = wp_get_attachment_image_url( $thumbnail_id, 'alanah-categories' ); } else { $image = wc_placeholder_img_src(); } if ( $image ) echo '' . $category->name . ''; } //End woo_subcategories_thumb /** * woocommerce Categories widget */ public function alanah_wc_categories_menu( $title = '', $orderby = 'name', $hide_empty = false ) { global $wp_query; $this->alanah_wrap = '
'; $output = $this->alanah_wrap; if( $title !== '' ) : $output .= '
' . $title . '
'; endif; $output .= ''; $output .= $this->close_wrap; return $output; } //alanah_wc_categories_menu /** * Woocommerce mini cart */ public function alanah_mini_cart() { $output = ''; $output .= '   ' . WC()->cart->get_cart_subtotal() . ' '; return $output; } /** * Add product badgers */ public function alanah_wc_product_label() { $count_labels = 0; echo ALANAH_HANDLERS::woo_product_labels( $count_labels ); } /** * Alanah product slider callback */ public function alanah_wc_product_carousel( $args, $cols, $direction, $scroll, $autoplay, $title, $timer, $expirydate, $ID = false, $class = '' ) { //unique box id $boxid = $this->alanah_random_string( 8 ); $box_class = $class . ' cols-' . $cols; if( $direction == 'true' || is_rtl() ) : $this->layout_direction = 'rtl'; $direction = 'true'; endif; $this->alanah_wrap = '