Closed WZYCX closed 1 year ago
therefore price is not incremented
SOLVED since the 'item.count' was not referencing the item in basket but the item that was 'iteminbasket'
' for (pos, purchased) in basket.currentBasket.enumerated() { if purchased.name == item.name { basket.currentBasket[pos].count -= 1 // adds one to the count of item in basket } } '
When adding 1 to item.count, the count is not saved after you change to a different page