cancel
Showing results for 
Search instead for 
Did you mean: 

Magento2 swatch issue in product details page for Up sell products

Magento2 swatch issue in product details page for Up sell products

I have implemented the Magento2 swatch functionality  for the up-sell products in products details page by making a custom module. Though all swatches are coming for the Up-sell product slider but images are not changing on clicking the swatches of Up-sell products but prices are changing. Can anyone help me out of this problem.

2 REPLIES

Re: Magento2 swatch issue in product details page for Up sell products

You need to check Simple product of configurable with an image attached or not. If the image is already assigned at that time you have to check for Ajax call when clicking on swatches. ajax call response 200 got or not for ajax URL like http://localhostmagento.com/swatches/ajax/media/?product_id=1&isAjax=true

 

Above ajax call is responsible for image swatch on configurable product simple image changes.

If Issue Solved, Click Kudos/Accept As solutions.

Re: Magento2 swatch issue in product details page for Up sell products



Hello @Rakesh Jesadiya,

  Everything is working fine on the other listing pages and also I have successfully implemented swatches on Home page under Featured Product section but particularly on product details  page for up-sell product slider only Ajax is not firing with the image content. I am in doubt whether it's conflicting with the swatches in product details page. Do you have any idea , what can be done here?