Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Dart990

Користувачі
  
  • Публікації

    167
  • З нами

  • Відвідування

Dart990's Achievements

Collaborator

Collaborator (7/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

3

Репутація

  1. Работы не много, скорее правки. По ссылке описание. https://opencartforum.com/topic/64614-как-реализовать-ввод-и-вывод-дополнительной-це/?do=findComment&comment=591307
  2. Отметил блоки внизу (1,2,3) в которых нужно добавить правильные участки кода между тегами <search>, и возможно изменить пару переменных в <add>. Работу оплачу! <?xml version="1.0" encoding="UTF-8"?> <modification> <file name="catalog/model/catalog/product.php"> <operation error="skip"> <search position="before"><![CDATA[ public function getTotalProductSpecials() ]]></search> <add><![CDATA[ public function getProductDiscountPrice_Group($product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$product_id . "' ORDER BY price ASC"); if ($query->num_rows > 0) { return $query->row['price']; echo $query->row['price']; } else { } } public function getProductDiscountPrice_Default($product_id) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product WHERE product_id = '" . (int)$product_id . "' ORDER BY price ASC"); return $query->row['price']; } ]]></add> </operation> </file> <file name="catalog/controller/product/category.php"> <operation error="skip"> <search position="before"><![CDATA[ $this->data['products'][] = array( ]]></search> <add><![CDATA[ $this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/tooltips.css'); @$discounts_g = @$this->model_catalog_product->getProductDiscountPrice_Group($result['product_id']); $discounts_d = $this->model_catalog_product->getProductDiscountPrice_Default($result['product_id']); if ($this->customer->isLogged()) { $discount = $this->currency->format($this->tax->calculate($discounts_d, $result['tax_class_id'], $this->config->get('config_tax'))); $d = 'Обычная цена: <br />' . $discount; } else { if ($discounts_g > 0) { $discount = $this->currency->format($this->tax->calculate($discounts_g, $result['tax_class_id'], $this->config->get('config_tax'))); } else { if ((float)$result['special']) { $discount = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { //$discount = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); $discount = null; } } if ($discount == null) { $d = null; } else { $d = '<a class="tooltip_category" title="Стоимость ' . $result['name'] . ' для клиентов оплачивающих товар по предоплате.">По предоплате ' . $discount . '</a>'; } } ]]></add> </operation> <operation error="skip"> <search position="after"><![CDATA[ product_id' => $result['product_id'], ]]></search> <add><![CDATA[ 'discount' => $d, ]]></add> </operation> </file> <file name="catalog/controller/product/search.php"> <operation error="skip"> <search position="before"><![CDATA[ $this->data['products'][] = array( ]]></search> <add><![CDATA[ $this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/tooltips.css'); @$discounts_g = @$this->model_catalog_product->getProductDiscountPrice_Group($result['product_id']); $discounts_d = $this->model_catalog_product->getProductDiscountPrice_Default($result['product_id']); if ($this->customer->isLogged()) { $discount = $this->currency->format($this->tax->calculate($discounts_d, $result['tax_class_id'], $this->config->get('config_tax'))); $d = 'Обычная цена: <br />' . $discount; } else { if ($discounts_g > 0) { $discount = $this->currency->format($this->tax->calculate($discounts_g, $result['tax_class_id'], $this->config->get('config_tax'))); } else { if ((float)$result['special']) { $discount = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $discount = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); } } if ($discount == null) { $d = null; } else { $d = '<a class="tooltip_search" title="Стоимость ' . $result['name'] . ' для клиентов оплачивающих товар по предоплате.">По предоплате ' . $discount . '</a>'; } } ]]></add> </operation> <operation error="skip"> <search position="after"><![CDATA[ product_id' => $result['product_id'], ]]></search> <add><![CDATA[ 'discount' => $d, ]]></add> </operation> </file> <file name="catalog/controller/product/manufacturer.php"> <operation error="skip"> <search position="before"><![CDATA[ $this->data['products'][] = array( ]]></search> <add><![CDATA[ $this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/tooltips.css'); @$discounts_g = @$this->model_catalog_product->getProductDiscountPrice_Group($result['product_id']); $discounts_d = $this->model_catalog_product->getProductDiscountPrice_Default($result['product_id']); if ($this->customer->isLogged()) { $discount = $this->currency->format($this->tax->calculate($discounts_d, $result['tax_class_id'], $this->config->get('config_tax'))); $d = 'Обычная цена: <br />' . $discount; } else { if ($discounts_g > 0) { $discount = $this->currency->format($this->tax->calculate($discounts_g, $result['tax_class_id'], $this->config->get('config_tax'))); } else { if ((float)$result['special']) { $discount = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { $discount = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); } } if ($discount == null) { $d = null; } else { $d = '<a class="tooltip_manufacturer" title="Стоимость ' . $result['name'] . ' для клиентов оплачивающих товар по предоплате.">По предоплате ' . $discount . '</a>'; } } ]]></add> </operation> <operation error="skip"> <search position="after"><![CDATA[ product_id' => $result['product_id'], ]]></search> <add><![CDATA[ 'discount' => $d, ]]></add> </operation> </file> <file name="catalog/controller/product/product.php"> <operation error="skip"> <search position="before"><![CDATA[ $this->data['options'] = array(); ]]></search> <add><![CDATA[ $this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/tooltips.css'); $discounts_g = $this->model_catalog_product->getProductDiscountPrice_Group($this->request->get['product_id']); $discounts_d = $this->model_catalog_product->getProductDiscountPrice_Default($this->request->get['product_id']); if ($this->customer->isLogged()) { if ($discounts_g <= 1) { $this->data['discount'] = null; $this->data['text'] = null; } else { $this->data['discount'] = $this->currency->format($this->tax->calculate($discounts_d, $product_info['tax_class_id'], $this->config->get('config_tax'))); $this->data['text'] = '<a class="tooltip" style="text-decoration:none; border-bottom: dashed 1px;" title="Данная цена для гостей.">Обычная цена:</a> '; } } else { $this->data['discount'] = $this->currency->format($this->tax->calculate($discounts_g, $product_info['tax_class_id'], $this->config->get('config_tax'))); $this->data['text'] = '<a class="tooltip" style="/*text-decoration:none; border-bottom: dashed 1px;*/" title="Стоимость ' . $product_info['name'] . ' для клиентов оплачивающих товар по предоплате.">(по предоплате)</a> '; } ]]></add> </operation> </file> <file name="catalog/view/theme/*/template/product/category.tpl"> <operation error="skip"> <search position="before"> <![CDATA[ <?php if ($product['rating']) { ?> ]]></search> <add> <![CDATA[ <div class="discount_cat"><?php echo $product['discount']; ?></div> ]]> </add> </operation> <operation error="skip"> <search position="before"> <![CDATA[ var rating = $(element).find('.rating').html(); ]]></search> <add> <![CDATA[ var d = $(element).find('.discount_cat').html(); if (d != null) { html += '<div class="discount_cat">' + d + '</div>'; } ]]> </add> </operation> </file> <file name="catalog/view/theme/*/template/product/search.tpl"> <operation error="skip"> <search position="before"> <![CDATA[ <?php if ($product['rating']) { ?> ]]></search> <add> <![CDATA[ <div class="discount_cat"><?php echo $product['discount']; ?></div> ]]> </add> </operation> <operation error="skip"> <search position="before"> <![CDATA[ var rating = $(element).find('.rating').html(); ]]></search> <add> <![CDATA[ var d = $(element).find('.discount_cat').html(); if (d != null) { html += '<div class="discount_cat">' + d + '</div>'; } ]]> </add> </operation> </file> <file name="catalog/view/theme/*/template/product/manufacturer_info.tpl"> <operation error="skip"> <search position="before"> <![CDATA[ <?php if ($product['rating']) { ?> ]]></search> <add> <![CDATA[ <div class="discount_cat"><?php echo $product['discount']; ?></div> ]]> </add> </operation> <operation error="skip"> <search position="before"> <![CDATA[ var rating = $(element).find('.rating').html(); ]]></search> <add> <![CDATA[ var d = $(element).find('.discount_cat').html(); if (d != null) { html += '<div class="discount_cat">' + d + '</div>'; } ]]> </add> </operation> </file> <file name="catalog/view/theme/*/template/product/product.tpl"> <operation error="skip"> <search position="before"> <![CDATA[ <?php if ($discounts) { ?> ]]></search> <add> <![CDATA[ <style type="text/css"> .discount_prod{} </style> <?php if ($discount > 0) { ?> <div class="discount_prod"><?php echo $discount; ?><?php echo $text; ?></div> <?php } ?> ]]> </add> </operation> </file> ------------------------------------------------------------------------------ ********** 1 ********** <file name="catalog/controller/module/filterpro.php"> <operation error="skip"> <search position="before"><![CDATA[ $this->data['products'][] = array( ]]></search> <add><![CDATA[ $this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/tooltips.css'); @$discounts_g = @$this->model_catalog_product->getProductDiscountPrice_Group($result['product_id']); $discounts_d = $this->model_catalog_product->getProductDiscountPrice_Default($result['product_id']); if ($this->customer->isLogged()) { $discount = $this->currency->format($this->tax->calculate($discounts_d, $result['tax_class_id'], $this->config->get('config_tax'))); $d = 'Обычная цена: <br />' . $discount; } else { if ($discounts_g > 0) { $discount = $this->currency->format($this->tax->calculate($discounts_g, $result['tax_class_id'], $this->config->get('config_tax'))); } else { if ((float)$result['special']) { $discount = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { //$discount = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); $discount = null; } } if ($discount == null) { $d = null; } else { $d = '<a class="tooltip_category" title="Стоимость ' . $result['name'] . ' для клиентов оплачивающих товар по предоплате.">По предоплате ' . $discount . '</a>'; } } ]]></add> </operation> </file> <file name="catalog/view/theme/*/template/module/filterpro.tpl"> <operation error="skip"> <search position="before"> <![CDATA[ <?php if ($product['rating']) { ?> ]]></search> <add> <![CDATA[ <div class="discount_cat"><?php echo $product['discount']; ?></div> ]]> </add> </operation> <operation error="skip"> <search position="before"> <![CDATA[ var rating = $(element).find('.rating').html(); ]]></search> <add> <![CDATA[ var d = $(element).find('.discount_cat').html(); if (d != null) { html += '<div class="discount_cat">' + d + '</div>'; } ]]> </add> </operation> </file> ********** 2 ********** <file name="catalog/controller/module/product_tab.php"> <operation error="skip"> <search position="before"><![CDATA[ $this->data['products'][] = array( ]]></search> <add><![CDATA[ $this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/tooltips.css'); @$discounts_g = @$this->model_catalog_product->getProductDiscountPrice_Group($result['product_id']); $discounts_d = $this->model_catalog_product->getProductDiscountPrice_Default($result['product_id']); if ($this->customer->isLogged()) { $discount = $this->currency->format($this->tax->calculate($discounts_d, $result['tax_class_id'], $this->config->get('config_tax'))); $d = 'Обычная цена: <br />' . $discount; } else { if ($discounts_g > 0) { $discount = $this->currency->format($this->tax->calculate($discounts_g, $result['tax_class_id'], $this->config->get('config_tax'))); } else { if ((float)$result['special']) { $discount = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { //$discount = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); $discount = null; } } if ($discount == null) { $d = null; } else { $d = '<a class="tooltip_category" title="Стоимость ' . $result['name'] . ' для клиентов оплачивающих товар по предоплате.">По предоплате ' . $discount . '</a>'; } } ]]></add> </operation> </file> <file name="catalog/view/theme/*/template/module/product_tab.tpl"> <operation error="skip"> <search position="before"> <![CDATA[ <?php if ($product['rating']) { ?> ]]></search> <add> <![CDATA[ <div class="discount_cat"><?php echo $product['discount']; ?></div> ]]> </add> </operation> <operation error="skip"> <search position="before"> <![CDATA[ var rating = $(element).find('.rating').html(); ]]></search> <add> <![CDATA[ var d = $(element).find('.discount_cat').html(); if (d != null) { html += '<div class="discount_cat">' + d + '</div>'; } ]]> </add> </operation> </file> ********** 3 ********** <file name="catalog/controller/module/caurusel_all.php"> <operation error="skip"> <search position="before"><![CDATA[ $this->data['products'][] = array( ]]></search> <add><![CDATA[ $this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/tooltips.css'); @$discounts_g = @$this->model_catalog_product->getProductDiscountPrice_Group($result['product_id']); $discounts_d = $this->model_catalog_product->getProductDiscountPrice_Default($result['product_id']); if ($this->customer->isLogged()) { $discount = $this->currency->format($this->tax->calculate($discounts_d, $result['tax_class_id'], $this->config->get('config_tax'))); $d = 'Обычная цена: <br />' . $discount; } else { if ($discounts_g > 0) { $discount = $this->currency->format($this->tax->calculate($discounts_g, $result['tax_class_id'], $this->config->get('config_tax'))); } else { if ((float)$result['special']) { $discount = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { //$discount = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); $discount = null; } } if ($discount == null) { $d = null; } else { $d = '<a class="tooltip_category" title="Стоимость ' . $result['name'] . ' для клиентов оплачивающих товар по предоплате.">По предоплате ' . $discount . '</a>'; } } ]]></add> </operation> </file> <file name="catalog/view/theme/*/template/module/caurusel_all.tpl"> <operation error="skip"> <search position="before"> <![CDATA[ <?php if ($product['rating']) { ?> ]]></search> <add> <![CDATA[ <div class="discount_cat"><?php echo $product['discount']; ?></div> ]]> </add> </operation> <operation error="skip"> <search position="before"> <![CDATA[ var rating = $(element).find('.rating').html(); ]]></search> <add> <![CDATA[ var d = $(element).find('.discount_cat').html(); if (d != null) { html += '<div class="discount_cat">' + d + '</div>'; } ]]> </add> </operation> </file> ------------------------------------------------------------------------------ </modification>
  3. Спасибо, это то что нужно. Кто-то может помочь (за дополнительную плату), в файле price.xml (vqmod...) дописать код на основе уже имеющегося, нужно только вроде как указать между тегами <search> правильные участки кода для пары других блоков где нужно чтоб модуль отображал цену. На данный момент отображает в карточке товаров, категории, поиске и в производителях, и для этих блоков код один и тот же за исключением естественно того что в <search>. Ниже код для категорий, как пример. <file name="catalog/controller/product/category.php"> <operation error="skip"> <search position="before"><![CDATA[ $this->data['products'][] = array( ]]></search> <add><![CDATA[ $this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/tooltips.css'); @$discounts_g = @$this->model_catalog_product->getProductDiscountPrice_Group($result['product_id']); $discounts_d = $this->model_catalog_product->getProductDiscountPrice_Default($result['product_id']); if ($this->customer->isLogged()) { $discount = $this->currency->format($this->tax->calculate($discounts_d, $result['tax_class_id'], $this->config->get('config_tax'))); $d = 'Обычная цена: <br />' . $discount; } else { if ($discounts_g > 0) { $discount = $this->currency->format($this->tax->calculate($discounts_g, $result['tax_class_id'], $this->config->get('config_tax'))); } else { if ((float)$result['special']) { $discount = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax'))); } else { //$discount = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))); $discount = null; } } if ($discount == null) { $d = null; } else { $d = '<a class="tooltip_category" title="Стоимость ' . $result['name'] . ' для клиентов оплачивающих товар по предоплате.">По предоплате ' . $discount . '</a>'; } } ]]></add> </operation> <operation error="skip"> <search position="after"><![CDATA[ product_id' => $result['product_id'], ]]></search> <add><![CDATA[ 'discount' => $d, ]]></add> </operation> </file> <file name="catalog/view/theme/*/template/product/category.tpl"> <operation error="skip"> <search position="before"> <![CDATA[ <?php if ($product['rating']) { ?> ]]></search> <add> <![CDATA[ <div class="discount_cat"><?php echo $product['discount']; ?></div> ]]> </add> </operation> <operation error="skip"> <search position="before"> <![CDATA[ var rating = $(element).find('.rating').html(); ]]></search> <add> <![CDATA[ var d = $(element).find('.discount_cat').html(); if (d != null) { html += '<div class="discount_cat">' + d + '</div>'; } ]]> </add> </operation> </file>
  4. Имеется карточка товара с двумя ценами. Необходимо реализовать третью и выводить как на скрине (салатовая). Но на скрине реализовано с помощью модуля — Additional information, то-есть текст введенный руками, что учитывая скачки курса возможно, но неудобно. Цена вводится в админке в USD. Необходимо что бы эта третья цена так же вводилась и считалась по курсу, либо формировалась из имеющейся вычитанием заданной разницы. Эта цена никуда в расчеты не идет, выводится для информации и показывается только в карточке товара на сайте (в перспективе можно и что бы она учитывалась в заказе если ставить галочку — предоплата). Самым удобным считаю вводить третью цену отдельно в USD и что бы она как оригинальная цена считалась по курсу и выводилась в региональной валюте. Подскажите, может кто знает модуль с похожим функционалом или как реализовать код? Дополнительное поле рядом с основной ценой в админке, куда вводиться эта третья цена, которая считается по курсу и вывод её на страничке товара. Или может кто-то возьмется, готовы заплатить. Opencart 1.5.6.4.
  5. По ссылке pantagruel964, Colorbox со стрелками, поставлю его, хотя сравнил код оригинального колорбокса и который у меня на сайте, он идентичный, а может где то все таки и нет, раз у меня стрелки отключены... не понятно )
  6. Я же предоставил данных более чем достаточно, за исключением доступов к сайту.
  7. С вертской всё впорядке, я ж написал что если через фаербаг отключать display: none то стрелки появляются, причем этот display: none указан в element.style что скорее всего означает, что стрелки просто не включены или выключены где то в js колорбокса.
  8. Да, картинки, css, всё работает нормально, если через фаербаг отключать display:none то стрелки появляются там где должны быть.
  9. По какой то причине, в шаблоне моего магазина, в окне Colorbox отключены стрелки навигации которые листают фото (скрин), или их по дефолту и не должно быть, не знаю... В product.tpl есть такие строки: <a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="cloud-zoom colorbox" id='zoom1' rel="adjustX: 0, adjustY:0, tint:'#FFFFFF',tintOpacity:0.2, zoomWidth:360, position:'inside', showTitle:false"> и <script type="text/javascript"><!-- $(document).ready(function() { $('.colorbox').colorbox({ overlayClose: true, opacity: 0.5, rel: "colorbox" }); }); //--></script> В последний код вписывал - arrowKey: true (вроде как это отвечает за отображение стрелок?) В файлах Colorbox тоже везде где надо указано - arrowKey: true. В css display: none нигде не прописано. Не пойму почему стрелки не показывает. Помогите пожалуйста их включить. Ниже ссылка на архив c нужными файлами. https://cloud.mail.ru/public/26dZ/nr3sSa4xj Скрин
  10. Подскажите пожалуйста, модуль заказывал летом, уже все проиндексировалось, в выдаче почему то у товаров с рейтингом нет звездочек, почему так?
  11. Та ладно Markimax, требовали, не требовали, Вы выставили счет, я как порядочный человек сразу оплатил, я же сказал, дело не в деньгах, и изначально мои сообщения были не из-за денег... И как Вы уже сказали - "проехали", то давайте действительно уже "проехали". Мне не хотелось чтобы этот разговор имел место быть, но увы. Далее именно по этой теме я вести диалог прекращаю. Ещё раз обращаюсь к пользователям форума, модуля и потенциальным покупателям - модуль работает нормально, дело было не в модуле. Всё, точка.
  12. Эх.., Markimax, это Вы как раз не поняли и очень жаль, какую я мысль до Вас хотел донести, что нужно по человечески относится. Я писал другое сообщение, да вот прочитав это Ваше, не стану говорить то что собирался сказать, а ведь надеялся что с пониманием отнесетесь, а не оправдываясь и прибегая к принципу - "лучшая защита - это нападение". Много других разработчиков модулей на этом форуме помогают людям решать более сложные задачи, и не требуют за пол часа 490р., а за спасибо, от чего их наоборот за такое отношение хочется вознаградить материально, что лично я и делал. А в данном случае, за деньги вообще не жалко, больше бы хотелось получать нормальное отношение. Поэтому скажу следующее и на этом разговор можно закрыть. Обращаюсь к пользователям форума, модуля и потенциальным покупателям - модуль работает нормально, дело было не в модуле.

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.