mantle.order.OrderServices there is a service called
add#OrderProductQuantity. I am using it to add a product quantity to an order. In that service, there is a parameter for
quantity, and if the
addToQuantity parameter is
true (it is by default) then the
quantity parameter is used as a way to add a change in product item quantity rather than a new item product item quantity.
I currently have an application that has a store cart that looks like this:
The - button subtracts from the product item quantity in an order and the + button adds one. I’m currently using the
add#OrderProductQuantity service’s quantity parameter for this, however it doesn’t currently allow a quantity below 0 see here.
Is changing that service to allow a negative change in quantity an acceptable change for that service? I feel like it makes sense in this context and would be helpful to other people, although I don’t know what the purpose of making the quantity below 0 just delete the
OrderItem (if it exists) rather than allowing it to be modified.
@jonesde What do you think?