1 person found this helpful
Since you can access the underlying dataprovider of your shopping cart datagrid (where items are added by drag and drop), you can search for an item in the array collection:
for each(var item:Product in ArrayCollection(shoppingCartDatagrid.dataprovider))
if(item.productId == itemBeingDragged.productId)
I am not adding items to the datagrid by dragging. the customer has to consumer has to click ' add to cart' but i do get your code. I am going to try it out
All right. But you should consider drag'n'drop in addition to your 'add to cart' button. It's good to have different ways of doing the same thing in an app.
Also, you can inspire from the Flex Store v2:
And from the Cairngorm Store (based on the Flex Store v1)