st-tu-dresden/salespoint

Introduce `Cart.getQuantityFor(Product)`

Closed this issue · 2 comments

To be able to tweak a requested amount to be added for a certain product, it would be helpful to find out the Quantity for a particulat Product currently potentially in the Cart. The method should return Quantity.NONE if the given Product is not in the Cart yet.

In our private videoshop fork, in branch lernraum/cart-details-in-navbar, I've implemented something similar and which isn't available as out of the box functionality. We might consider adding this as well.

Would love to see that rebased to the current main of Videoshop as parts of that have already been added there.