当前位置: 首页>>代码示例>>PHP>>正文


PHP Hook::backBeforePayment方法代码示例

本文整理汇总了PHP中Hook::backBeforePayment方法的典型用法代码示例。如果您正苦于以下问题:PHP Hook::backBeforePayment方法的具体用法?PHP Hook::backBeforePayment怎么用?PHP Hook::backBeforePayment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Hook的用法示例。


在下文中一共展示了Hook::backBeforePayment方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: displayOrderStep

 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');
 }
开发者ID:redb,项目名称:prestashop,代码行数:18,代码来源:orderpayment.php

示例2: _assignPayment

 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();
 }
开发者ID:priyankajsr19,项目名称:shalu,代码行数:27,代码来源:OrderController.php

示例3: _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();
 }
开发者ID:ricardo-rdfs,项目名称:Portal-BIP,代码行数:11,代码来源:OrderController.php

示例4: displayPayment

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');
}
开发者ID:vincent,项目名称:theinvertebrates,代码行数:13,代码来源:order.php


注:本文中的Hook::backBeforePayment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。