RELATED PRODUCTS don't show ! - by tangduongtrieu

This topic has 5 replies, 2 voices, and was last updated 9 years, 8 months ago ago by Eva Kemp

  • Avatar: tangduongtrieu
    tangduongtrieu
    Participant
    March 15, 2015 at 10:22

    This theme is great.
    But I also encountered some problems

    RELATED PRODUCTS no show.

    my site: http://vn-shop.com/?product=modern-demo-fashion-bag

    Please, contact administrator
    for this information.
    4 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    March 15, 2015 at 11:44

    Hello,

    As I see you have featured products shown.
    Please provide us wp-admin panel credentials in Private Content.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: tangduongtrieu
    tangduongtrieu
    Participant
    March 16, 2015 at 10:59

    I have fixed up-sells.php like this to display related products.

    Please, contact administrator
    for this information.
    Avatar: tangduongtrieu
    tangduongtrieu
    Participant
    March 16, 2015 at 10:59

    <div class=”product-slider”>
    <h4 class=”slider-title”>Sản phẩm liên quan:</h4>
    <div id=”products-grid” style=”padding: 0;” class=”products_grid rows-count4″>
    <?php
    $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 8, ‘orderby’ => ‘rand’ );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post(); global $product;
    global $product, $post, $woocommerce_loop,$woocommerce;
    $product_page_productname = etheme_get_option(‘product_page_productname’);
    $product_page_price = etheme_get_option(‘product_page_price’);
    $product_page_addtocart = etheme_get_option(‘product_page_addtocart’);
    // Store loop count we’re currently on
    if ( empty( $woocommerce_loop[‘loop’] ) )
    $woocommerce_loop[‘loop’] = 0;

    // Store column count for displaying the grid
    if ( empty( $woocommerce_loop[‘columns’] ) )
    $woocommerce_loop[‘columns’] = apply_filters( ‘loop_shop_columns’, 4 );

    // Ensure visibilty
    if ( ! $product->is_visible() )
    return;

    // Increase loop count
    $woocommerce_loop[‘loop’]++;

    $columns = etheme_get_option(‘prodcuts_per_row’);
    $product_img_hover = etheme_get_option(‘product_img_hover’);

    $class = ”;
    if($woocommerce_loop[‘loop’]%$columns == 0){
    $class = ‘last’;
    }
    ?>

    <div class=”product-grid <?php echo $class; ?>”>
    <?php do_action( ‘woocommerce_before_shop_loop_item’ ); ?>
    <?php woocommerce_get_template( ‘loop/sale-flash.php’ ); ?>
    <?php
    $placeholder_width = 400;
    $placeholder_height = 400;
    if ( has_post_thumbnail() ){
    ?>
    ID, 400, 400, false ) ?>” href=”<?php echo the_permalink(); ?>” class=”product-image <?php if($product_img_hover == ‘tooltip’): ?>imageTooltip<?php endif; ?>”>
    <?php if(etheme_get_custom_field(‘_etheme_hover’) && $product_img_hover == ‘swap’): ?><div class=”img-wrapper”>“/></div><?php endif; ?>
    <div class=”img-wrapper<?php if(etheme_get_custom_field(‘_etheme_hover’) && $product_img_hover == ‘swap’) echo ‘ hover-hide-image ‘ ?>”>ID, 400, 400, false ) ?>”/></div>

    <?php
    }
    else {
    echo ‘Placeholder‘;
    }
    ?>
    <?php if($product_page_productname || $product_page_price || $product_page_addtocart): ?>
    <div class=”product-information”>
    <div class=”product-name-price”>
    <?php if($product_page_productname): ?>
    <div class=”product-name”>“><?php the_title(); ?></div>
    <?php endif; ?>

    <?php if($product_page_price): ?>
    <?php do_action( ‘woocommerce_after_shop_loop_item_title’ ); ?>
    <?php endif; ?>
    <div class=”clear”></div>
    </div>
    <?php if($product_page_addtocart): ?>
    <?php do_action( ‘woocommerce_after_shop_loop_item’ ); ?>
    <?php endif; ?>
    <div class=”clear”></div>
    </div>
    <?php endif; ?>
    <div class=”clear”></div>
    </div>
    <?php
    if($woocommerce_loop[‘loop’]%$columns == 0){
    echo ‘<div class=”clear”></div><hr style=”visibility:hidden;”/>’;
    }?>

    <?php endwhile; ?>
    <?php wp_reset_query(); ?>
    </div>

    <div class=”clear”></div>
    <script type=”text/javascript”>imageTooltip(jQuery(‘.imageTooltip’))</script>
    <div class=”clear”></div>
    </div>
    <div class=”clear”></div>`

    Avatar: Eva
    Eva Kemp
    Support staff
    March 16, 2015 at 22:29

    Hello,

    Is your issue resolved now?

    Thank you.
    Regards,
    Eva Kemp.

  • Viewing 5 results - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.