• I found a way to add two items to my cart with one url, but for some reason the amounts don’t look right. If I just hit the “Update Cart” button, everything looks correct.

    I need to know what the code is to execute inside my link to update the cart as if the button had been clicked.

    Anybody know?

    https://www.ads-software.com/plugins/woocommerce/

Viewing 9 replies - 1 through 9 (of 9 total)
  • ?add-to-cart=3111&quantity[1803]=5&quantity[1903]=2

    where 3111 is the id of a grouped product and 1803 and 1903 are single products or variations within the group.

    Thread Starter scottl31

    (@scottl31)

    Wow, is this the way to add two products to cart? Do I have to have the grouped one? Not using grouped products.

    There may be another way but I don’t know it. What querystring are you using to add two items to the cart?

    Thread Starter scottl31

    (@scottl31)

    It’s meta refresh redirect that has a masked javascript to load the second url. I made it from an old affiliate cookie stuffer creator. Here is the result:

    https://norfolkpress.com/new4/elorder/

    Not seen that before. There’s quite a bit on the internet about add-to-cart querystring parameters but I couldn’t find an authoritative definition and the only thing I could get to work for adding multiple products at various quantities is in post no 2 above.

    Thread Starter scottl31

    (@scottl31)

    But did you have to have the grouped product in there in order tto load the other two?

    Yes.

    Thread Starter scottl31

    (@scottl31)

    Hmm.. guess I could make a dummy grouped product. So then the other two don’t have to be in the group?

    I assumed they did and did not try it without.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Possible to automatically update cart?’ is closed to new replies.