use of org.broadleafcommerce.core.order.service.exception.IllegalCartOperationException in project BroadleafCommerce by BroadleafCommerce.
the class BroadleafCheckoutController method preValidateCartOperation.
protected void preValidateCartOperation(Model model) {
try {
Order cart = CartState.getCart();
orderService.preValidateCartOperation(cart);
} catch (IllegalCartOperationException ex) {
model.addAttribute("cartRequiresLock", true);
}
}
use of org.broadleafcommerce.core.order.service.exception.IllegalCartOperationException in project BroadleafCommerce by BroadleafCommerce.
the class OrderServiceImpl method preValidateCartOperation.
@Override
public void preValidateCartOperation(Order cart) {
ExtensionResultHolder erh = new ExtensionResultHolder();
extensionManager.getProxy().preValidateCartOperation(cart, erh);
if (erh.getThrowable() instanceof IllegalCartOperationException) {
throw ((IllegalCartOperationException) erh.getThrowable());
} else if (erh.getThrowable() != null) {
throw new RuntimeException(erh.getThrowable());
}
}
use of org.broadleafcommerce.core.order.service.exception.IllegalCartOperationException in project BroadleafCommerce by BroadleafCommerce.
the class OrderServiceImpl method preValidateUpdateQuantityOperation.
@Override
public void preValidateUpdateQuantityOperation(Order cart, OrderItemRequestDTO dto) {
ExtensionResultHolder erh = new ExtensionResultHolder();
extensionManager.getProxy().preValidateUpdateQuantityOperation(cart, dto, erh);
if (erh.getThrowable() instanceof IllegalCartOperationException) {
throw ((IllegalCartOperationException) erh.getThrowable());
} else if (erh.getThrowable() != null) {
throw new RuntimeException(erh.getThrowable());
}
}
Aggregations