// BugFix : Display errors when no carriers available

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11112 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2011-12-12 10:21:56 +00:00
parent b2c36c562b
commit d843b14ac6
6 changed files with 33 additions and 5 deletions
+7
View File
@@ -393,6 +393,13 @@ class OrderOpcControllerCore extends ParentOrderController
$address_invoice = ($this->context->cart->id_address_delivery == $this->context->cart->id_address_invoice ? $address_delivery : new Address($this->context->cart->id_address_invoice));
if (!$this->context->cart->id_address_delivery OR !$this->context->cart->id_address_invoice OR !Validate::isLoadedObject($address_delivery) OR !Validate::isLoadedObject($address_invoice) OR $address_invoice->deleted OR $address_delivery->deleted)
return '<p class="warning">'.Tools::displayError('Error: please choose an address').'</p>';
if (count($this->context->cart->getDeliveryOptionList()) == 0)
{
if ($this->context->cart->isMultiAddressDelivery())
return '<p class="warning">'.Tools::displayError('Error: There are no carriers available that deliver to some of your addresses').'</p>';
else
return '<p class="warning">'.Tools::displayError('Error: There are no carriers available that deliver to this address').'</p>';
}
if (!$this->context->cart->getDeliveryOption() AND !$this->context->cart->isVirtualCart())
return '<p class="warning">'.Tools::displayError('Error: please choose a carrier').'</p>';
if (!$this->context->cart->id_currency)