public function hookdisplayOrderDetail($params) {
if ($params['order']->hasBeenPaid())
return;
$this->context->smarty->assign(array(
'summ' => number_format($total_to_pay, 2, '.', ''),
'this_path' => $this->_path,
'this_path_ssl' => Tools::getHttpHost(true, true) . __PS_BASE_URI__ . 'modules/' . $this->name . '/',
));
$display = '';
if (Configuration::get('YA_P2P_ACTIVE')) {
$vars_p2p = Configuration::getMultiple(array(
'YA_P2P_NUMBER',
'YA_P2P_ACTIVE',
'YA_P2P_MIN',
));
$this->context->smarty->assign(array(
'DATA_P2P' => $vars_p2p,
'price' => number_format($total_to_pay, 2, '.', ''),
'cart' => $this->context->cart,
));
$display .= $this->display(__FILE__, 'payment.tpl');
}
if (Configuration::get('YA_BILLING_ACTIVE')) {
$vars_billing = Configuration::getMultiple(array(
'YA_BILLING_ACTIVE',
'YA_BILLING_ID',
'YA_BILLING_PURPOSE',
'YA_BILLING_END_STATUS',
));
$this->context->smarty->assign(array(
'DATA_BILLING' => $vars_billing,
'price' => number_format($total_to_pay, 2, '.', ''),
'cart' => $this->context->cart,
));
$display .= $this->display(__FILE__, 'payment_ya_billing.tpl');
}
if (Configuration::get('YA_ORG_ACTIVE')) {
$vars_org = Configuration::getMultiple(array(
'YA_ORG_SHOPID',
'YA_ORG_SCID',
'YA_ORG_ACTIVE',
'YA_ORG_TYPE',
'YA_ORG_MIN',
));
$this->context->smarty->assign(array(
'DATA_ORG' => $vars_org,
'yandex_logo' => Configuration::get('YA_ORG_PAYLOGO_ON'),
'id_cart' => $params['cart']->id,
'customer' => new Customer($params['cart']->id_customer),
'address' => new Address($this->context->cart->id_address_delivery),
'total_to_pay' => number_format($total_to_pay, 2, '.', ''),
'this_path_ssl' => Tools::getShopDomainSsl(true, true)
. __PS_BASE_URI__ . 'modules/' . $this->name . '/',
'shop_name' => Configuration::get('PS_SHOP_NAME'),
));
$payments = Configuration::getMultiple(array(
'YA_ORG_PAYMENT_YANDEX',
'YA_ORG_PAYMENT_CARD',
'YA_ORG_PAYMENT_MOBILE',
'YA_ORG_PAYMENT_WEBMONEY',
'YA_ORG_PAYMENT_TERMINAL',
'YA_ORG_PAYMENT_SBER',
'YA_ORG_PAYMENT_PB',
'YA_ORG_PAYMENT_MA',
'YA_ORG_PAYMENT_QW',
'YA_ORG_PAYMENT_CR',
'YA_ORG_PAYMENT_ALFA',
));
if (Configuration::get('YA_ORG_INSIDE')) {
if ($payments['YA_ORG_PAYMENT_YANDEX']) {
$this->smarty->assign(array(
'pt' => 'PC',
'buttontext' => $this->l('Payment from the purse in Yandex.Money.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_CARD']) {
$this->smarty->assign(array(
'pt' => 'AC',
'buttontext' => $this->l('Arbitrary payment with Bank card.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_MOBILE']) {
$this->smarty->assign(array(
'pt' => 'MC',
'buttontext' => $this->l('Payment with mobile phone account.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_WEBMONEY']) {
$this->smarty->assign(array(
'pt' => 'WM',
'buttontext' => $this->l('Payment of the purse in system WebMoney.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_TERMINAL']) {
$this->smarty->assign(array(
'pt' => 'GP',
'buttontext' => $this->l('Payment in cash through cash desks and terminals.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_SBER']) {
$this->smarty->assign(array(
'pt' => 'SB',
'buttontext' => $this->l('Payment via Sberbank: payment by SMS or Sberbank Online.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_ALFA']) {
$this->smarty->assign(array(
'pt' => 'AB',
'buttontext' => $this->l('Payment via Alfa-Click.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_PB']) {
$this->smarty->assign(array(
'pt' => 'PB',
'buttontext' => $this->l('Payments via Promsvyazbank.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_MA']) {
$this->smarty->assign(array(
'pt' => 'MA',
'buttontext' => $this->l('Payment via MasterPass.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_QW']) {
$this->smarty->assign(array(
'pt' => 'QW',
'buttontext' => $this->l('Payment via QIWI Wallet.'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
if ($payments['YA_ORG_PAYMENT_CR']) {
$this->smarty->assign(array(
'pt' => 'CR',
'buttontext' => $this->l('Pay in Parts'),
));
$display .= $this->display(__FILE__, 'kassa.tpl');
}
} else {
$display .= $this->display(__FILE__, 'kassa_outside.tpl');
}
}
return $display;
}