If you try to confirm your order at /cart/checkout while there are not enough products left to complete your order, you get an error message. So far, so good.

But even if the product is completely out of stock, the error message uses the 'not_enough' template instead of stating that we have any product left.

To fix that; use the attached patch.

CommentFileSizeAuthor
uc_out_of_stock-consistent_error.patch1.01 KBpieterdc

Comments

hanoii’s picture

Status: Needs review » Fixed

Thanks for this. I didn't want to do it like this because it's iterating through the cart again while is not necessary. I just added another ifclause to switch between one case or the other.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.