x1nz
-
Публікації
29 -
З нами
-
Відвідування
Тип публікації
Профілі
Форум
Маркетплейс
Статті
FAQ
Наші новини
Магазин
Блоги
module__dplus_manager
Повідомлення, опубліковані користувачем x1nz
-
-
Ребят, а если есть работающий магазин на 1.5.5, при переходе на 2.1 можно ли базу оставить от 1.5.5? Или нужны правки?
-
В модуле нет главного , для чего можно было бы его использовать. Это вывод похожих товаров по названию или производителю(
Хотя бы глобально по производителю.
-
Такой же вопрос, как сделать что бы схема полностью наследовалась на второй магазин. У меня есть domen.ru и есть original.domen.ru, в настройках хостинга указал оба на одну и ту же папку. Создал второй магазин , прописал ссылку. Нужно что бы и первый и второй были полностью одинаковые. Разница будет только в товаре. Помогите пожалуйста.
-
Посмотрел демо модуль , нет того , чего нужно. Можно ли как то привязать модуль в выбранной опции?
Пример, есть товар под заказ , опции 100% предоплата + 0 денег , 15% предоплата +200 денег , нужно что бы при выборе опции 100% предоплата , модуль не отображал ее , а при выборе 15% предоплата отображал после Итого сумму предоплаты от общей цены с учетом + 200 денег
-
catalog\view\theme\default\template\product\category.tpl
Спасибо , помогло :-)
-
Шаблон дефолтный. Просто скажи в каком файле закомментировать.
-
Подкатегории нужны только в главном меню. Нужно просто что бы при нажатии на главную категорию отображались сразу товары в ней , а при нажатии на подкатегорию - товары этой подкатегории.
Главная категория - все товары , Главная категория - подкатегория - товары этой подкатегории.
-
-
-
Попробуйте внести изменения из xml файлов непосредственно в файлы движка.
-
2 этих модуля работают через vqmod ?
-
Добрый день ув. форумчане. Столкнулся с такой проблемой , в целях отладки перенес сайт с хостинга на денвер , и случилась бида , на денвере не открываются папки с картинками , в которых есть кириллические символы. На хостинге все работало ок. То есть , на товарах просто пропали картинки , из админки , редактирование товара , добавление картинки , не открывает папки , в которых есть картинки с кириллическими названиями. Можно как то вылечить , товаров много , картинок тоже много , и переименовывать все на латиницу и заного добавлять очень долго.
ЗЫ: если даже положить любую картинку в корень image/data с русским названием, то в админки перестают отображаться все картинки , которые находятся image/data
-
Для использования скрипта нужно что бы на хостинге были разрешены исходящие соединения?
ЗЫ: плохо , что нет демо версии какой то , что бы можно было проверить работоспособность на своем хостинге , поэтому приходится качать не пойми откуда для проверки. На моем хостинге например не работает данный модуль , на POST запрос , подключение к API 502 ошибка , хостер сказал , что исходящие соединения закрыты и открываться не будут.
-
Добрый день , какие доп модули могут мешать работе Вашего , или со всеми дружит ?
-
Проблема решена , closed.
$stock_status = $product_info['stock_status']; $stock_qty = $product_info['quantity']; $this->data['products'][] = array( 'product_id' => $product_info['product_id'], 'thumb' => $image, 'name' => $product_info['name'], 'price' => $price, 'stock_status' => $stock_status, 'stock_qty' => $stock_qty, 'special' => $special, 'rating' => $rating, 'reviews' => sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']), 'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id']), );
-
В общем скачал модуль , который проверяет кол-во на складе , и если на складе 0 , ставит статус из карточки товара.
Написан для всех стандартных модулей
Часть кода для стандартного модуля:
</add> </operation> </file> <file name="catalog/controller/module/bestseller.php"> <operation> <search position="before" error="skip"><![CDATA[$this->data['products'][] = array(]]></search> <add><![CDATA[$stock_status = $result['stock_status']; $stock_qty = $result['quantity'];]]></add> </operation> <operation> <search position="after" offset="4" error="skip"><![CDATA[$this->data['products'][] = array(]]></search> <add><![CDATA['stock_status' => $stock_status, 'stock_qty' => $stock_qty,]]></add> </operation> </file> <file name="catalog/view/theme/default/template/module/bestseller.tpl"> <operation> <search position="replace" error="skip"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />]]></search> <add><![CDATA[<?php if ($product['stock_qty'] <= 0) { echo "<span style=\"color: #CC5800; font-size: 16px;\"><span class=\"outofstock\">" . $product['stock_status'] . "</span></span>"; } else { echo "<input type=\"button\" value=\"" . $button_cart . "\" onclick=\"addToCart('" . $product['product_id'] . "');\" class=\"button\" />"; } ?> ]]>
Но я добавил еще один модуль "Карусель продуктов" , и переделываю по аналогии. В catalog/controller/module/product_carousel.tpl прописал
</operation> </file> <file name="catalog/view/theme/default/template/module/product_carousel.tpl"> <operation> <search position="replace" error="skip"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />]]></search> <add><![CDATA[<?php if ($product['stock_qty'] <= 0) { echo "<span style=\"color: #CC5800; font-size: 16px;\"><span class=\"outofstock\">" . $product['stock_status'] . "</span></span>"; } else { echo "<input type=\"button\" value=\"" . $button_cart . "\" onclick=\"addToCart('" . $product['product_id'] . "');\" class=\"button\" />"; } ?> ]]>
Тут проблем нет , а вот в product_carousel.php получается 3 case. Меняю везде по аналогии , и в Новых товарах и в акциях работает , а в Рекомендуемые не работает , вобще не показывается кнопка.
Новые товары:
case 2: $data = array( 'sort' => 'p.date_added', 'order' => 'DESC', 'start' => 0, 'limit' => $this->data['limit'] ); $results = $this->model_catalog_product->getProducts($data); foreach ($results as $result) { if ($result['image']) { $image = $this->model_tool_image->resize($result['image'], $setting['image_width'], $setting['image_height']); } else { $image = false; } if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $price = false; } if ((float)$result['special']) { $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $special = false; } if ($this->config->get('config_review_status')) { $rating = $result['rating']; } else { $rating = false; } $stock_status = $result['stock_status']; $stock_qty = $result['quantity']; $this->data['products'][] = array( 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'price' => $price, 'stock_status' => $stock_status, 'stock_qty' => $stock_qty, 'special' => $special, 'rating' => $rating, 'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']), 'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']), ); //Get the title from the language file $this->data['heading_title']=$this->language->get('heading_title_latest'); } break;
Акции:
case 3: $data = array( 'sort' => 'pd.name', 'order' => 'ASC', 'start' => 0, 'limit' => $setting['limit'] ); $results = $this->model_catalog_product->getProductSpecials($data); foreach ($results as $result) { if ($result['image']) { $image = $this->model_tool_image->resize($result['image'], $setting['image_width'], $setting['image_height']); } else { $image = false; } if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $price = false; } if ((float)$result['special']) { $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $special = false; } if ($this->config->get('config_review_status')) { $rating = $result['rating']; } else { $rating = false; } $stock_status = $result['stock_status']; $stock_qty = $result['quantity']; $this->data['products'][] = array( 'product_id' => $result['product_id'], 'thumb' => $image, 'name' => $result['name'], 'price' => $price, 'stock_status' => $stock_status, 'stock_qty' => $stock_qty, 'special' => $special, 'rating' => $rating, 'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']), 'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']), ); //Get the title from the language file $this->data['heading_title']=$this->language->get('heading_title_special'); } break; default: break;
Тут все хорошо , а вот case1 , вставил все по аналогии , но тут не появляется даже кнопка
case 1: $products = explode(',', $this->config->get('featured_product')); //print_r($products);exit; $products = array_slice($products, 0, (int)$this->data['limit']); foreach ($products as $product_id) { $product_info = $this->model_catalog_product->getProduct($product_id); if ($product_info) { if ($product_info['image']) { $image = $this->model_tool_image->resize($product_info['image'], $setting['image_width'], $setting['image_height']); } else { $image = false; } if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))); } else { $price = false; } if ((float)$product_info['special']) { $special = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax'))); } else { $special = false; } if ($this->config->get('config_review_status')) { $rating = $product_info['rating']; } else { $rating = false; } $stock_status = $result['stock_status']; $stock_qty = $result['quantity']; $this->data['products'][] = array( 'product_id' => $product_info['product_id'], 'thumb' => $image, 'name' => $product_info['name'], 'price' => $price, 'stock_status' => $stock_status, 'stock_qty' => $stock_qty, 'special' => $special, 'rating' => $rating, 'reviews' => sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']), 'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id']), ); //Get the title from the language file $this->data['heading_title']=$this->language->get('heading_title_featured'); } } break;
Вот тут не работает. И ошибку еще выдает
2014-01-28 12:48:19 - PHP Notice: Undefined variable: result in /catalog/controller/module/product_carousel.php on line 662014-01-28 12:48:19 - PHP Notice: Undefined variable: result in /catalog/controller/module/product_carousel.php on line 67$stock_status = $result['stock_status']; $stock_qty = $result['quantity']; $this->data['products'][] = array( 'product_id' => $product_info['product_id'], 'thumb' => $image, 'name' => $product_info['name'], 'price' => $price, 'stock_status' => $stock_status, 'stock_qty' => $stock_qty, 'special' => $special, 'rating' => $rating, 'reviews' => sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']), 'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id']), ); //Get the title from the language file $this->data['heading_title']=$this->language->get('heading_title_featured'); } } break;
Рекомендуемые , это case1. Помогите разобраться.
-
У меня их нет , куда мне их вставить , в какое место ?
-
Captcha при входе в админку под версию 1.5.5.1.1
-
Напишите в ЛС адрес сайта или доступ к вашему сайту.
так у меня заработало , написал же выше :-)
- 1
-
Покажите под спойлером код файла: catalog\controller\account\login.php
class ControllerAccountLogin extends Controller {
private $error = array();
public function index() {
$this->load->model('account/customer');
// Login override for admin users
if (!empty($this->request->get['token'])) {
$this->customer->logout();
$this->cart->clear();
unset($this->session->data['wishlist']);
unset($this->session->data['shipping_address_id']);
unset($this->session->data['shipping_country_id']);
unset($this->session->data['shipping_zone_id']);
unset($this->session->data['shipping_postcode']);
unset($this->session->data['shipping_method']);
unset($this->session->data['shipping_methods']);
unset($this->session->data['payment_address_id']);
unset($this->session->data['payment_country_id']);
unset($this->session->data['payment_zone_id']);
unset($this->session->data['payment_method']);
unset($this->session->data['payment_methods']);
unset($this->session->data['comment']);
unset($this->session->data['order_id']);
unset($this->session->data['coupon']);
unset($this->session->data['reward']);
unset($this->session->data['voucher']);
unset($this->session->data['vouchers']);
$customer_info = $this->model_account_customer->getCustomerByToken($this->request->get['token']);
if ($customer_info && $this->customer->login($customer_info['email'], '', true)) {
// Default Addresses
$this->load->model('account/address');
$address_info = $this->model_account_address->getAddress($this->customer->getAddressId());
if ($address_info) {
if ($this->config->get('config_tax_customer') == 'shipping') {
$this->session->data['shipping_country_id'] = $address_info['country_id'];
$this->session->data['shipping_zone_id'] = $address_info['zone_id'];
$this->session->data['shipping_postcode'] = $address_info['postcode'];
}
if ($this->config->get('config_tax_customer') == 'payment') {
$this->session->data['payment_country_id'] = $address_info['country_id'];
$this->session->data['payment_zone_id'] = $address_info['zone_id'];
}
} else {
unset($this->session->data['shipping_country_id']);
unset($this->session->data['shipping_zone_id']);
unset($this->session->data['shipping_postcode']);
unset($this->session->data['payment_country_id']);
unset($this->session->data['payment_zone_id']);
}
$this->redirect($this->url->link('common/home', '', 'SSL'));
}
}
if ($this->customer->isLogged()) {
$this->redirect($this->url->link('common/home', '', 'SSL'));
}
$this->language->load('account/login');
$this->document->setTitle($this->language->get('heading_title'));
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
unset($this->session->data['guest']);
// Default Shipping Address
$this->load->model('account/address');
$address_info = $this->model_account_address->getAddress($this->customer->getAddressId());
if ($address_info) {
if ($this->config->get('config_tax_customer') == 'shipping') {
$this->session->data['shipping_country_id'] = $address_info['country_id'];
$this->session->data['shipping_zone_id'] = $address_info['zone_id'];
$this->session->data['shipping_postcode'] = $address_info['postcode'];
}
if ($this->config->get('config_tax_customer') == 'payment') {
$this->session->data['payment_country_id'] = $address_info['country_id'];
$this->session->data['payment_zone_id'] = $address_info['zone_id'];
}
} else {
unset($this->session->data['shipping_country_id']);
unset($this->session->data['shipping_zone_id']);
unset($this->session->data['shipping_postcode']);
unset($this->session->data['payment_country_id']);
unset($this->session->data['payment_zone_id']);
}
// Added strpos check to pass McAfee PCI compliance test (http://forum.opencart.com/viewtopic.php?f=10&t=12043&p=151494#p151295)
if (isset($this->request->post['redirect']) && (strpos($this->request->post['redirect'], $this->config->get('config_url')) !== false || strpos($this->request->post['redirect'], $this->config->get('config_ssl')) !== false)) {
$this->redirect(str_replace('&', '&', $this->request->post['redirect']));
} else {
$this->redirect($this->url->link('common/home', '', 'SSL'));
}
}
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_account'),
'href' => $this->url->link('account/account', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_login'),
'href' => $this->url->link('account/login', '', 'SSL'),
'separator' => $this->language->get('text_separator')
);
$this->data['heading_title'] = $this->language->get('heading_title');
$this->data['text_new_customer'] = $this->language->get('text_new_customer');
$this->data['text_register'] = $this->language->get('text_register');
$this->data['text_register_account'] = $this->language->get('text_register_account');
$this->data['text_returning_customer'] = $this->language->get('text_returning_customer');
$this->data['text_i_am_returning_customer'] = $this->language->get('text_i_am_returning_customer');
$this->data['text_forgotten'] = $this->language->get('text_forgotten');
$this->data['entry_email'] = $this->language->get('entry_email');
$this->data['entry_password'] = $this->language->get('entry_password');
$this->data['button_continue'] = $this->language->get('button_continue');
$this->data['button_login'] = $this->language->get('button_login');
if (isset($this->error['warning'])) {
$this->data['error_warning'] = $this->error['warning'];
} else {
$this->data['error_warning'] = '';
}
$this->data['action'] = $this->url->link('account/login', '', 'SSL');
$this->data['register'] = $this->url->link('account/register', '', 'SSL');
$this->data['forgotten'] = $this->url->link('account/forgotten', '', 'SSL');
// Added strpos check to pass McAfee PCI compliance test (http://forum.opencart.com/viewtopic.php?f=10&t=12043&p=151494#p151295)
if (isset($this->request->post['redirect']) && (strpos($this->request->post['redirect'], $this->config->get('config_url')) !== false || strpos($this->request->post['redirect'], $this->config->get('config_ssl')) !== false)) {
$this->data['redirect'] = $this->request->post['redirect'];
} elseif (isset($this->session->data['redirect'])) {
$this->data['redirect'] = $this->session->data['redirect'];
unset($this->session->data['redirect']);
} else {
$this->data['redirect'] = '';
}
if (isset($this->session->data['success'])) {
$this->data['success'] = $this->session->data['success'];
unset($this->session->data['success']);
} else {
$this->data['success'] = '';
}
if (isset($this->request->post['email'])) {
$this->data['email'] = $this->request->post['email'];
} else {
$this->data['email'] = '';
}
if (isset($this->request->post['password'])) {
$this->data['password'] = $this->request->post['password'];
} else {
$this->data['password'] = '';
}
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/login.tpl')) {
$this->template = $this->config->get('config_template') . '/template/account/login.tpl';
} else {
$this->template = 'default/template/account/login.tpl';
}
$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);
$this->response->setOutput($this->render());
}
protected function validate() {
if (!$this->customer->login($this->request->post['email'], $this->request->post['password'])) {
$this->error['warning'] = $this->language->get('error_login');
}
$customer_info = $this->model_account_customer->getCustomerByEmail($this->request->post['email']);
if ($customer_info && !$customer_info['approved']) {
$this->error['warning'] = $this->language->get('error_approved');
}
if (!$this->error) {
return true;
} else {
return false;
}
}
}
?>
-
В файле catalog\controller\account\login.php найти строчку: $this->redirect($this->url->link('account/account', '', 'SSL')); и соотв. поменять на $this->redirect($this->url->link('common/home', '', 'SSL'));
Думал не работает , потом поменял все 3 строки , заработало. Спасибо
-
Добрый день , подскажите пожалуйста , как сделать редирект после удачного входа на главную страницу.
При удачной авторизации , покупатель попадает сразу в личный кабинет , хотелось бы что бы сразу перенаправляло на главную страницу.
-
Проблема решена. Ошибка была в том , что div был не в header.
-
И как можно совладать с этим прозрачным блоком ?
NewStore - универсальный, адаптивный шаблон [Поддержка]
в Платные шаблоны
Опубліковано:
Зашел в админку, посмотрел логи ошибок
вышел