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

sashamaximiv

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

    175
  • З нами

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

Усі публікації користувача sashamaximiv

  1. Спасибо конечно, но если бы все было так просто) https://prnt.sc/s5rktp Это изначальный вид этой иконки, но после клика, именно после клика по иконке товара (добавить в избраное), сайт прокручивает страницу вверх и на самой иконке возле иконки корзины добавляет этот текст. Откуда он его берет - не понятно.
  2. Здравствуйте. Есть шапка с таким дизайном: https://prnt.sc/s5ize9 После клика по иконке добавить в закладки, сайт почему то добавляет этой иконке текст: https://prnt.sc/s5j024 Такое еще было при удалении или добавления товара в корзину на иконке корзины. Не могу найти тему. Подскажите кто знает. Двиг: опенкарт 2.3.0.2 шапка стандарт ссылка http://c97046u6.beget.tech/
  3. Спасибо, работает. Для 2.3.0.2 $categories = $this->model_catalog_product->getCategories($product_id); if ($categories) $categories_info = $this->model_catalog_category->getCategory($categories[0]['category_id']); $data['category_id'] = $categories_info['category_id'];
  4. Вот бесплатный модуль: https://www.opencart.com/index.php?route=marketplace/extension/info&member_token=1pZuJfrIaTTIeq8gUoiCMWAoMQjl1cJq&extension_id=35197&filter_license=0&filter_download_id=47
  5. спустя время нашел еще такой вот бесплатный модуль, может кому пригодиться https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=29681&filter_search=position&filter_license=0&filter_download_id=47 opencart 2.3.0.0, 2.3.0.1, 2.3.0.2
  6. Спасибо за ответ, но к сожалению нету такого раздела, или я не там ищу? смотрел на двух версиях опенкарта: https://prnt.sc/rstn5e https://prnt.sc/rstnej
  7. Здравствуйте. Столкнулся с проблемой когда чпу в каталоге товаров и категорий нормально работает, а на стандартных страницах некоректно. Сайт http://c97046u6.beget.tech/ Записал видео по проблеме: htaccess SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip Header unset ETag FileETag None <FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$"> Header unset Last-Modified Header set Expires "Fri, 21 Dec 2100 00:00:00 GMT" Header set Cache-Control "public, no-transform" </FilesMatch> <IfModule mod_expires.c> ExpiresActive on # Perhaps better to whitelist expires rules? Perhaps. ExpiresDefault "access plus 1 month" # cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5) ExpiresByType text/cache-manifest "access plus 0 seconds" # Your document html ExpiresByType text/html "access plus 0 seconds" # Data ExpiresByType text/xml "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType application/json "access plus 0 seconds" # RSS feed ExpiresByType application/rss+xml "access plus 1 hour" # Favicon (cannot be renamed) ExpiresByType image/x-icon "access plus 1 week" # Media: images, video, audio ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType video/ogg "access plus 1 month" ExpiresByType audio/ogg "access plus 1 month" ExpiresByType video/mp4 "access plus 1 month" ExpiresByType video/webm "access plus 1 month" # HTC files (css3pie) ExpiresByType text/x-component "access plus 1 month" # Webfonts ExpiresByType font/truetype "access plus 1 month" ExpiresByType font/opentype "access plus 1 month" ExpiresByType application/x-font-woff "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month" ExpiresByType application/vnd.ms-fontobject "access plus 1 month" # CSS and JavaScript ExpiresByType text/css "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" ExpiresByType text/javascript "access plus 1 year" <IfModule mod_headers.c> Header append Cache-Control "public" </IfModule> </IfModule> # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. # 2. In your opencart directory rename htaccess.txt to .htaccess. # For any support issues please visit: http://www.opencart.com Options +FollowSymlinks # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> Order deny,allow Deny from all </FilesMatch> # SEO URL Settings RewriteEngine On # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] RewriteRule ^system/download/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] ### Additional Settings that may need to be enabled for some servers ### Uncomment the commands by removing the # sign in front of it. ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that. # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it: # php_flag register_globals off # 2. If your cart has magic quotes enabled, This may work to disable it: # php_flag magic_quotes_gpc Off # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try # php_value upload_max_filesize 999M # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value post_max_size 999M # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_execution_time 200 # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_input_time 200 # 7. disable open_basedir limitations # php_admin_value open_basedir none Как принудительно перенаправлять на чпу?
  8. спасибо, единственное решение. ссылка https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=29764&filter_license=0&filter_rating=1
  9. ZeroHero, спасибо, возьму на заметку, по вашему примеру попытаюсь получить ид последнего заказа из бд)
  10. iPython, я вам про картошку, вы мне про голубцы)) Спросил как вывести ид последнего заказа, вы мне о своих гениальных познаниях и игру в угадайку) Как вы думаете, если бы я знал ответ, я бы что то здесь писал?) Знаете ответ - подсказывайте, не знаете - лучше не пишите. Потому что с банальной проблемы, растянули тему на десятки сообщений. Только один человек написал решение, и то глобальное, по замене всего кода. В любом случае тема последнего ида не раскрыта. Установил лимит в 1 товар на главной и все, так как получить последний ид не получилось при 5 товарах. Столько проблем на форуме где по идее помогают а не хвастаться своими познаниями над другими участниками. Спасибо и удачи вам.
  11. Все это через функцию выше: $filter_data = array( 'sort' => 'o.date_added', 'order' => 'DESC', 'start' => 0, 'limit' => 5 ); Можно сделать так: $filter_data = array( 'sort' => 'o.date_added', 'order' => 'DESC', 'start' => 0, 'limit' => 1 ); и так: $result['order_id']; Но тогда на главной будут выводиться не все последние заказы, а только один.
  12. я добавляю потому, что как и написал 3 предыдущих раза и прикрепил картинку, этот код без добавления возвращает 5й ид заказа вместо последнего. Сайт возвращает вместо ида последнего заказа, ид заказа 5 размещенного на 5 позиций ниже. И еще раз наглядно: Последний ид заказа 100 Если сделать так: $result['order_id']; сайт на странице выводит почему то 95 вместо 100 поэтому я и добавляю недостающих 5 Если сделать так: $result['order_id'] + '5'; тогда выводит нужный номер заказа 100
  13. значит средствами php это не реализовать и получить последний ид можно только если выводить на главной 1 последний заказ... жаль, ну ладно, всем спасибо за ответы.
  14. Извините если я чего то не понимаю, в просто в этом не силен, делаю в меру своих возможностей... Нужно что то так?: $data['zvuk1'] = $result['last_order_id']; или что то типа того: $data['zvuk1'] = $result['order_id'][0];
  15. как это выглядит: https://prnt.sc/qrytds и когда срабатывает: https://prnt.sc/qryu0b ну и естественно проигрывается звук. Если кто хочет себе такое, не забудьте заменить в коде адрес нужного файла звука: var audio = new Audio('/image/catalog/samzvuk.mp3');
  16. Здравствуйте. Таки попытался сделать функцию проигрывания звука в админке на главной странице при поступлении заказа. Все работает, но только не могу корректно получить ид последнего заказа. на главной выводятся 5 последних заказов, и почему то опенкарт при таком коде выводит последний 5й ид заказа. ../public_html/admin/controller/extension/dashboard/recent.php <?php class ControllerExtensionDashboardRecent extends Controller { private $error = array(); public function index() { $this->load->language('extension/dashboard/recent'); $this->document->setTitle($this->language->get('heading_title')); $this->load->model('setting/setting'); if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { $this->model_setting_setting->editSetting('dashboard_recent', $this->request->post); $this->session->data['success'] = $this->language->get('text_success'); $this->response->redirect($this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=dashboard', true)); } $data['heading_title'] = $this->language->get('heading_title'); $data['text_edit'] = $this->language->get('text_edit'); $data['text_enabled'] = $this->language->get('text_enabled'); $data['text_disabled'] = $this->language->get('text_disabled'); $data['entry_width'] = $this->language->get('entry_width'); $data['entry_status'] = $this->language->get('entry_status'); $data['entry_sort_order'] = $this->language->get('entry_sort_order'); $data['button_save'] = $this->language->get('button_save'); $data['button_cancel'] = $this->language->get('button_cancel'); if (isset($this->error['warning'])) { $data['error_warning'] = $this->error['warning']; } else { $data['error_warning'] = ''; } $data['breadcrumbs'] = array(); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_home'), 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true) ); $data['breadcrumbs'][] = array( 'text' => $this->language->get('text_extension'), 'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=dashboard', true) ); $data['breadcrumbs'][] = array( 'text' => $this->language->get('heading_title'), 'href' => $this->url->link('extension/dashboard/recent', 'token=' . $this->session->data['token'], true) ); $data['action'] = $this->url->link('extension/dashboard/recent', 'token=' . $this->session->data['token'], true); $data['cancel'] = $this->url->link('extension/extension', 'token=' . $this->session->data['token'] . '&type=dashboard', true); if (isset($this->request->post['dashboard_recent_width'])) { $data['dashboard_recent_width'] = $this->request->post['dashboard_recent_width']; } else { $data['dashboard_recent_width'] = $this->config->get('dashboard_recent_width'); } $data['columns'] = array(); for ($i = 3; $i <= 12; $i++) { $data['columns'][] = $i; } if (isset($this->request->post['dashboard_recent_status'])) { $data['dashboard_recent_status'] = $this->request->post['dashboard_recent_status']; } else { $data['dashboard_recent_status'] = $this->config->get('dashboard_recent_status'); } if (isset($this->request->post['dashboard_recent_sort_order'])) { $data['dashboard_recent_sort_order'] = $this->request->post['dashboard_recent_sort_order']; } else { $data['dashboard_recent_sort_order'] = $this->config->get('dashboard_recent_sort_order'); } $data['header'] = $this->load->controller('common/header'); $data['column_left'] = $this->load->controller('common/column_left'); $data['footer'] = $this->load->controller('common/footer'); $this->response->setOutput($this->load->view('extension/dashboard/recent_form', $data)); } protected function validate() { if (!$this->user->hasPermission('modify', 'extension/analytics/google_analytics')) { $this->error['warning'] = $this->language->get('error_permission'); } return !$this->error; } public function dashboard() { $this->load->language('extension/dashboard/recent'); $data['heading_title'] = $this->language->get('heading_title'); $data['text_no_results'] = $this->language->get('text_no_results'); $data['column_order_id'] = $this->language->get('column_order_id'); $data['column_customer'] = $this->language->get('column_customer'); $data['column_status'] = $this->language->get('column_status'); $data['column_date_added'] = $this->language->get('column_date_added'); $data['column_total'] = $this->language->get('column_total'); $data['column_action'] = $this->language->get('column_action'); $data['button_view'] = $this->language->get('button_view'); $data['token'] = $this->session->data['token']; // Last 5 Orders $data['orders'] = array(); $filter_data = array( 'sort' => 'o.date_added', 'order' => 'DESC', 'start' => 0, 'limit' => 5 ); $this->load->model('sale/order'); $results = $this->model_sale_order->getOrders($filter_data); foreach ($results as $result) { $data['orders'][] = array( 'order_id' => $result['order_id'], 'customer' => $result['customer'], 'status' => $result['order_status'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'view' => $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'], true), ); } $data['zvuk1'] = $result['order_id'] + '5'; return $this->load->view('extension/dashboard/recent_info', $data); } } Как видно из кода, добавил $data['zvuk1'] = $result['order_id'] + '5'; +5 сделал так как вместо 140 ида берет 135, и чтобы уровнять суммирую +5. Код ../admin/view/template/extension/dashboard/recent_info.tpl <script type="text/javascript"> function getCookie(startzvuk) { var cookie = " " + document.cookie; var search = " " + startzvuk + "="; var setStr = null; var offset = 0; var end = 0; if (cookie.length > 0) { offset = cookie.indexOf(search); if (offset != -1) { offset += search.length; end = cookie.indexOf(";", offset) if (end == -1) { end = cookie.length; } setStr = unescape(cookie.substring(offset, end)); } } return(setStr); } </script> <script type="text/javascript"> function getCookie(panelzvuk) { var cookie = " " + document.cookie; var search = " " + panelzvuk + "="; var setStr = null; var offset = 0; var end = 0; if (cookie.length > 0) { offset = cookie.indexOf(search); if (offset != -1) { offset += search.length; end = cookie.indexOf(";", offset) if (end == -1) { end = cookie.length; } setStr = unescape(cookie.substring(offset, end)); } } return(setStr); } </script> <script type="text/JavaScript"> $(document).ready(function (){ var startzvuk= getCookie("startzvuk"); if(startzvuk == 'on'){ var panelzvuk= getCookie("panelzvuk"); var date = new Date(new Date().getTime() + 5000 * 5000 * 5000); var audio = new Audio('/image/catalog/samzvuk.mp3'); var zvukid= <?php echo $zvuk1; ?>; var superyo = document.getElementById('superyo'); if(zvukid > panelzvuk){ audio.play(); document.cookie = "panelzvuk=<?php echo $zvuk1; ?>; path=/; expires=" + date.toUTCString(); superyo.classList.remove('nn'); } else { setTimeout(function(){ location.reload(); },10000) } $('#timer_inp').removeClass('nn'); } else { } }); function zvukStart() { var date = new Date(new Date().getTime() + 5000 * 5000 * 5000); document.cookie = "startzvuk=on; path=/; expires=" + date.toUTCString(); document.cookie = "panelzvuk=<?php echo $zvuk1; ?>; path=/; expires=" + date.toUTCString(); location.reload(); }; function zvukStop() { var date = new Date(new Date().getTime() + 5000 * 5000 * 5000); document.cookie = "startzvuk=off; path=/; expires=" + date.toUTCString(); location.reload(); }; function hiddesuper() { $('#superyo').addClass('nn'); }; </script> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><i class="fa fa-shopping-cart"></i> <?php echo $heading_title; ?></h3> <a id="startzvuk" onclick="zvukStart()" style="cursor:pointer"><i class="fa fa-play-circle" aria-hidden="true"></i> Включить мониторинг</a> <a id="stoptzvuk" onclick="zvukStop()" style="cursor:pointer"><i class="fa fa-minus-circle" aria-hidden="true"></i> Отключить мониторинг</a> <script type="text/javascript"> function timer(){ var obj=document.getElementById('timer_inp'); obj.innerHTML--; if(obj.innerHTML==0){setTimeout(function(){},1000);} else{setTimeout(timer,1000);} } setTimeout(timer,1000); </script> <div id="timer_inp" class="nn">10</div> <div id="superyo" class="nn" onclick="hiddesuper()">Хорошие новости! Вы получили один или несколько новых заказов.<br>Проверьте список заказов в разделе: Продажи > Заказы.</div> <style> #timer_inp {float: right; background-color: #f56b6b; color: white; font-weight: 700; font-size: 14px; width: 20px; height: 20px; text-align: center; border-radius: 50%;} #superyo {position: fixed; bottom: 5%; left: 5%; background-color: #f56b6b; color: white; padding: 20px; z-index: 1000; font-size: 20px; font-weight: 100;} .nn {display:none;} </style> </div> <div class="table-responsive"> <table class="table"> <thead> <tr> <td class="text-right"><?php echo $column_order_id; ?></td> <td><?php echo $column_customer; ?></td> <td><?php echo $column_status; ?></td> <td><?php echo $column_date_added; ?></td> <td class="text-right"><?php echo $column_total; ?></td> <td class="text-right"><?php echo $column_action; ?></td> </tr> </thead> <tbody> <?php if ($orders) { ?> <?php foreach ($orders as $order) { ?> <tr> <td class="text-right"><?php echo $order['order_id']; ?></td> <td><?php echo $order['customer']; ?></td> <td><?php echo $order['status']; ?></td> <td><?php echo $order['date_added']; ?></td> <td class="text-right"><?php echo $order['total']; ?></td> <td class="text-right"><a href="<?php echo $order['view']; ?>" data-toggle="tooltip" title="<?php echo $button_view; ?>" class="btn btn-info"><i class="fa fa-eye"></i></a></td> </tr> <?php } ?> <?php } else { ?> <tr> <td class="text-center" colspan="6"><?php echo $text_no_results; ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> Подскажите пожалуйста как брать именно последний ид, а не последний 5й ид? Есть вариант 'limit' => указать 1, и тогда не нужно суммировать. Но тогда на главной выводиться только 1 последний заказ. $filter_data = array( 'sort' => 'o.date_added', 'order' => 'DESC', 'start' => 0, 'limit' => 1 ); Понимаю что код костыльный, но это единственный бесплатный вариант для Opencart 2.3.0.2
  17. Здравствуйте. Подскажите есть ли что то бесплатное по следующей ситуации. Нужно чтобы после добавления товара, в корзину так же добавлялся другой товар который можно выбрать в админке. Например выбираем суши рол, и в корзине автоматически к нему добавляются палочки, имбирь и вассаби. Есть такое?)
  18. fanatic, спасибо конечно, и это тоже нужно. Но искал слайдер на главную страницу.

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

Important Information

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