empty cart or delivery exception

This commit is contained in:
Etienne Roudeix
2013-09-17 16:38:16 +02:00
parent ddbced036f
commit acaa4a969e
8 changed files with 59 additions and 11 deletions

View File

@@ -69,9 +69,9 @@ class OrderController extends BaseFrontController
/* check that the delivery module fetch the delivery address area */
if(AreaDeliveryModuleQuery::create()
->filterByAreaId($deliveryAddress->getCountry()->getAreaId())
->filterByDeliveryModuleId()
->filterByDeliveryModuleId($deliveryModuleId)
->count() == 0) {
throw new \Exception("PUKE");
throw new \Exception("Delivery module cannot be use with selected delivery address");
}