function step3() { $jshopConfig = JSFactory::getConfig(); $checkoutStep = JSFactory::getModel('checkoutStep', 'jshop'); $checkout = JSFactory::getModel('checkoutPayment', 'jshop'); $checkout->checkStep(3); $dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onLoadCheckoutStep3', array()); if ($jshopConfig->without_payment) { $next_step = $checkoutStep->getNextStep(3); $checkout->setMaxStep($next_step); $this->setRedirect($checkoutStep->getCheckoutUrl($next_step)); return 0; } $cart = JSFactory::getModel('cart', 'jshop'); $cart->load(); $checkout->setCart($cart); $adv_user = JSFactory::getUser(); JshopHelpersMetadata::checkoutPayment(); $checkout_navigator = $checkout->showCheckoutNavigation(3); $small_cart = $checkout->loadSmallCart(3); $paym = $checkout->getCheckoutListPayments(); $active_payment = $checkout->getCheckoutActivePayment($paym, $adv_user); $first_payment_class = $checkout->getCheckoutFirstPaymentClass($paym); if ($jshopConfig->hide_payment_step) { if (!$first_payment_class) { JError::raiseWarning("", _JSHOP_ERROR_PAYMENT); return 0; } $this->setRedirect($checkoutStep->getCheckoutUrl('step3save&payment_method=' . $first_payment_class)); return 0; } $view = $this->getView("checkout"); $view->setLayout("payments"); $view->assign('payment_methods', $paym); $view->assign('active_payment', $active_payment); $view->assign('checkout_navigator', $checkout_navigator); $view->assign('small_cart', $small_cart); $view->assign('action', $checkoutStep->getCheckoutUrl('step3save', 0, 0)); $dispatcher->trigger('onBeforeDisplayCheckoutStep3View', array(&$view)); $view->display(); }