Tagged: devin-docs, Image resize, woocommerce
-
AuthorPosts
-
January 24, 2014 at 7:35 pm #214556
Hi,
Is there a way to resize the product image without touching the css? The woocommece image resize does not resize anything. even using the thumbnail generator.
Also, I have noticed that using a sidebar on a single product page does not appear on the left or right but rather under the product. Is this normal?
Thanks,
DJanuary 27, 2014 at 7:58 pm #215472Hey dhuet!
Yes, the sidebar appears under the image as intended by the theme.
The woocommerce resize should change the root size of the image displayed. Its the css/html container which determines how the image is shown on the front end. So just changing the image size would never increase that container.
Cheers!
DevinJanuary 28, 2014 at 12:11 am #215576Which styles should I do that?
Do you have some custom style for the woocommerce located in the enfol css directory? or should edit the style from the woocommerce plug-in location?
January 29, 2014 at 9:48 pm #216633You can change the grid wrappers for the image and summary in config-woocommerce>config.php. Look for:
# # wrap single product image in an extra div # add_action( 'woocommerce_before_single_product_summary', 'avia_add_image_div', 2); add_action( 'woocommerce_before_single_product_summary', 'avia_close_image_div', 20); function avia_add_image_div() { echo "<div class='four units single-product-main-image alpha'>"; } function avia_close_image_div() { global $avia_config; $avia_config['currently_viewing'] = "shop_single"; get_sidebar(); echo "</div>"; } # # wrap single product summary in an extra div # add_action( 'woocommerce_before_single_product_summary', 'avia_add_summary_div', 25); add_action( 'woocommerce_after_single_product_summary', 'avia_close_div', 3); function avia_add_summary_div() { echo "<div class='eight units single-product-summary'>"; }
The div class wrapper is what gives the content its width within the layout in units that equal a total of twelve. So you can change the image from being four units and instead make it six but you would then also have to change the summary unit class name from eight to six as well so the total still equals twelve.
-
AuthorPosts
- The topic ‘Product image size’ is closed to new replies.