This topic has 5 replies, 2 voices, and was last updated 9 years, 9 months ago ago by Eva Kemp
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
Hello,
As I see you have featured products shown.
Please provide us wp-admin panel credentials in Private Content.
Thank you.
Regards,
Eva Kemp.
I have fixed up-sells.php like this to display related products.
<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 ‘‘;
}
?>
<?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>`
Hello,
Is your issue resolved now?
Thank you.
Regards,
Eva Kemp.
You must be logged in to reply to this topic.Log in/Sign up