You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And re-execute this, it would just +1 the quantity, but I need to check wether the item was already added to the cart (so I can prevent it beeing added again)
Something like:
Cart::hasItem(15); (15 == the product ID or something custom sortaspeak)
Which would return true or false
The text was updated successfully, but these errors were encountered:
Hi,
Is there a way to check wether an item has already been added to the cart, or exists?
For example, if I go:
And re-execute this, it would just +1 the quantity, but I need to check wether the item was already added to the cart (so I can prevent it beeing added again)
Something like:
Which would return true or false
The text was updated successfully, but these errors were encountered: