Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- productCommand.errors.getAllErrors().each { error ->
- if (!productBean.quantity && error.code == 'plugin.opcAddToCart.message.validation.price.notvalid') {
- def tempQuantity = item.quantity
- item.quantity = convertedQuantity
- item.errors.rejectValue('quantity', 'plugin.opcAddToCart.message.quantity.notValid')
- item.quantity = tempQuantity
- } else {
- item.errors.addError(error)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement