Product Images not showing in Woocommerce Composite product

Hi,

I’m using X theme and Woocommerce with the Woocommerce Composite product plugin.

When a user enters the product page with the Composite Product he should see three available products to choose from in the first step, in our case three different scootermodels.

The products are there, but 9 out of 10 times the picture doesn’t show.

The page I am talking about is: https://www.rogertrading.nl/product/bouw-je-eigen-vespa/#kies-je-scooter

Thank you.

Hi Edwin,

Thanks for writing in! Upon testing your referenced URL few times, I was able to experience this issue.

Most probably your issue should be related to Jetpack plugin or a caching related. First try disabling your Jetpack plugin and re-test your issue again. Make sure to purge full cache before testing (please refer: https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/).

If you’re still having issues, then you need to disable any minifications on your caching plugin and disable any caching plugins temporarily. Then you need to disable your other 3rd party plugins one by one to see which plugin causing the issue.

Let us know how it goes.
Thanks!

1 Like

Hi @mldarshana,

it looks like turning off lazy loading images in the jetpack settings solved the problem.

Do you think there is a way to solve the problem without turning that feature off, as to make sure pagespeed is not affected negatively?

Kind regards,
Edwin

Hey Edwin,

As those are third party plugins, it would be best to get in touch with the plugin developers for the issue due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

Thank you for your understanding.

1 Like

I have another question, the X-them cart button in the menu/navigation shows the price without VAT where the price including VAT should be shown (everywhere on the site we just show prices including VAT. How do I change that in X-Theme

Hi Edwin,

To change it to include tax, you can add the code below in your child theme’s functions.php file.

function x_woocommerce_navbar_cart() {
    $cart_info   = x_get_option( 'x_woocommerce_header_cart_info' );
    $cart_layout = x_get_option( 'x_woocommerce_header_cart_layout' );
    $cart_style  = x_get_option( 'x_woocommerce_header_cart_style' );
    $cart_outer  = x_get_option( 'x_woocommerce_header_cart_content_outer' );
    $cart_inner  = x_get_option( 'x_woocommerce_header_cart_content_inner' );
    $data = array(
      'icon'  => '<i class="x-icon-shopping-cart" data-x-icon-s="&#xf07a;" aria-hidden="true"></i>',
      'total' => WC()->cart->get_total(),
      'count' => sprintf( _n( '%d Item', '%d Items', WC()->cart->cart_contents_count, '__x__' ), WC()->cart->cart_contents_count )
    );
    $modifiers = array(
      $cart_info,
      strpos( $cart_info, '-' ) === false ? 'inline' : $cart_layout,
      $cart_style
    );
    $cart_output = '<div class="x-cart ' . implode( ' ', $modifiers ) . '">';
      foreach ( explode( '-', $cart_info ) as $info ) {
        $key = ( $info == 'outer' ) ? $cart_outer : $cart_inner;
        $cart_output .= '<span class="' . $info . '">' . $data[$key] . '</span>';
      }
    $cart_output .= '</div>';
    return $cart_output;
  }

Hope that helps

Yes, that worked. Thanks!

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.