fix modules cs

This commit is contained in:
Manuel Raynaud
2014-03-11 15:43:48 +01:00
parent 33f2b56080
commit 4391e6334b
4 changed files with 7 additions and 11 deletions

View File

@@ -154,11 +154,11 @@ class CartController extends BaseFrontController
{
/* recalculate postage amount */
$order = $this->getSession()->getOrder();
if(null !== $order) {
if (null !== $order) {
$deliveryModule = $order->getModuleRelatedByDeliveryModuleId();
$deliveryAddress = AddressQuery::create()->findPk($order->chosenDeliveryAddress);
if(null !== $deliveryModule && null !== $deliveryAddress) {
if (null !== $deliveryModule && null !== $deliveryAddress) {
$moduleInstance = $this->container->get(sprintf('module.%s', $deliveryModule->getCode()));
$postage = $moduleInstance->getPostage($deliveryAddress->getCountry());
@@ -170,5 +170,4 @@ class CartController extends BaseFrontController
}
}
}