INTOLERABLE UX FROM MOBILE

#UX #mobile #store #cart

Hello to the members of the community :slight_smile:
Can you help me ?

On mobile, when a visitor adds a product to his cart, he is automatically redirected to the “cart” page.
Do you have a solution so that the visitor stays on the same page when he adds a product to his cart?
It works very well on desktop but not on mobile.

My products are displayed on a dynamic page and in a repeater.
There is a button “add to cart” on each container of the repeater.

I’m thinking of a workaround that would be:

-Make a preselection with checkboxes on each products then add ONLY ONE button “add to cart” on my page. This button add all items selected to cart.

Possible according to you?

Thank’s from France


$w.onReady( function () {
$w(“#button1”).onClick( (event) => {

    let $item = $w.at(event.context);  
    let selectedProduct = $item('#dataset1').getCurrentItem(); 
    let productId = selectedProduct._id; 

 $w('#shoppingCartIcon1').addToCart(productId,quantity) 
    .then(() => { 
        // Item added to the shopping cart 
        console.log("add product ${productId} success"); 
    }) 
    .catch((error) => { 
        // Catch an error that occurs 
        console.log("Error: ${error.stack}"); 
    }); 
} ); 

} );