Hi, I am trying to push a item to the cart through a repeater. when on desktop it works fine and adds all the items presented in the repeater, however on mobile it just goes straight to cart and doesn't give it time to add all the tickets. the code is
if (wixWindow.formFactor === 'Desktop') { const start = async () => { await asyncForEach(tickets, async (t) => { if (!added.includes(t._id)) { await $w('#shoppingCartIcon1').addToCart(GAME_ID, 1, { "customTextFields": [ { "title": "Cords", "value": t.cords }] }); added.push(t._id); deleteItem(t._id); //console.log(t.cords) } }); wixLocation.to("/cart-page"); } start(); } else { const start = async () => { asyncForEach(tickets, async (t) => { if (!added.includes(t._id)) { $w('#shoppingCartIcon1').addToCart(GAME_ID, 1, { "customTextFields": [ { "title": "Cords", "value": t.cords }] }); added.push(t._id); deleteItem(t._id); //console.log(t.cords) } }); wixLocation.to("/cart-page"); } start(); }
Been trying to fix this for a few weeks, please help!
@customer.support
@#TheFreekid (Chris Walls)
@Tom Phelps @helpidt
@wix
Hi,
Can you please send a URL to your site and specify the name of the page?
Sapir
@Sapir (wix) @yisroel (wix) please someone help with this