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

VladDev

Newbie
  
  • Posts

    8
  • Joined

  • Last visited

VladDev's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Спасибо Вам огромное, Shalan! Наконец-то заработало как нужно! Проблема решена!
  2. Это работает, но выводит только в стандартной валюте, т.е. в ДОЛЛАРАХ. Не реагирует на смену валюты. Пробовал вот так: $discounts = $this->model_catalog_product->getProductDiscounts($result['product_id']); $data['discounts'] = array(); foreach ($discounts as $discount) { $data['discounts'][] = array( 'quantity' => $discount['quantity'], 'price' => $this->currency->format($this->tax->calculate($discount['price'], $result['tax_class_id'], $this->config->get('config_tax'))) ); } $data['products'][] = array( ... 'discounts' => $discounts ); Все равно не пересчитывает в другую валюту.
  3. В catalog/controller/module/popular.php после строк: if ($this->config->get('config_review_status')) { $rating = $result['rating']; } else { $rating = false; } добавил: $discounts = $this->model_catalog_product->getProductDiscounts($result['product_id']); $data['discounts'] = array(); foreach ($discounts as $discount) { $data['discounts'][] = array( 'quantity' => $discount['quantity'], 'price' => $this->currency->format($this->tax->calculate($discount['price'], $result['tax_class_id'], $this->config->get('config_tax'))) ); } здесь же, после строки: $data['products'][] = array( добавил: 'discounts' => $discounts, В catalog/view/theme/default/template/module/popular.tpl добавил: <?php if ($product['discounts']) { ?> <?php foreach ($product['discounts'] as $discount) { ?> <p><?php echo $discount['price'] ?></p> <p> от <?php echo $discount['quantity'] ?> ед.</p> <?php } ?> <?php } ?> Работает, но выводится discount цена только в ДОЛЛАРАХ, и не реагирует на смену валют. Что это может быть, почему не отрабатывает "$this->currency" ?
  4. Возможно я неправильно поставил вопрос. Например, в дефолтном модуле "Товары со скидкой" (module/special) выводятся две цены: акционная (устанавливается на вкладке акции) и перечеркнутая стандартная. Но мне нужно вывести еще скидочную (количественную)(вкладка скидки) цену. Возможно это реализовать? На странице продукта она выводится без проблем, а в модулях ее нет.
  5. В магазине должно быть 2 цены - опт. и розн. Оптовая цена реализована через "скидки"(discount). В контроллере продукта (catalog/controller/product/product.php) как я понимаю этот код отвечает за оптовую цену: $discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']); $data['discounts'] = array(); foreach ($discounts as $discount) { $data['discounts'][] = array( 'quantity' => $discount['quantity'], 'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) ); } Как его правильно добавить в контроллеры module/special, popular, related и т.д.?
  6. Действительно в консоли событие было заблокировано браузерным блокировщиком рекламы. Проблема решена. Спасибо.
  7. OcStore 2.1.0.2.1 При попытке очистить кэш через админку (octeam_tools/cache) вылетает алерт "error undefined". В журнале ошибок нет. Что это может быть? Где искать проблему?
×
×
  • 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.