public function hookdisplayPayment($params) { if (!$this->active) { return; } if (!$this->checkCurrency($params['cart'])) { return; } require_once dirname(__FILE__) . '/classes/UniPaySystem.php'; $paysystems = UniPaySystem::getPaySystems($this->context->language->id, true, $this->context->cart->id_carrier, $this->context->customer->getGroups()); foreach ($paysystems as &$paysystem) { $paysystem['description'] = str_replace(array('%total%'), array(Tools::DisplayPrice($params['cart']->getOrderTotal(true, Cart::BOTH))), $paysystem['description']); } unset($paysystem); $this->smarty->assign(array('this_path' => $this->_path, 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/' . $this->name . '/', 'universalpay' => $paysystems, 'universalpay_onepage' => Configuration::get('universalpay_onepage'))); return $this->display(__FILE__, 'payment.tpl'); }
public function getPaySystems($params) { if ($this->paysystems) { return $this->paysystems; } require_once dirname(__FILE__) . '/classes/UniPaySystem.php'; $paysystems = UniPaySystem::getPaySystems($this->context->language->id, true, $this->context->cart->id_carrier, $this->context->customer->getGroups()); foreach ($paysystems as &$paysystem) { $paysystem['description'] = str_replace(array('%total%'), array(Tools::DisplayPrice($params['cart']->getOrderTotal(true, Cart::BOTH))), $paysystem['description']); } unset($paysystem); $this->paysystems = $paysystems; return $paysystems; }