addEcommerceItem and deleting items?


#1

Hello,

What is the proper way to use “addEcommerceItem” when deleting an item from the cart?

Do I simply use 0 as the quantity?

TIA


(Matthieu Aubry) #2

to delete an item, simply addEcommerceItem for items that are in the cart. Call trackEcommerceCartUpdate to update the cart. items that are not sent will be automatically deleted from cart.


#3

So on every cart update you must loop through all items in cart and apply “addEcommerceItem” prior to calling “trackEcommerceCartUpdate” ?


(Matthieu Aubry) #4

yes


#5

ok thanks


#6

Hi,

Am trying the same thing… but the piwik log tables are not updating accordingly (‘deleted’ column value should be 1 against the item deleted)
Am looping the cart items and calling addEcommerceItem tag and then trackEcommerceCartUpdate outside the loop.

-Aneesha

[quote=matt]
to delete an item, simply addEcommerceItem for items that are in the cart. Call trackEcommerceCartUpdate to update the cart. items that are not sent will be automatically deleted from cart.[/quote]