Skip Navigation

[Resolved] WooCommerce Product Image Block in a content template won't display correctly

This thread is resolved. Here is a description of the problem and solution.

Problem:

A user reported that he is using the product image block with Kandence theme in a content template, but it is not showing correctly.

Solution:

Noticed that some of the styles were getting overridden by the theme's styles and shared some custom CSS code.

Relevant Documentation:

n/a

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by markM-4 2 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#2323289

Hi there, I'm sure there is a simple fix for this but I can't find any combination of settings to change to solve.

I am using the Kadence theme with Toolset to create an Ecommerce site, I am following the Creating Custom Templates for WooCommerce Products guide, but I can't get the product image block to display correctly, either by using the Toolset Custom Output (the gallery images are cut off and any style, border etc isn't applied) or by using the Woocommerce native Output (Block takes up third of the column, still not styling applied, clicking on the gallery images moves the content below).

Unticking the "Add a container DIV around the post body for WooCommerce styling" box in the Toolset settings still doesn't resolve the issue (however it does resolve the native output size issue)

You can see the issue here:
hidden link

All I am trying to do is create a simple 2 column layout with the product image gallery in the left column, and the details in the right.

Any assistance for how to go about solving this conflict would be greatly appreciated

#2323773

Hi,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot which styles are not applying, I'll need to see how this template is set up in the admin area.

Can you please share temporary admin login details, along with the details of the style changes that you expected?

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2324661

Thank you for sharing these details.

I noticed that some of the styles added by the blocks content template are being overridden by the active theme's styles.

To overcome this, you can include the following CSS code in the template's "CSS editor":
( screenshot: hidden link )


.content-area .wp-block-woocommerce-views-product-image .woocommerce-product-gallery {
    width: 100% !important;
}

.content-area .wp-block-woocommerce-views-product-image .woocommerce-product-gallery .flex-viewport {
    border: 2px solid rgb(0, 0, 0);
}

.content-area .wp-block-woocommerce-views-product-image .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs > li {
    border: 1px solid rgb(0, 0, 0);
    margin: 0 4px 0;
}

#2326973

My issue is resolved now. Thank you!