本文整理汇总了PHP中FrontController::setTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP FrontController::setTemplate方法的具体用法?PHP FrontController::setTemplate怎么用?PHP FrontController::setTemplate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrontController
的用法示例。
在下文中一共展示了FrontController::setTemplate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setTemplate
public function setTemplate($template)
{
if (_PS_VERSION_ >= '1.5') {
parent::setTemplate($template);
} else {
$this->template = $template;
}
}
示例2: setTemplate
public function setTemplate($template)
{
if (version_compare(_PS_VERSION_, '1.5', 'ge')) {
parent::setTemplate($template);
} else {
$this->template = $template;
}
}
示例3: FrontController
Tools::redirectLink(__PS_BASE_URI__ . '/modules/paypal/express_checkout/submit.php?' . $query);
} else {
$controller = new FrontController();
$controller->init();
Tools::redirect(Context::getContext()->link->getModuleLink('paypal', 'submit', $values));
}
}
} else {
// If Cart changed, no need to keep the paypal data
unset(Context::getContext()->cookie->{PaypalExpressCheckout::$COOKIE_NAME});
$ppec->logs[] = $ppec->l('Cart changed since the last checkout express, please make a new Paypal checkout payment');
}
}
if (_PS_VERSION_ < '1.5') {
$display = new BWDisplay();
} else {
$display = new FrontController();
}
// Display payment confirmation
if ($ppec->ready && Tools::getValue('get_confirmation')) {
if (_PS_VERSION_ < '1.5') {
$currency = new Currency((int) $ppec->getContext()->cart->id_currency);
$ppec->getContext()->smarty->assign(array('form_action' => PayPal::getShopDomainSsl(true, true) . _MODULE_DIR_ . $ppec->name . '/express_checkout/submit.php', 'total' => Tools::displayPrice($ppec->getContext()->cart->getOrderTotal(true), $currency), 'logos' => $ppec->paypal_logos->getLogos(), 'use_mobile' => (bool) $ppec->getContext()->getMobileDevice()));
$display->setTemplate(_PS_MODULE_DIR_ . 'paypal/views/templates/front/order-summary.tpl');
}
} else {
$ppec->getContext()->smarty->assign(array('message' => $ppec->l('Error occurred:'), 'logs' => $ppec->logs, 'use_mobile' => $ppec->getContext()->getMobileDevice()));
$display->setTemplate(_PS_MODULE_DIR_ . 'paypal/views/templates/front/error.tpl');
}
$display->run();
}