Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi,

    Thanks for asking.
    The field to select a badge in the Admin Product Edit page is now on the right, after Product Gallery.
    You can see it in this screenshot.

    Best Regards
    Yithemes

    Thread Starter kelestor

    (@kelestor)

    Hello and thanks for your response!
    I found the option in the Product Admin page.

    What i also discovered is that:
    – the “Hide ‘On sale’ badge” setting does not work… i still have the sales badge.
    – when the plugin is active… there is no images on any product at all!

    Any hints?
    Thanks

    Thread Starter kelestor

    (@kelestor)

    To help you, I am using:
    – WordPress 4.2.3
    – Woocommerce 2.3.13
    – Avada Theme 3.8.5

    I have already tried deactivating all plugins but WC and your plugin. Still no images.
    Note: All my images are pngs.
    Thanks for any help.

    Plugin Author YITHEMES

    (@yithemes)

    Hi,

    We tested YITH WooCommerce Badge Management with your Theme.
    It works, but the images of your theme are placed over the badges.

    You can easyly fix this issue editing the file woocommerce.css in your theme folder [ wp-content/themes/Avada/assets/css/woocommerce.css ].
    You have to replace line 582
    z-index: 50;

    with this:
    z-index: 9;

    In this way, all badges will be visible in your site!

    Best Regards!
    Yithemes

    Thread Starter kelestor

    (@kelestor)

    Hello again and thank you for your response!

    You are right that badges were not visible and your code-change has helped display them.

    Nevertheless, the main problem i am facing was not in the product catalog view, but in each single product’s profile/page. Whenever i activate you plugin i get no primary image displayed for the product. If i add more pictures to the product’s gallery, i do get the thumbnails… but no main picture displayed or updated when i click the thumbnails.

    I know the problem is due to an incompatibility of Avada, because when i switch to Storefront Theme, your plugin is functioning as expected.

    I hope you can help me resolve this.
    I am really interested in purchasing premium features, but i cannot do that now.

    Thank you for the feedback and support!

    Plugin Author YITHEMES

    (@yithemes)

    Hi,

    You don’t see the primary image on Single Product Page because your theme changes the standard WooCommerce template for Single Product Page.

    You can fix this issue editing product-image.php in wp-content/themes/Avada/woocommerce/single-product/

    you have to replace the content of the file with the following code:

    <?php
    /**
     * Single Product Image
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version	 2.0.14
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $post, $smof_data, $woocommerce, $product;
    
    if( $smof_data['disable_woo_gallery'] ) {
    	include WC()->plugin_path() . '/templates/single-product/product-image.php';
    	return;
    }
    ?>
    <div class="images">
    <?php
    $my_html = '<div id="slider" class="fusion-flexslider"><ul class="slides">';
    ?>
    
    			<?php
    				$attachment_count   = count( $product->get_gallery_attachment_ids() );
    
    				if ( $attachment_count > 0 ) {
    					$gallery = '[product-gallery]';
    				} else {
    					$gallery = '[]';
    				}			
    
    				if ( has_post_thumbnail() ) {
    
    					$image_title 		= esc_attr( get_the_title( get_post_thumbnail_id() ) );
    					$image_link  		= wp_get_attachment_url( get_post_thumbnail_id() );
    					$image	   			= get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(
    						'title' => $image_title
    						) );
    
    					// Avada Edit
    					//echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<li><a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-rel="iLightbox' . $gallery . '">%s</a></li>', $image_link, $image_title, $image ), $post->ID );
    					$my_html .= sprintf( '<li><a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-rel="iLightbox' . $gallery . '">%s</a></li>', $image_link, $image_title, $image );
    
    				} else {
    
    					echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<li><img src="%s" alt="Placeholder" /></li>', wc_placeholder_img_src() ), $post->ID );
    					$my_html .= sprintf( '<li><img src="%s" alt="Placeholder" /></li>', wc_placeholder_img_src() );
    
    				}
    
    				/**
    				 * From product-thumbnails.php
    				 */
    				$attachment_ids = $product->get_gallery_attachment_ids();
    
    				$loop = 0;
    				// Avada Edit
    				//$columns = apply_filters( 'woocommerce_product_thumbnails_columns', 3 );
    
    				foreach ( $attachment_ids as $attachment_id ) {
    					// Avada Edit
    					/*
    					$classes = array( 'zoom' );
    
    					if ( $loop == 0 || $loop % $columns == 0 )
    						$classes[] = 'first';
    
    					if ( ( $loop + 1 ) % $columns == 0 )
    						$classes[] = 'last';
    					*/
    					$classes[] = 'image-'.$attachment_id;
    
    					$image_link = wp_get_attachment_url( $attachment_id );
    
    					if ( ! $image_link )
    						continue;
    
    					// Avada Edit
    					// modified image size to shop_single from thumbnail
    					$image	   = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_single' ) );
    					$image_class = esc_attr( implode( ' ', $classes ) );
    					$image_title = esc_attr( get_the_title( $attachment_id ) );
    
    					// Avada Edit
    					//echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<li><a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-rel="iLightbox' . $gallery . '">%s</a></li>', $image_link, $image_title, $image ), $attachment_id, $post->ID, $image_class );
    					//echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<a href="%s" class="%s" title="%s" data-rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_title, $image ), $attachment_id, $post->ID, $image_class );
    					$my_html .= sprintf( '<li><a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-rel="iLightbox' . $gallery . '">%s</a></li>', $image_link, $image_title, $image );
    					$loop++;
    				}	
    
    	$my_html .= '</ul></div>';
    	echo apply_filters( 'woocommerce_single_product_image_html', $my_html, $post->ID );
    			?>
    
    	<?php do_action( 'woocommerce_product_thumbnails' ); ?>
    
    </div>

    In this way you’ll see primary images in Single Product Page, but you’ll see more badges.
    To fix this you have to edit class.yith-wcbm-frontend.php in wp-content/plugins/yith-woocommerce-badge-management/
    You have to replace line 82:

    if( ! $this->is_in_sidebar() ){

    with this code:

    if( ! $this->is_in_sidebar() && ! is_product() ){

    Best Regards
    Yithemes

    Thread Starter kelestor

    (@kelestor)

    I apologize for the late reply.
    I had to use an alternative plugin for badges.

    Nevertheless I tried the fix and your plugin works as intended!
    Very good support.
    Thank you!

    Plugin Author YITHEMES

    (@yithemes)

    Thanks to you!
    If you like our plugins and support, please give us 5 stars!

    Best Regards!
    Yithemes

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Support needed! The plugin does not work.’ is closed to new replies.