Example #1
0
 function displayOrderStep($params)
 {
     global $smarty, $cart, $currency, $cookie, $orderTotal;
     if ($cart->getOrderTotalLC() <= 0) {
         $order = new FreeOrder();
         $order->validateOrder(intval($cart->id), _PS_OS_PAYMENT_, 0, Tools::displayError('Free order', false));
         Tools::redirect('history.php');
     }
     // Redirect instead of displaying payment modules if any module are grafted on
     Hook::backBeforePayment(strval(Tools::getValue('back')));
     /* We may need to display an order summary */
     $smarty->assign($cart->getSummaryDetails());
     $cookie->checkedTOS = '1';
     $smarty->assign(array('HOOK_PAYMENT' => Module::hookExecPayment(), 'total_price' => floatval($orderTotal)));
     Tools::safePostVars();
     include_once dirname(__FILE__) . '/../../header.php';
     echo $this->display(__FILE__, 'orderpayment.tpl');
 }
Example #2
0
 protected function _assignPayment()
 {
     global $orderTotal;
     $invoice_address = new Address((int) self::$cart->id_address_invoice);
     if ($invoice_address->id_country != 110) {
         include_once _PS_MODULE_DIR_ . 'paypal/paypal.php';
         include_once _PS_MODULE_DIR_ . 'paypal/payment/paypalpayment.php';
         include_once _PS_MODULE_DIR_ . 'paypal/payment/submit.php';
         //GetPaypal stuff
         unset(self::$cookie->paypal_token);
         /*if (self::$cart->id_currency != $ppPayment->getCurrency((int) self::$cart->id_currency)->id) {
               self::$cart->id_currency = (int) ($ppPayment->getCurrency((int) self::$cart->id_currency)->id);
               self::$cookie->id_currency = (int) (self::$cart->id_currency);
               self::$cart->update();
               Tools::redirect('modules/' . $ppPayment->name . '/payment/submit.php');
           }*/
         $curr_sel_currency = CurrencyCore::getCurrency(self::$cart->id_currency);
         self::$smarty->assign(array('cust_currency' => self::$cart->id_currency, 'currency' => $curr_sel_currency, 'total' => self::$cart->getOrderTotal(true, Cart::BOTH), 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/' . $ppPayment->name . '/', 'mode' => 'payment/'));
     }
     // Redirect instead of displaying payment modules if any module are grefted on
     Hook::backBeforePayment('order.php?step=3');
     /* We may need to display an order summary */
     self::$smarty->assign(self::$cart->getSummaryDetails());
     self::$smarty->assign(array('total_price' => Tools::ps_round((double) $orderTotal), 'taxes_enabled' => (int) Configuration::get('PS_TAX')));
     self::$cookie->checkedTOS = '1';
     parent::_assignPayment();
 }
 protected function _assignPayment()
 {
     global $orderTotal;
     // Redirect instead of displaying payment modules if any module are grefted on
     Hook::backBeforePayment('order.php?step=3');
     /* We may need to display an order summary */
     self::$smarty->assign(self::$cart->getSummaryDetails());
     self::$smarty->assign(array('total_price' => (double) $orderTotal, 'taxes_enabled' => (int) Configuration::get('PS_TAX')));
     self::$cookie->checkedTOS = '1';
     parent::_assignPayment();
 }
Example #4
0
function displayPayment()
{
    global $smarty, $cart, $currency, $cookie, $orderTotal;
    // Redirect instead of displaying payment modules if any module are grefted on
    Hook::backBeforePayment(strval(Tools::getValue('back')));
    /* We may need to display an order summary */
    $smarty->assign($cart->getSummaryDetails());
    $cookie->checkedTOS = '1';
    $smarty->assign(array('HOOK_PAYMENT' => Module::hookExecPayment(), 'total_price' => floatval($orderTotal), 'taxes_enabled' => intval(Configuration::get('PS_TAX'))));
    Tools::safePostVars();
    include_once dirname(__FILE__) . '/header.php';
    $smarty->display(_PS_THEME_DIR_ . 'order-payment.tpl');
}