Single Products not working on ShoppyStore theme
-
Hi i was using ShoppyStore theme and the badge in single product is not working homepage and category badge is working fine only the single product is having some issue.
Based on the previous issue posted here also using ShoppyStore theme you recommend some changes on the code under product-image.php but comparing the code posted its has different code.
Please see code below for product-images.php, could you please help me what need to changes here.
<div id="product_img_<?php echo esc_attr( $post->ID ); ?>" class="woocommerce-product-gallery woocommerce-product-gallery--with-images images product-images loading" data-vertical="<?php echo ( ($sidebar_product == 'full' && $pdetail_layout == 'default') ||( $sidebar_product == 'full' && $pdetail_layout == 'full1') || ( $sidebar_product == 'lr' && $pdetail_layout == 'full3') ) ? 'true' : 'false'; ?>" data-video="<?php echo ( $ya_featured_video != '' ) ? esc_url( 'https://www.youtube.com/embed/' . $ya_featured_video ) : ''; ?>"> <figure class="woocommerce-product-gallery__wrapper"> <?php sw_label_sales(); ?> <div class="product-images-container clearfix <?php echo ( ($sidebar_product == 'full' && $pdetail_layout == 'default') ||( $sidebar_product == 'full' && $pdetail_layout == 'full1') || ( $sidebar_product == 'lr' && $pdetail_layout == 'full3') ) ? 'thumbnail-left' : 'thumbnail-bottom'; ?>"> <?php $attachments = ( sw_woocommerce_version_check( '3.0' ) ) ? $product->get_gallery_image_ids() : $product->get_gallery_attachment_ids(); if( has_post_thumbnail() ){ $image_id = get_post_thumbnail_id(); array_unshift( $attachments, $image_id ); $attachments = array_unique( $attachments ); } if( sizeof( $attachments ) ){ ?> <?php if( ($sidebar_product == 'full' && $pdetail_layout == 'default') || ($sidebar_product == 'full' && $pdetail_layout == 'full1') || ( $sidebar_product == 'lr' && $pdetail_layout == 'full3') ){ do_action('woocommerce_product_thumbnails'); } ?> <!-- Image Slider --> <div class="slider product-responsive"> <?php foreach ( $attachments as $key => $attachment ) { $full_size_image = wp_get_attachment_image_src( $attachment, 'full' ); $attributes = array( 'class' => 'wp-post-image', 'title' => get_post_field( 'post_title', $post_thumbnail_id ), 'data-caption' => get_post_field( 'post_excerpt', $post_thumbnail_id ), 'data-src' => $full_size_image[0], 'data-large_image' => $full_size_image[0], 'data-large_image_width' => $full_size_image[1], 'data-large_image_height' => $full_size_image[2], ); ?> <div data-thumb="<?php echo wp_get_attachment_image_url( $attachment, 'shop_thumbnail' ) ?>" class="woocommerce-product-gallery__image"> <a href="<?php echo wp_get_attachment_url( $attachment ) ?>"><?php echo wp_get_attachment_image( $attachment, 'shop_single', false, $attributes ); ?></a> </div> <?php } ?> </div> <!-- Thumbnail Slider --> <?php if( $sidebar_product == 'left' || $sidebar_product == 'right' || ($sidebar_product == 'full' && $pdetail_layout == 'full2') ){ do_action('woocommerce_product_thumbnails'); } ?> <?php }else{ echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<img src="%s" alt="%s" />', wc_placeholder_img_src(), __( 'Placeholder', 'shoppystore' ) ), $post->ID ); } ?> </div> </figure> </div>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Single Products not working on ShoppyStore theme’ is closed to new replies.