smarty = new stSmarty('stSantanderRatyFrontend'); $this->smarty->assign('id_wniosku', $this->getRequestParameter('id_wniosku')); } public function executeCanceled() { $this->smarty = new stSmarty('stSantanderRatyFrontend'); } public function executePay() { $smarty = new stSmarty('stSantanderRatyFrontend'); $paymentType = stPaymentType::get($this->getRequestParameter('type')); $order = OrderPeer::retrieveByIdAndHashCode($this->getRequestParameter('order_id'), $this->getRequestParameter('order_hash')); $totalQuantity = count($order->getOrderProducts()); if ($order->getOrderDelivery()->getCostBrutto(true) > 0) { $totalQuantity += 1; } $smarty->assign('order', $order); $smarty->assign('order_total_amount', $order->getTotalAmountWithDelivery(true, true)); $smarty->assign('order_total_quantity', $totalQuantity); $smarty->assign('payment_type', $order->getOrderPayment()->getPaymentType()); $smarty->assign('shop_number', stConfig::getInstance('stSantanderRatyBackend')->get('shop_number')); $smarty->assign('order_delivery', $order->getOrderDelivery()->getName()); $smarty->assign('client', array( 'name' => $order->getOrderUserDataBilling()->getName(), 'surname' => $order->getOrderUserDataBilling()->getSurname(), 'email' => $order->getOptClientEmail(), )); $smarty->assign('url_accepted', $paymentType->getReturnUrl($order).'?id='); $smarty->assign('url_canceled', $paymentType->getReturnUrl($order).'?canceled=1&id='); $this->smarty = $smarty; } }