Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

OrderValidationService does not remove lineitem? [12.16]

$
0
0

Hi!

I have a strange, or maybe not, behaviour in the OrderValidationService.

For a variant I set in stock to 1, tracked inventory to true, backorder to 0, preorder to 0.

I then try to add 2 in my cart. Validation kicks in and lowers my quantity to 1. Perfect!

I then update then inventory item in stock to 0. Meaning there are no items available and it cannot be backordered or preordered.
I then add 1 to the cart and the validation does not remove it? Shouldn't the item be removed?

By the way, what is the differce between UpdateInventoryOrRemoveLineItem and AdjustInventoryOrRemoveLineItems?

Thanks!

/Kristoffer

UPDATE

AdjustInventoryOrRemoveLineItems removes the item from the cart but I doesn't reduce to 1 if I have 1 in stock and adds 2. I get validation error like AdjustedQuantityByAvailableQuantity, but quantity is still 2 in the cart. I'm getting confused. Should you run both?


Viewing all articles
Browse latest Browse all 6894

Trending Articles