
Originally Posted by
Ajeh
At this time, the Add to Cart is adding the Products as if they were separate items:
Small
Medium
Otherwise, how do I buy a Small and Medium for the same order?
We will be looking into
Update vs
Add to Cart options in future releases ...
Thanks! glad to hear this might get addressed in future versions.
Regarding your question of how to put both a small and medium item on the same order it's relatively easy.
Only display the "Update" button if the user has navigated back to the product page using the Title of the item linked from the shopping cart. As this will put the products_id in the URL
A fast check for this is:
Code:
if(is_array($_SESSION[cart]->contents[$_GET['products_id']])) { //display update button }
with some error checking to make sure the $_GET and $_SESSION are sanitized valid data.
This way if the user arrived back at the shirt page any other way besides attempting to edit the existing item, it just gets added to the cart like normal. If it was an attempt to edit they still have the option to add it as an additional item to cart or update the existing one.
I've already added this function to the site I'm working on but it requires the user go through the additional step of figuring which of the 2 nearly identical items in the cart is the one they don't want and manually deleting it.
thanks again!