Tagged: x
-
AuthorPosts
-
December 8, 2016 at 11:25 am #1286309
argonstudiosParticipantHello,
I have been searching through your forums to find a way to clean up the image sizes that X looks to skew a bit. My site product images were perfect with our last theme (themify) but we need to clean up other aspects of the site which X has done beautifully with the exception of the Woocommerce side of things.
Since the forum post I am listing below is over a year old and you have applied updates to the theme, can you confirm and/or update the code that I need to use to fix my Woocommerce image issue please?
Your forum post that I am referencing is here:
https://community.theme.co/forums/topic/woocommerce-product-sizes-in-x-theme/Thank you!
December 8, 2016 at 1:28 pm #1286461
Nabeel AModeratorHi there,
Thanks for writing in! You can try adding the following code in your child theme’s functions.php file:
add_action('init', 'default_woocommerce_thumbnails', 99 ); function default_woocommerce_thumbnails() { remove_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_product_thumbnails', 10 ); add_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_thumbnail_v2', 99 ); } function x_woocommerce_shop_thumbnail_v2() { GLOBAL $product; $stack = x_get_stack(); $stack_thumb = 'shop_catalog'; $stack_shop_thumb = $stack_thumb; $id = get_the_ID(); $rating = $product->get_rating_html(); woocommerce_show_product_sale_flash(); echo '<div class="entry-featured">'; echo '<a href="' . get_the_permalink() . '">'; echo get_the_post_thumbnail( $id , $stack_shop_thumb ); if ( ! empty( $rating ) ) { echo '<div class="star-rating-container aggregate">' . $rating . '</div>'; } echo '</a>'; echo "</div>"; }Let us know how this goes!
December 9, 2016 at 5:11 pm #1287836
argonstudiosParticipantThe code looks like it made the images consistent across the site, but they looked like the category images which are vertical and I need them to be like the sub-category is formatted now like this page so that the images are not cutoff:
http://www.economycandy.com/product-category/candy/candy-bars-candy/Can we adjust that code to accomplish this?
Thank you.
December 9, 2016 at 10:40 pm #1288107
Rue NelModeratorHello There,
Thanks for updating in and for the clarifications. To have a better control of the product images and make sure that you use the default WooCommerce product sizes, please check out this thread: https://community.theme.co/forums/topic/product-images-woocommerce/#post-224057
Please let us know how it goes.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1286309 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
