예제 #1
0
 public function execute()
 {
     parent::execute();
     $this->view->assign('my_nav_selected', 'profile');
     $user = wa()->getUser();
     $user_info = array();
     foreach ($this->form->fields as $id => $field) {
         if (!in_array($id, array('password', 'password_confirm'))) {
             if ($id === 'photo') {
                 $user_info[$id] = array('name' => _ws('Photo'), 'value' => '<img src="' . $user->getPhoto() . '">');
             } else {
                 $user_info[$id] = array('name' => $this->form->fields[$id]->getName(null, true), 'value' => $user->get($id, 'html'));
             }
         }
     }
     $this->view->assign('user_info', $user_info);
     // Set up layout and template from theme
     $this->setThemeTemplate('my.profile.html');
     if (!waRequest::isXMLHttpRequest()) {
         $this->setLayout(new photosDefaultFrontendLayout());
         $this->getResponse()->setTitle(_w('My account') . ' — ' . _w('My profile'));
         $this->layout->assign('breadcrumbs', $this->getBreadcrumbs());
         $this->layout->assign('nofollow', true);
     }
 }
예제 #2
0
 public function execute()
 {
     parent::execute();
     $this->view->assign('my_nav_selected', 'profile');
     // Set up layout and template from theme
     $this->setThemeTemplate('my.profile.html');
     if (!waRequest::isXMLHttpRequest()) {
         $this->setLayout(new siteFrontendLayout());
         $this->getResponse()->setTitle(_w('My account') . ' — ' . _w('My profile'));
         $this->layout->assign('breadcrumbs', $this->getBreadcrumbs());
         $this->layout->assign('nofollow', true);
     }
 }
 protected function getForm()
 {
     $domain = wa()->getRouting()->getDomain();
     $domain_config_path = wa()->getConfig()->getConfigPath('domains/' . $domain . '.php', true, 'site');
     if (file_exists($domain_config_path)) {
         $domain_config = (include $domain_config_path);
     } else {
         $domain_config = array();
     }
     if (!empty($domain_config['personal_fields'])) {
         return parent::getForm();
     }
     return shopHelper::getCustomerForm(null, true);
 }