Leaderboard
Popular Content
Showing content with the highest reputation on 11/24/2011 in all areas
-
Правильное решение! У себя давно так сделал. Например, когда пользователи видят в капче "01a34a" они пишут её в русской раскладке, и соответственно не могут отправить отзыв или письмо. У меня версия 0.2.0, с 1.5.3 капчи вроде одинаковые. В файле system/library/captcha.php я сделал так: код function __construct() { $this->code = substr(sha1(mt_rand()), 17, 6); } заменил на function __construct() { $this->code = substr(crc32(mt_rand()), 1, 4); } В таком примере капча будет генериться из цифр. Число 4-х значное. Можно убрать кружки на заднем фоне (точнее покрасить в белый цвет, чтобы не было их видно) imagefilledellipse($image, ceil(rand(5, 145)), ceil(rand(0, 35)), 30, 30, $white); imagefilledellipse($image, ceil(rand(5, 145)), ceil(rand(0, 35)), 30, 30, $white); imagefilledellipse($image, ceil(rand(5, 145)), ceil(rand(0, 35)), 30, 30, $white); И ещё вместо генерируемой картинке jpeg сделать в png (jpeg больше весит + видны артефакты сжатия) нужно код header('Content-type: image/jpeg'); imagejpeg($image); заменить на header('Content-type: image/png'); imagepng($image);3 points
-
Впринципи можно и переименовать рубли на гривны... А вообще валюта добавляется в админке. Захоим в: Система->Локализация->Валюта Нажимаем на кнопку ДОБАВИТЬ, заполняем поля... Затем переходим в: Система->Настройки, нажимаем кнопку изменить Переходим на вкладку ЛОКАЛИЗАЦИЯ Находим поле ВАЛЮТА выбираем какая нужна и сохраняем....теперь по-умолчанию на сайте валюта Гривна1 point
-
Как вариант в catalog\model\shipping\ems.php заменить if($response_array['rsp']['stat'] == 'ok') { $quote_data['ems'] = array( 'code' => 'ems.ems', 'title' => $this->language->get('shipping_to') . $to_name, 'cost' => $response_array['rsp']['price'], 'tax_class_id' => 0, 'text' => $this->currency->format($response_array['rsp']['price']) );НА if($response_array['rsp']['stat'] == 'ok') { $sum_cart = $this->cart->getTotal(); ///////////переменная с суммой корзины $quote_data['ems'] = array( 'code' => 'ems.ems', 'title' => $this->language->get('shipping_to') . $to_name, 'cost' => $response_array['rsp']['price'], 'tax_class_id' => 0, 'text' => ceil($this->currency->format($response_array['rsp']['price'])+(($this->currency->format($response_array['rsp']['price'])+$sum_cart)*0.01))////////Высчитываем стоимость сучетом наложенного платежа );1 point
-
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
-
Присоединюсь, так и не понял что именно делать. Знаю что Vetal решил данный вопрос, но он не отвечает. Спасибо. UPD Нашел ув.Vetal на другом форуме. Благодаря ему проблема решилась. Вся работа выполнена ув.Vetal , я только копипастю. Открываем ..catalog/controller/product/product.php после $discount = $this->model_catalog_product->getProductDiscount($this->request->get['product_id']);вставляем $this->data['price_'] = $this->currency->convert($product_info['price'], 'USD', 'UAN');Лучше конвертить с Доллара, поскольку выйдет целое число.Потом $this->data['products'][] = array( 'product_id' => $result['product_id'], 'name' => $result['name'], 'model' => $result['model'], 'rating' => $rating, 'stars' => sprintf($this->language->get('text_stars'), $rating), 'price' => $price,...Вставил ниже 'price_' => $price_ , Теперь выводим в шаблоне catalog/view/theme/ваш шаблон по замовчуванню/template/product/product.tpl Находим <tr> <td><b><?php echo $text_price; ?></b></td> <td><?php if (!$special) { ?> <b><span style="color:#f79613 ; font-size: 16px; font-weight: 700; "> <?php echo $price; ?></span> Вставляем после <span style="color:#999999 ; font-size: 13px; font-weight: 700; "> /<?php echo $price_; ?> грн.</span> </b>Главное не нахимичить с кодировкой.Как подчеркнул Автор, этот вариант не есть выход из ситуации, и подходит для Детального описания товара. --------------------------------------------------------------------------------------------------------- Отсебятина. Если конвертим не с Доллара, конечное число нужно округлить: <?php echo (round($price_)); ?> УПД font-weight: 700, нужно убрать, тк. данный параметр "ломает" шаблон в ИЕ1 point
-
Там ровно 9 строчек с message. Если экспериментировать (вставлять "1" в каждую, сохранять, обновлять статус заказа, смотреть на приходящее письмо) по 1мин7сек то можно потратить 10 минут (это меньше, чем прошло с момента написания вопроса и получения ответа на него) и узнать, что строка: $message .= $language->get('text_invoice') . "\n";отвечает за вывод текста а строка: $message .= $order_query->row['store_url'] . 'index.php?route=account/invoice&order_id=' . $order_id . "\n\n";отвечает за P.S. Более того, если поставить в каждой стрчоке разные цифры, то к тому же выводу можно придти за 1 минуту и 47 секунд, что в общей сумме дает примерно 9 минут выгоды, т.е. кипячение неполного чайника, налития воды, размешивание кофе и удобного усиживания на стол. А так вы добились несколько других вещей: 1) я наконец-то исправил ошибку в своем письме покупателям (лень было лезть в код) 2) поупражнялся в остроумии 3) вы получили готовое решение, вместо его поисков, а значит в следующий раз опять будете спрашивать, вместого того что бы потратить время на изучение вопроса.1 point