$query = ShopCore::$ci->users->get_user_by_username($username) AND $query->num_rows() == 1) { $row = $query->row(); $profile = SUserProfileQuery::create()->filterById($row->id)->findOne(); if ($profile === null && $val) { // Create profile on user register from front $profile = new SUserProfile; $profile->setUserId($row->id); $profile->setUserEmail($row->email); $profile->setName($_POST[\'userInfo\'][\'fullName\']); $profile->setDateCreated(strtotime($row->created)); $profile->setKey($row->key); $profile->setPhone($row->phone); $profile->setAddress($row->address); $profile->save(); } else if ($profile === null && $userInfo) { // Create profile in admin panel $profile = new SUserProfile; $profile->setUserId($row->id); $profile->setName($_POST[\'userInfo\'][\'fullName\']); $profile->setAddress($_POST[\'userInfo\'][\'deliverTo\']); $profile->setPhone($_POST[\'userInfo\'][\'phone\']); $profile->setUserEmail($row->email); $profile->setPhone($row->phone); $profile->setAddress($row->address); $profile->setDateCreated(strtotime($row->created)); $profile->setKey($row->key); $profile->save(); } }', 'users_user_created' => 'if ($query = ShopCore::$ci->users->get_user_by_email($user) AND $query->num_rows() == 1) { $row = $query->row(); $profile = SUserProfileQuery::create()->filterById($row->id)->findOne(); if ($profile === null) { // Create profile $profile = new SUserProfile; $profile->setUserId($row->id); $profile->setUserEmail($row->email); $profile->setAddress($row->address); $profile->setKey($row->key); $profile->setPhone($row->phone); $profile->setDateCreated(strtotime($row->created)); $profile->save(); } }', 'auth_reg_set_rules' => 'if(isset($_POST[\'email\'])) $_POST[\'username\'] = $_POST[\'email\']; $val->set_rules(\'userInfo[fullName]\', \'ФИО\', \'trim|required|xss_clean\'); unset($this->form_validation->_field_data[\'username\']);', 'admin_language_delete' => 'if($lang[\'default\'] != 1){ $language = $lang[\'identif\']; //delete this language for all translatable shop models SCategoryI18nQuery::create()->filterByLocale($language)->delete(); SProductsI18nQuery::create()->filterByLocale($language)->delete(); SBrandsI18nQuery::create()->filterByLocale($language)->delete(); SProductVariantsI18nQuery::create()->filterByLocale($language)->delete(); SPropertiesI18nQuery::create()->filterByLocale($language)->delete(); SNotificationStatusesI18nQuery::create()->filterByLocale($language)->delete(); SDeliveryMethodsI18nQuery::create()->filterByLocale($language)->delete(); SOrderStatusesI18nQuery::create()->filterByLocale($language)->delete(); SPaymentMethodsI18nQuery::create()->filterByLocale($language)->delete(); //settings doesn\'t have I18n Behavior $settingsTranslatableFields = ShopCore::app()->SSettings->getTranslatableFields(); ShopSettingsQuery::create()->filterByLocale($language)->where(\'ShopSettings.Name IN ?\', $settingsTranslatableFields)->delete(); SCallbackStatusesI18nQuery::create()->filterByLocale($language)->delete(); SCallbackThemesI18nQuery::create()->filterByLocale($language)->delete(); }', 'core_init' => '', 'render_google_analytics' => '$GACode = "
Наличие уточняйте у менеджера
Обратитесь к консультанту