コード例 #1
0
ファイル: orderpayment.php プロジェクト: redb/prestashop
 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');
 }
コード例 #2
0
 /**
  * Check if order is free
  * @return boolean
  */
 protected function _checkFreeOrder()
 {
     if ($this->context->cart->getOrderTotal() <= 0) {
         $order = new FreeOrder();
         $order->free_order_class = true;
         $order->validateOrder($this->context->cart->id, Configuration::get('PS_OS_PAYMENT'), 0, Tools::displayError('Free order', false), null, array(), null, false, $this->context->cart->secure_key);
         return (int) Order::getOrderByCartId($this->context->cart->id);
     }
     return false;
 }
コード例 #3
0
 /**
  * @return boolean
  */
 protected function _checkFreeOrder()
 {
     if (self::$cart->getOrderTotal() <= 0) {
         $order = new FreeOrder();
         $order->free_order_class = true;
         $order->validateOrder((int) self::$cart->id, _PS_OS_PAYMENT_, 0, Tools::displayError('Free order', false));
         return (int) Order::getOrderByCartId((int) self::$cart->id);
     }
     return false;
 }
コード例 #4
0
ファイル: order.php プロジェクト: vincent/theinvertebrates
function checkFreeOrder()
{
    global $cart;
    if ($cart->getOrderTotal() <= 0) {
        $order = new FreeOrder();
        $order->validateOrder(intval($cart->id), _PS_OS_PAYMENT_, 0, Tools::displayError('Free order', false));
        Tools::redirect('history.php');
    }
}