fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Issue with Cross Sale products on cart page

Asaf Moraz

I have a client who is interested in embedding the elementor “products” widget in the shopping cart page and in the query select “cross-selling”.
The thing is that once we define it like this, variations are not clickable and if they are sometimes clickable and a product is added to the cart, then the cart needs to be refreshed so that there will be clicks again, probably because of ajax issue.
Is there a way to handle the issue? I want to allow the customer to design the cube of the product in Elementor that’s why I use this component.
I must admit that the specific widget for cross sell of elementor is not working in the cart page only in single product page.

I’m using a staging website this is the url for the product for testing:

https://woocommerce-892235-4213344.cloudwaysapps.com/product/%d7%98%d7%a8%d7%9e%d7%a4%d7%95%d7%9c%d7%99%d7%a0%d7%94-%d7%9c%d7%aa%d7%99%d7%a0%d7%95%d7%a7-3-%d7%91-1-%d7%93%d7%92%d7%9d-%d7%92%d7%99%d7%a8%d7%a4%d7%94/

Hakik Zaman

Hi Asaf,

Thanks for reaching out to us. I have visited the link.

I found this section is loaded using a script.

If you want the swatches clickable, you have to find the event name that is fired after this section’s products are loaded.

Thank You

Asaf Moraz

Hello Hakik,

I think you missed the point. The page where this happens is a shopping cart page, not in a single product page. The link I sent is for you is only that you will be able to add the correct product to the cart and go to cart page where you will see the problem (ON THE CART PAGE) This specific product contains cross-sale products as a test.

Thanks.

Hakik Zaman

Hi Asaf,

Sorry for missing the point.

I have visited your cart page and found everything is fine. I have recorded my screen during the tests: https://www.loom.com/share/bcd64b202c314b0794f7fe7f862a4e3b

Note: Refreshing the cart items list after adding a product is not a feature of our plugin.

Thank You

Asaf Moraz

Thank you for the video Hakik, after you add the product to the cart like you did, you cannot press again on the variation color like you did in the first time.

Please try to add a product from the coss sale and repeat the step again, you will see that you cannot press the variation swatch on the second time.

Thanks.

 

Hakik Zaman

Hi Asaf,

From my inspection, that section is loaded using Ajax.

Please contact the widget author and ask for a trigger that fires after those product loads.

When you land on the page, swatches script loads at the time of painting the view/front.

But it doesn’t reinitialize when your widget loads based on the carted items.

So please contact your widget author and ask for an event that should be triggered after new products are loaded.

Just send this plugin to your widget developer: https://wordpress.org/plugins/malinky-ajax-pagination/

Ask them to send triggers like the following as the Malinky Ajax Pagination plugin provides.

document.addEventListener(‘malinkyLoadPostsComplete’, function(e) {
console.log(‘LoadPostsComplete’);
});

Thank You

Asaf Moraz

Hello Hakik and thanks for your reply, the widget is a built it “Product Widget” of Elementor Pro. I’m not sure that if i will contact them they will provide fast support, is there any fix you can think off by your side?

Thanks.

Hakik Zaman

Hi Asaf,

is there any fix you can think off by your side?

Unfortunately, not. If they provide the trigger, we can help you by giving a snippet.

As I said, they are rendering the product, and our script is initialized before the product loads.

Thank You

Asaf Moraz

Ok, i understand, thank you.

Maybe you know a third party widget/plugin for elementor that work with your plugin and display cross sells products on the cart page?

Hakik Zaman

Hi Asaf,

If you contact the widget author and they have a trigger that fires after the product loads, our plugin will work with your current widget.

Unfortunately, I am unable to give the name of a plugin/widget that will work after plugging our plugin.

Thank You