I am attempting to write a php script to compare rows from the database and then adds the quantities it the product id matches. Based on cusotmer_id
Example:
mydb.cart
id, customer_id, cart_id, product_id, qty, price 1, 0001000, 4545453, 20, 10, 12.99 2, 0001000, 7473432, 20, 2, 12.99 Result 3, 0001000, 7473432, 20, 12, 25.98 trying to merge cart information from a previous session.
Any suggestions is appreciated,
Thanks