I have a fully functional cart, programmed with PHP that uses session cookies. My site will host items from multiple sellers and to avoid getting into PayPal parallel payments (just now) I need to be able to limit each session to items from 1 seller only per checkout. What is the best way to go about this?
I have tried counting seller IDs and running an if statement (if >1) to redirect to a slightly altered cart page requesting items from multiple sellers to be removed in order to continue.
The problem with this approach seems to be with counting the arrays (it will only count 1 id that relates to one particular item in the cart array).
Any suggestions would be greatly appreciated.
After your client choose his first item, you may refresh the pages, displaying only the newly allowed items (the ones that are from the same sellers as the first choosen item).
But it seems strange to force the user to do that...