function step2() { $checkout = JSFactory::getModel('checkout', 'jshop'); $checkout->checkStep(2); $dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onLoadCheckoutStep2', array()); $jshopConfig = JSFactory::getConfig(); $checkLogin = JRequest::getInt('check_login'); if ($checkLogin) { JSFactory::getModel('userlogin', 'jshop')->setPayWithoutReg(); checkUserLogin(); } JshopHelpersMetadata::checkoutAddress(); $adv_user = JSFactory::getUser()->loadDataFromEdit(); $config_fields = $jshopConfig->getListFieldsRegisterType('address'); $count_filed_delivery = $jshopConfig->getEnableDeliveryFiledRegistration('address'); $checkout_navigator = $checkout->showCheckoutNavigation(2); $small_cart = $checkout->loadSmallCart(2); $select_countries = JshopHelpersSelects::getCountry($adv_user->country); $select_d_countries = JshopHelpersSelects::getCountry($adv_user->d_country, null, 'd_country'); $select_titles = JshopHelpersSelects::getTitle($adv_user->title); $select_d_titles = JshopHelpersSelects::getTitle($adv_user->d_title, null, 'd_title'); $select_client_types = JshopHelpersSelects::getClientType($adv_user->client_type); filterHTMLSafe($adv_user, ENT_QUOTES); if ($config_fields['birthday']['display'] || $config_fields['d_birthday']['display']) { JHTML::_('behavior.calendar'); } $view = $this->getView("checkout"); $view->setLayout("adress"); $view->assign('select', $jshopConfig->user_field_title); $view->assign('config', $jshopConfig); $view->assign('select_countries', $select_countries); $view->assign('select_d_countries', $select_d_countries); $view->assign('select_titles', $select_titles); $view->assign('select_d_titles', $select_d_titles); $view->assign('select_client_types', $select_client_types); $view->assign('live_path', JURI::base()); $view->assign('config_fields', $config_fields); $view->assign('count_filed_delivery', $count_filed_delivery); $view->assign('user', $adv_user); $view->assign('delivery_adress', $adv_user->delivery_adress); $view->assign('checkout_navigator', $checkout_navigator); $view->assign('small_cart', $small_cart); $view->assign('action', JSFactory::getModel('checkoutStep', 'jshop')->getCheckoutUrl('step2save', 0, 0)); $dispatcher->trigger('onBeforeDisplayCheckoutStep2View', array(&$view)); $view->display(); }