Marketpress – Possible to add multiple items to cart in one click

Hello.

I’m trying to set up a Marketpress site which selects a number of products for the user depending on some input from them, then displays these items on a page. Ideally I want the user to click one button which sends all the items to cart in one go, rather than having to add each one to cart separately.

Is this easily possible? If not, do you know what would be the best way to accomplish this?

Thanks in advance!

Neil

  • aecnu
    • WP Unicorn

    Greetings Neil,

    To the best of my knowledge this is not possible and would require a large amount of heavy coding to accomplish. However, I do not know everything, therefore I am going to see if I can get the lead developer of the Market Press plugin in here to offer his professional advice/advise us on this matter.

    Though this may take longer then a normal ticket, I look forward to getting a solid answer for you.

    Thank you for being a WPMU Dev Member!

    Cheers, Joe

  • neilsayers
    • WPMU DEV Initiate

    Thanks for getting back to me. I had a feeling this would be more difficult than I first thought!

    I am doing some investigations of my own and thinking of using AJAX to do something like this:

    User clicks my ‘Add all to cart’

    AJAX runs the ‘Add to cart’ function on the first item and then reloads the page

    AJAX runs the ‘Add to cart’ function on the second item and then reloads the page

    AJAX runs the ‘Add to cart’ function on the third item and then reloads the page

    etc. etc.

    Until all have been clicked.

    Of course, this is my very simplistic description of what’s going on, so I’m not sure it will work or is even possible.

    I’ll keep having a look for a solution myself, but if someone at your end can also have a look, that would be great… Also, I think an ‘add all to cart’ for multiple, checked items would be pretty handy to include in future a Marketpress.

    Thanks again,

    Neil

  • neilsayers
    • WPMU DEV Initiate

    Hi again.

    I noticed this thread when I have been searching around:

    https://premium.wpmudev.org/forums/topic/safari-ajax-add-to-cart-cookie-issue#post-152208

    The person here mentions: “the ajax instant-add-to-basket feature” – When someone clicks on the ‘add to cart’ button on that site example, I can see they are not redirected to the cart page, which is what happens on my site.

    If I was able to figure out how to achieve this on my site, I think this would be another solution for my problem. Do you have any idea how this was accomplished?

    Thanks

    Neil

  • neilsayers
    • WPMU DEV Initiate

    Thanks… I think I may have discovered the problem here then. I am running this test site in a sub-folder on my own domain: .co.uk/myss/ and I think this is confusing the /store/ links in the Marketpress admin. I am going to set up a subdomain and see if that makes a difference.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.