本文整理汇总了PHP中KSSystem::loadPluginTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP KSSystem::loadPluginTemplate方法的具体用法?PHP KSSystem::loadPluginTemplate怎么用?PHP KSSystem::loadPluginTemplate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KSSystem
的用法示例。
在下文中一共展示了KSSystem::loadPluginTemplate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAfterDisplayKSMCartDefault_congratulation
public function onAfterDisplayKSMCartDefault_congratulation($view, $tpl = null, &$html)
{
if (empty($view->order)) {
return;
}
if (empty($view->order->payment_id)) {
return;
}
$payment = KSMWalletone::getPayment($view->order->payment_id, $this->_name);
if ($payment->id <= 0) {
return;
}
if (empty($view->order->region_id)) {
return;
}
if (!$this->checkRegion($payment->regions, $view->order->region_id)) {
return;
}
$params = new JRegistry();
$params->loadString($payment->params);
$view->payment_params = $params;
$view->payment_form_params = new stdClass();
$view->payment_form_params->title = 'Оплата заказа №' . $view->order->id . ' на сайте ' . JFactory::getConfig()->get('sitename');
$paymentTypes = $this->_preparePaymentTypes($view->payment_params->get('payment_types', array()));
$view->user = KSUsers::getUser();
KSMWalletone::_setFields(array_merge($paymentTypes, array('WMI_MERCHANT_ID' => $view->payment_params->get('merchant_id', null), 'WMI_PAYMENT_AMOUNT' => $view->order->costs['total_cost'], 'WMI_PAYMENT_NO' => $view->order->id, 'WMI_CURRENCY_ID' => 643, 'WMI_DESCRIPTION' => $view->payment_form_params->title, 'WMI_CUSTOMER_FIRSTNAME' => $view->order->customer_fields->first_name, 'WMI_CUSTOMER_LASTNAME' => $view->order->customer_fields->last_name, 'WMI_CUSTOMER_EMAIL' => $view->order->customer_fields->email, 'WMI_FAIL_URL' => JRoute::_(JURI::base() . 'index.php?option=com_ksenmart&view=cart&layout=pay_error'), 'WMI_SUCCESS_URL' => JRoute::_(JURI::base() . 'index.php?option=com_ksenmart&view=cart&layout=pay_success'))));
$view->payment_form_params->sign = KSMWalletone::getHash($view->payment_params->get('secretKey', null));
$html .= KSSystem::loadPluginTemplate($this->_name, $this->_type, $view, 'default_paymentform');
return true;
}
示例2: getImportStep
function getImportStep()
{
$jinput = JFactory::getApplication()->input;
$this->view->encoding = $jinput->get('encoding', 'cp1251');
if (!($this->view->info = $this->importCSV())) {
return false;
}
$html = KSSystem::loadPluginTemplate($this->_name, $this->_type, $this->view, 'result');
return $html;
}
示例3: getConfigStep
function getConfigStep()
{
$this->view->form = $this->getForm();
$data = $this->getFormData();
$this->view->form->bind($data);
$html = KSSystem::loadPluginTemplate($this->_name, $this->_type, $this->view, 'config');
return $html;
}
示例4: onBeforeDisplayKSMCartDefault_shipping
function onBeforeDisplayKSMCartDefault_shipping($view, &$tpl = null, &$html)
{
if (!self::canDisplay()) {
return false;
}
$document = JFactory::getDocument();
$session = JFactory::getSession();
$coupon_id = $session->get('ksenmart.coupon_id', null);
if (!empty($coupon_id)) {
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select('code')->from('#__ksenmart_discount_coupons')->where('published=1')->where('id=' . $coupon_id);
$db->setQuery($query);
$view->code = $db->loadResult();
$html .= KSSystem::loadPluginTemplate($this->_name, $this->_type, $view, 'unset');
$script = '
jQuery(document).ready(function(){
jQuery("#cart").on("click",".km-coupons .btn",function(){
jQuery("#km-coupon-form").submit();
});
});
';
$document->addScriptDeclaration($script);
} else {
$html .= KSSystem::loadPluginTemplate($this->_name, $this->_type, $view, 'set');
$script = '
jQuery(document).ready(function(){
jQuery("#cart").on("click",".km-coupons .btn",function(){
var discount_code=jQuery(".km-coupons input[name=\'discount_code\']").val();
jQuery("#km-coupon-form input[name=\'discount_code\']").val(discount_code);
jQuery("#km-coupon-form").submit();
});
});
';
$document->addScriptDeclaration($script);
}
}