Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Leaderboard

Popular Content

Showing content with the highest reputation on 04/27/2011 in all areas

  1. 1. Чтобы убрать вылидацию : Находите файл \www\catalog\controller\account\create.php Находите в районе 320 ой строки: private function validate() { if ((strlen(utf8_decode($this->request->post['firstname'])) < 1) || (strlen(utf8_decode($this->request->post['firstname'])) > 32)) { $this->error['firstname'] = $this->language->get('error_firstname'); } if ((strlen(utf8_decode($this->request->post['lastname'])) < 1) || (strlen(utf8_decode($this->request->post['lastname'])) > 32)) { $this->error['lastname'] = $this->language->get('error_lastname'); } if ((strlen(utf8_decode($this->request->post['email'])) > 96) || (!preg_match(EMAIL_PATTERN, $this->request->post['email']))) { $this->error['email'] = $this->language->get('error_email'); } if ($this->model_account_customer->getTotalCustomersByEmail($this->request->post['email'])) { $this->error['warning'] = $this->language->get('error_exists'); } if ((strlen(utf8_decode($this->request->post['telephone'])) < 3) || (strlen(utf8_decode($this->request->post['telephone'])) > 32)) { $this->error['telephone'] = $this->language->get('error_telephone'); } if ((strlen(utf8_decode($this->request->post['address_1'])) < 3) || (strlen(utf8_decode($this->request->post['address_1'])) > 128)) { $this->error['address_1'] = $this->language->get('error_address_1'); } if ((strlen(utf8_decode($this->request->post['city'])) < 3) || (strlen(utf8_decode($this->request->post['city'])) > 128)) { $this->error['city'] = $this->language->get('error_city'); } $this->load->model('localisation/country'); $country_info = $this->model_localisation_country->getCountry($this->request->post['country_id']); if ($country_info && $country_info['postcode_required']) { if ((strlen(utf8_decode($this->request->post['postcode'])) < 2) || (strlen(utf8_decode($this->request->post['postcode'])) > 10)) { $this->error['postcode'] = $this->language->get('error_postcode'); } } if ($this->request->post['country_id'] == 'FALSE') { $this->error['country'] = $this->language->get('error_country'); } if ($this->request->post['zone_id'] == 'FALSE') { $this->error['zone'] = $this->language->get('error_zone'); } if ((strlen(utf8_decode($this->request->post['password'])) < 4) || (strlen(utf8_decode($this->request->post['password'])) > 20)) { $this->error['password'] = $this->language->get('error_password'); } if ($this->request->post['confirm'] != $this->request->post['password']) { $this->error['confirm'] = $this->language->get('error_confirm'); } if ($this->config->get('config_account_id')) { $this->load->model('catalog/information'); $information_info = $this->model_catalog_information->getInformation($this->config->get('config_account_id')); if ($information_info) { if (!isset($this->request->post['agree'])) { $this->error['warning'] = sprintf($this->language->get('error_agree'), $information_info['title']); } } } if (!$this->error) { return TRUE; } else { return FALSE; } } Здесь можно снять обязательное заполнение какого-то поля, просто закомментировав его, например, чтобы не заполнять фамилию, надо поменять if ((strlen(utf8_decode($this->request->post['firstname'])) < 1) || (strlen(utf8_decode($this->request->post['firstname'])) > 32)) { $this->error['firstname'] = $this->language->get('error_firstname'); }на /* if ((strlen(utf8_decode($this->request->post['firstname'])) < 1) || (strlen(utf8_decode($this->request->post['firstname'])) > 32)) { $this->error['firstname'] = $this->language->get('error_firstname'); } */ Так проделываем для всех полей, которые нам не нужны(т.е. просто комментим их). 2. Чтобы поле не показывалось в форме регистрации: Находите файл \www\catalog\view\theme\default\template\account\create.tpl (default - ваша тема, может быть другой) В строках, которые хотим убрать, добавляем style="display:none" пример(убираем фамилию): меняем <tr> <td><span class="required">*</span> <?php echo $entry_lastname; ?></td> <td><input type="text" name="lastname" value="<?php echo $lastname; ?>" /> <?php if ($error_lastname) { ?> <span class="error"><?php echo $error_lastname; ?></span> <?php } ?></td> </tr>на <tr style="display:none"> <td><span class="required">*</span> <?php echo $entry_lastname; ?></td> <td><input type="text" name="lastname" value="<?php echo $lastname; ?>" /> <?php if ($error_lastname) { ?> <span class="error"><?php echo $error_lastname; ?></span> <?php } ?></td> </tr> 3. Ставим мне плюсик :rolleyes:
    1 point
  2. Считается по порядку, просто номер присваевается заказу раньше, чем он отправляется вам. Таким образом люди, не доведшие заказ до конца, все равно увеличивают нумерацию заказов. Можете поглядеть в базе SQL запись что-то типа order.
    1 point
  3. В stylesheet.css добавляешь .e-box { height:75px; } .categories { position: absolute; } .categories h3 { background-position: -531px -3px; cursor: pointer; height: 19px; left: 6px; padding: 10px 10px 10px 20px; position: absolute; text-indent: -9999px; top: -10px; width: 132px; z-index: 1100; } h3 { font-size: 24px; } .categories ul { background-color: #F4F4F4; border: 1px solid #A7A7A7; display: none; left: -1px; list-style: none outside none; padding: 25px 10px 15px; position: absolute; top: 20px; width: 136px; z-index: 1000; } .categories:hover ul { display:block; } .categories ul li { color: #3B3B3A; font-size: 15px; padding: 4px 10px; } .categories ul li a { color: #3B3B3A; font-size: 12px; } .categories ul li ul { border-width: 0 0 0 1px; display: block; margin-top: 5px; padding: 0; position: relative; top: auto; } .sprite { background: url("http://1.envato-static.com/images/sprites/sprite_themeforest.png?1299466799") no-repeat scroll left top transparent; } а файл module/category.tpl делаешь таким <div class="e-box"> <div id="category" class="categories"> <h3 class="sprite"><a title="Categories" href="#">Categories</a></h3> <?php echo $category; ?> </div> </div> оформление уже сам настроишь
    1 point
  4. М-м-м, а темку тоже лень внимательно прочитать?!
    1 point
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.