// Context part 26

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7804 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-28 16:37:50 +00:00
parent 72de3384a7
commit d80c7b5ba8
18 changed files with 101 additions and 115 deletions
+4 -2
View File
@@ -29,6 +29,8 @@ include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/../../header.php');
include(dirname(__FILE__).'/cheque.php');
$context = Context::getContext();
$cart = $context->cart;
$cheque = new Cheque();
if ($cart->id_customer == 0 OR $cart->id_address_delivery == 0 OR $cart->id_address_invoice == 0 OR !$cheque->active)
@@ -45,12 +47,12 @@ foreach (Module::getPaymentModules() as $module)
if (!$authorized)
die(Tools::displayError('This payment method is not available.'));
$customer = new Customer((int)$cart->id_customer);
$customer = new Customer($cart->id_customer);
if (!Validate::isLoadedObject($customer))
Tools::redirect('index.php?controller=order&step=1');
$currency = new Currency((int)(Tools::isSubmit('currency_payement') ? Tools::getValue('currency_payement') : $cookie->id_currency));
$currency = Tools::isSubmit('currency_payement') ? new Currency(Tools::getValue('currency_payement')) : $context->currency;
$total = (float)$cart->getOrderTotal(true, Cart::BOTH);
$mailVars = array(