Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

annnn

Пользователи
  
  • Posts

    77
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

annnn's Achievements

Enthusiast

Enthusiast (6/14)

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

Recent Badges

0

Reputation

  1. ocStore 3.0.3.7 посивил, модуль в админке есть, врогде бы все хорошо, вклюлил в настройках но ситус в списке модулей не меняется, соответственно на фронте модуль не включается шаблон ДЕФОЛТНЫЙ в настройках все ок, но в списке ситус модуля отключен как быть?
  2. Спасипотому что. рилииет
  3. да обновлял, ничего не выводит
  4. гделаю ик 'attribute_groups' => $this->model_catalog_product->getProductAttributes($product_info['product_id']), {% for attribute_group in attribute_groups %} {% for attribute in attribute_group.attribute %} {% if attribute.attribute_id in [14, 2, 3, 4] %} <!-- тут id атрибутов --> <td>{{ attribute.name }}</td><!-- тут название атрибуи--> <td>{{ attribute.text }}</td><!-- тут текст/описание атрибуи --> {% endif %} {% endfor %} {% endfor %} ошибки нету, но аттрибуты не выводятся что не ик?
  5. имеете в виду згдесь ? ['product_id'] меняю на info безрезульитно
  6. теперьь другая проблема ругается на контроллер, при добавлении в featured.php 'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']), Notice: Undefined variable: result in C:\OpenServer\domains\gipsanit\catalog\controller\extension\module\featured.php on line 60Notice: Trying to access array offset on value of type null in
  7. Спасипотому что потому чтольшое
  8. Под 2 oc есть мануал под 3 не найду, в контроллер добавил 'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']), в самом шаблоне twig не знаю как вывести нужные аттрибуты по id подскажите
  9. вот контроллер и twig админки
  10. <?xml version="1.0" encoding="utf-8"?> <modification> <name>TS CountDown Timer</name> <code>CountDown-Timer-v1-1-by-Tramplin-Studio</code> <version>1.1</version> <author>Tramplin Studio</author> <link>https://tramplin-studio.store/</link> <file path="catalog/controller/common/header.php"> <operation> <search><![CDATA[public function index() {]]></search> <add position="after"><![CDATA[ $this->load->model('extension/module/ts_countdown_timer'); $data['ts_countdown_timer_customize'] = $this->model_extension_module_ts_countdown_timer->getCustomize(); if ($data['ts_countdown_timer_customize']) { $this->document->addStyle('catalog/view/javascript/tramplin-studio/CountdownTimer/CountdownTimer.css'); $this->document->addScript('catalog/view/javascript/tramplin-studio/CountdownTimer/jquery.corner.js'); $this->document->addScript('catalog/view/javascript/tramplin-studio/CountdownTimer/CountdownTimer.js'); } ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/common/header.tpl"> <operation> <search><![CDATA[</head>]]></search> <add position="before"><![CDATA[ <?php if($ts_countdown_timer_customize) { ?> <script type="text/javascript">var cdtCustomize = JSON.parse('<?php echo $ts_countdown_timer_customize; ?>');</script> <?php } ?> ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/common/header.twig"> <operation> <search><![CDATA[</head>]]></search> <add position="before"><![CDATA[ {% if (ts_countdown_timer_customize) %} <script type="text/javascript">var cdtCustomize = JSON.parse('{{ ts_countdown_timer_customize }}');</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/product/product.php"> <operation> <search><![CDATA[if ((float)$product_info['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$product_info['special']) { $this->load->model('extension/module/ts_countdown_timer'); $data['ts_countdown_timer'] = $this->model_extension_module_ts_countdown_timer->getTimer($this->request->get['product_id'], 'product'); } else { $data['ts_countdown_timer'] = false; } ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/product/product.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<h2><?php echo $special; ?></h2>]]></search> <add position="after"><![CDATA[ <?php if ($ts_countdown_timer) { ?> <div class="TSCountDownTimer" id="cdtBlock-product-<?php echo $product_id; ?>"></div> <script>$("#cdtBlock-product-<?php echo $product_id; ?>").TSCountDownTimer(JSON.parse('<?php echo $ts_countdown_timer; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<h2>{{ special }}</h2>]]></search> <add position="after"><![CDATA[ {% if (ts_countdown_timer) %} <div class="TSCountDownTimer" id="cdtBlock-product-{{ product_id }}"></div> <script>$("#cdtBlock-product-{{ product_id }}").TSCountDownTimer(JSON.parse('{{ ts_countdown_timer }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/product/category.php"> <operation> <search><![CDATA[if ((float)$result['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$result['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'category'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/product/category.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-category-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-category-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-category-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-category-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/product/manufacturer.php"> <operation> <search><![CDATA[if ((float)$result['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$result['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'manufacturer'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/product/manufacturer_info.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-manufacturer-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-manufacturer-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-manufacturer-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-manufacturer-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/product/special.php"> <operation> <search><![CDATA[if ((float)$result['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$result['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'special'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/product/special.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-special-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-special-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-special-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-special-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/product/search.php"> <operation> <search><![CDATA[if ((float)$result['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$result['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'search'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/product/search.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-search-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-search-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-search-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-search-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/extension/module/featured.php"> <operation> <search><![CDATA[if ((float)$product_info['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$product_info['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($product_info['product_id'], 'featured'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/extension/module/featured.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-featured-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-featured-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-featured-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-featured-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/extension/module/latest.php"> <operation> <search><![CDATA[if ((float)$result['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$result['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'latest'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/extension/module/latest.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-latest-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-latest-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-latest-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-latest-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/extension/module/bestseller.php"> <operation> <search><![CDATA[if ((float)$result['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$result['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'bestseller'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/extension/module/bestseller.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-bestseller-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-bestseller-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-bestseller-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-bestseller-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/extension/module/special.php"> <operation> <search><![CDATA[if ((float)$result['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$result['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'specialmod'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/extension/module/special.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-specialmod-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-specialmod-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-specialmod-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-specialmod-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> <file path="catalog/controller/product/product.php"> <operation> <search><![CDATA[if ((float)$result['special']) {]]></search> <add position="before"><![CDATA[ if ((float)$result['special']) { $this->load->model('extension/module/ts_countdown_timer'); $ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'related'); } else { $ts_countdown_timer = false; } ]]></add> </operation> <operation> <search><![CDATA[=> $special,]]></search> <add position="after"><![CDATA[ 'ts_countdown_timer' => $ts_countdown_timer, ]]></add> </operation> </file> <file path="catalog/view/theme/*/template/product/product.{tpl,twig}"> <operation error="skip"> <search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search> <add position="after"><![CDATA[ <?php if ($product['ts_countdown_timer']) { ?> <div class="TSCountDownTimer" id="cdtBlock-related-<?php echo $product['product_id']; ?>"></div> <script>$("#cdtBlock-related-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script> <?php } ?> ]]></add> </operation> <operation error="skip"> <search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search> <add position="after"><![CDATA[ {% if (product['ts_countdown_timer']) %} <div class="TSCountDownTimer" id="cdtBlock-related-{{ product['product_id'] }}"></div> <script>$("#cdtBlock-related-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script> {% endif %} ]]></add> </operation> </file> </modification> вот он, только я фигзнает что тут править
  11. не подскажете что нужно подправить?
  12. шаблон полностью гдефолтный, по игдее должен рилиить но не рилииет на фронте
  13. Кто пользовался данным модулем? ocStore 3.0.3.7 посивил, модуль в адмтнке есть, врогде бьы все хорошо, вклюлил в настройках но ситус в списке модулей не меняется, соответственно на фронте модуль не включается мож кто силкивался с икой проблемой? икое замечал не только в данном модуле в настройках все ок, но в списке ситус модуля отключен
  14. Подскажитте пожалуйси нашел мануал, но моих знаний не хваиет понять как правильно туда втулить вот, выгделил жирным, что именно не понимаю как всивить Создаю колонку desc (varchar 255 not null ) в иблиэто oc_banner_image В файле /admin/model/design/banner.php в функцию addBanner добавляю desc = '" . $this->db->escape($banner_image['desc']) . "' В этом же файле в функцию editBanner добавляю этот же код В этом же файле в функцию getBannerImages добавил 'desc' => $banner_image['desc'] Дное в файле /admin/controller/design/banner.php в массив $data['banner_images'] добавил 'desc' => $banner_image['desc'] Потом на фронте создал нужное поле в файле /admin/view/template/design/banner_form.twig вот эти 2 функции, как правильно туда это впихнуть? public function addBanner($data) { $this->db->query("INSERT INTO " . DB_PREFIX . "banner SET name = '" . $this->db->escape($data['name']) . "', status = '" . (int)$data['status'] . "'"); $banner_id = $this->db->getLastId(); if (isset($data['banner_image'])) { foreach ($data['banner_image'] as $language_id => $value) { foreach ($value as $banner_image) { $this->db->query("INSERT INTO " . DB_PREFIX . "banner_image SET banner_id = '" . (int)$banner_id . "', language_id = '" . (int)$language_id . "', title = '" . $this->db->escape($banner_image['title']) . "', link = '" . $this->db->escape($banner_image['link']) . "', image = '" . $this->db->escape($banner_image['image']) . "', sort_order = '" . (int)$banner_image['sort_order'] . "'"); } } } return $banner_id; } public function getBannerImages($banner_id) { $banner_image_data = array(); $banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner_id . "' ORDER BY sort_order ASC"); foreach ($banner_image_query->rows as $banner_image) { $banner_image_data[$banner_image['language_id']][] = array( 'title' => $banner_image['title'], 'link' => $banner_image['link'], 'image' => $banner_image['image'], 'sort_order' => $banner_image['sort_order'] ); } return $banner_image_data; } Спасипотому что
×
×
  • 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.