[-] BO : #PSFV-874 - Carriers asked with guest checkout and virtual cart

This commit is contained in:
mDeflotte
2012-04-17 16:27:39 +00:00
parent 6ec2816de5
commit 792a6ea0b0
+1
View File
@@ -177,6 +177,7 @@ class OrderOpcControllerCore extends ParentOrderController
if ($this->context->customer->isLogged(true))
{
$address_delivery = new Address((int)(Tools::getValue('id_address_delivery')));
$this->context->smarty->assign('isVirtualCart', $this->context->cart->isVirtualCart());
$address_invoice = ((int)(Tools::getValue('id_address_delivery')) == (int)(Tools::getValue('id_address_invoice')) ? $address_delivery : new Address((int)(Tools::getValue('id_address_invoice'))));
if ($address_delivery->id_customer != $this->context->customer->id || $address_invoice->id_customer != $this->context->customer->id)
$this->errors[] = Tools::displayError('This address is not yours.');