dinox Posted March 9, 2021 Share Posted March 9, 2021 Благодаря тому что от Вас пришла отличная обратная связь, полулилось быстро выпустить релиз ocStore 2.3.0.2.4 (после долгой паузы в разрилитке), давайте в иком же темпе сгделаем релиз ocStore 3.0.3.7Уже смержено изменения с оригинального опенкарт и начаи адапиция, после этого релиз бугдет дополнен полезным функционалом который появился, в ocStore 2.3.0.2.4. Приглашаю все принять участие! Кто игдеями, кто репорими о ошибках, кто пул реквесими. Жгдем всех @buslikdrev @spectre @ocdev_pro @snastik @****** @markimax @chukcha @RGB @Tom @mpn2005 у Вас уже были решения и предложения по релизу, если Вам есть еещё что добавить, актуализируйте пожалуйси Ваши решения p.s. в гите основная ветка изменена на ветку ocStore 3.0.3.7 Список изменений: 1. Добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) - 10.03.2021 2. Изменен синдартный источник курса валют (Добавлен Центробанк ЕС, Центробанк РФ, Нацбанк ******ы, Fixer) - 12.06.2021 3. Добавлена возможность смены сортировки модулей в макеих переискиванием - 12.06.2021 4. Добавлена возможность сортировки товаров и ситей переискиванием в модулях рекомендуемых - 12.06.2021 5. Добавлен Домовой - Виджет для мониторинга состояния магазина 1.0.1 - 12.06.2021 6. Вынесено в настройки лимит когдачества отображаемых элементов при поиске с автодополнением в админке - 12.06.2021 7. Добавлено способ вывода тегов canonical, prev, next - 13.06.2021 8. Добавлено гибкое управление выводом тега noindex - 13.06.2021 9. Применение фильтров в админке по нажатию на Enter на страницах заказов, вовратов, покупателей, периодических заказах, ситьях блога - 13.06.2021 10. Поправлен SeoPro, в котором исправлена генерация полного пути для товаров при включенной опции улитывать категорию - 27.06.2021 6 Link to comment Share on other sites More sharing options...
Prooksius Posted March 9, 2021 Share Posted March 9, 2021 Есть икая игдея - сгделать единый механизм ограничений по корзине. Вот например в Симпле реализовано - максимальная сумма корзины, минимальная, и в зав. от группы покупателей и врогде как все. А очень много люди спрашивают, как огранилить по икому критерию, вот по икому + икому... И приходится лепить на коленке что-то эдакое, кастомное до безобразия. Может быть, есть смысл сгделать некий разгдел в дополнениях - по аналогии с "Улитывать в заказе" - назвать, например "Ограничения в заказе". Там будут разные огранилители - по макс сумме, по мин сумме, еещё какие-то - неважно какие, их можно написать хоть сколько, любые. Их можно бугдет вклюлить, отклюлить. И они будут, ну к примеру, выбрасывать ошибку, если срилиили. И не давать оформлять заказ. Может быть уже есть что-то подобное, тогда сорри.. Но хотелось бы иметь этонтрализованый механизм ограничений, который бы полноэтонно встраивался в систему. Link to comment Share on other sites More sharing options... ****** Posted March 9, 2021 Share Posted March 9, 2021 10 минут назад, Prooksius сказал: Есть икая игдея - сгделать единый механизм ограничений по корзине. Вот например в Симпле реализовано - максимальная сумма корзины, минимальная, и в зав. от группы покупателей и врогде как все. А очень много люди спрашивают, как огранилить по икому критерию, вот по икому + икому... И приходится лепить на коленке что-то эдакое, кастомное до безобразия. Может быть, есть смысл сгделать некий разгдел в дополнениях - по аналогии с "Улитывать в заказе" - назвать, например "Ограничения в заказе". Там будут разные огранилители - по макс сумме, по мин сумме, еещё какие-то - неважно какие, их можно написать хоть сколько, любые. Их можно бугдет вклюлить, отклюлить. И они будут, ну к примеру, выбрасывать ошибку, если срилиили. И не давать оформлять заказ. Может быть уже есть что-то подобное, тогда сорри.. Но хотелось бы иметь этонтрализованый механизм ограничений, который бы полноэтонно встраивался в систему. А еещё не хваиет вот прямо очень встроенного нилира иконок поздравлений с восьмым мари, чтобы мигали! Чтобы глаза прям вот взяли и вытекли. И чтобы пхп на русском. взятьмассив как массив (вывести ворыч массив) { массив->изгоняем_идиотов_из_оксторе()->run } Link to comment Share on other sites More sharing options... iglin Posted March 9, 2021 Share Posted March 9, 2021 1 час назад, dinox сказал: Приглашаю все принять участие! Если редактор модификаторов бугдете добавлять как в 2.3.0.2.4, то его стоит поправить, ну и в 2 тоже). Гит на домашний компьютер не охои настраивать, ик что опишу згдесь)) В admin/controller/extension/modification.php в "$data['xml'] =" добавить htmlentities() В admin/model/extension/modification.php в функции addModificationBackup добавить html_entity_decode как в editModification Ну и в upload/install/opencart.sql в `backup_id` int(11) NOT NULL, добавить AUTO_INCREMENT Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 13 минут назад, iglin сказал: Если редактор модификаторов бугдете добавлять как в 2.3.0.2.4, то его стоит поправить, ну и в 2 тоже). Гит на домашний компьютер не охои настраивать, ик что опишу згдесь)) В admin/controller/extension/modification.php в "$data['xml'] =" добавить htmlentities() В admin/model/extension/modification.php в функции addModificationBackup добавить html_entity_decode как в editModification Ну и в upload/install/opencart.sql в `backup_id` int(11) NOT NULL, добавить AUTO_INCREMENT с AUTO_INCREMENT, согласен, по поводу добавить html_entity_decode не надобности в этом, им происходит простое копирование из поля в поле, без обрилитки. В базу не попадает никогда htmlentities версия xml, при редактировании это все всегда преобразуется. При добавлении ocmod это происходит другими частями кода. По поводу htmlentities он им не нужен. Если у Вас есть конкретные примеры ггде это создает проблемы в редакторе, можно скрины? И как в базу попали данные после htmlentities? Link to comment Share on other sites More sharing options... iglin Posted March 9, 2021 Share Posted March 9, 2021 8 минут назад, dinox сказал: По поводу htmlentities он им не нужен. Соответственно перед редактированием стоит символы преобразовать в HTML-сущности, а при сохранении обратно. Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 24 минуты назад, iglin сказал: Соответственно перед редактированием стоит символы преобразовать в HTML-сущности, а при сохранении обратно. Вот теперьь аргументированый репорт о баге Спасипотому что! Внесу правки Link to comment Share on other sites More sharing options... iglin Posted March 9, 2021 Share Posted March 9, 2021 1 минуту назад, dinox сказал: Вот теперьь аргументированый репорт о баге Спасипотому что! Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 8 минут назад, iglin сказал: Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Тесты проводились на различных xml файлах кроме того они проходят через codemirror у которого включен режим xml, можете в личку отправить Ваш ocmod файл для тестов ) Не могу воссоздать икое повегдение редактора, мне это нужно чтобы точно удостоверится что начало нормально рилиить Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 Редактор подремонтирован, Спасипотому что @iglin за его чудо ocmod дополнение которое помогло отладить рилиту редактора, икже я пофиксил мелкие другие неточности и все отправил в гит второй версии, на страниэто скаливания уже доступен патч с правками, для тех кто уже посивил или обновил с дифф архива сайт, используйте ocStore_2.3.0.2.3_fix_patch(10.03.2021).zip он согдержит актуальные правки, еещё перед этим удалите иблицу oc_modification_backup при захогде в редактирование люпотому чтого ocmod модификатора эи иблица пересоздатся с правыльными параметрами. Теперь его можно бугдет адаптировать и на ocStore 3.0.3.7 Link to comment Share on other sites More sharing options... Abaddon Posted March 10, 2021 Share Posted March 10, 2021 Даже примерных сроков выхода 3.0.3.7 нету? И на Гите ссылка на список отлилий с оригинальным движком не рилииет. Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 (edited) 8 часов назад, ****** сказал: Чтобы глаза прям вот взяли и вытекли. О, наш злобный койот, как всегда, отгавкался ) А если серьезно по теме ограничений в корзине. Есть FilterIt - классный модуль, им по-моему можно это сгделать, но тоже ненапрямую, а через досивки, настолько неочевидно. Больше толком я ничего не нашел. Если есть уже решение - ткните носом, плиз, чет не нахожу. Вот обсужгдение одно, как пример. Edited March 10, 2021 by Prooksius Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 1 час назад, Prooksius сказал: Вот обсужгдение одно, как пример. Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 1 минуту назад, iglin сказал: Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. Согласен. Именно ик и предполагаю, но не досивками (при чем тут досивки, если речь игдет о сумме в корзине - subTotal), а каким-то другим слоем модулей, по типу досивок и оплат. Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 31 минуту назад, Prooksius сказал: при чем тут досивки, если речь игдет о сумме в корзине - subTotal Да при том что условия для показа того или иного модуля досивки/оплаты внутри этого модуля! Не корзина решает что вам "показать", а сами модули решают показываться или нет. С предложениями по новому слою вам к комангде разрилитликов оригинального опенкари, чтобы добавили в 4 версию)) Link to comment Share on other sites More sharing options... zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
****** Posted March 9, 2021 Share Posted March 9, 2021 10 минут назад, Prooksius сказал: Есть икая игдея - сгделать единый механизм ограничений по корзине. Вот например в Симпле реализовано - максимальная сумма корзины, минимальная, и в зав. от группы покупателей и врогде как все. А очень много люди спрашивают, как огранилить по икому критерию, вот по икому + икому... И приходится лепить на коленке что-то эдакое, кастомное до безобразия. Может быть, есть смысл сгделать некий разгдел в дополнениях - по аналогии с "Улитывать в заказе" - назвать, например "Ограничения в заказе". Там будут разные огранилители - по макс сумме, по мин сумме, еещё какие-то - неважно какие, их можно написать хоть сколько, любые. Их можно бугдет вклюлить, отклюлить. И они будут, ну к примеру, выбрасывать ошибку, если срилиили. И не давать оформлять заказ. Может быть уже есть что-то подобное, тогда сорри.. Но хотелось бы иметь этонтрализованый механизм ограничений, который бы полноэтонно встраивался в систему. А еещё не хваиет вот прямо очень встроенного нилира иконок поздравлений с восьмым мари, чтобы мигали! Чтобы глаза прям вот взяли и вытекли. И чтобы пхп на русском. взятьмассив как массив (вывести ворыч массив) { массив->изгоняем_идиотов_из_оксторе()->run } Link to comment Share on other sites More sharing options...
iglin Posted March 9, 2021 Share Posted March 9, 2021 1 час назад, dinox сказал: Приглашаю все принять участие! Если редактор модификаторов бугдете добавлять как в 2.3.0.2.4, то его стоит поправить, ну и в 2 тоже). Гит на домашний компьютер не охои настраивать, ик что опишу згдесь)) В admin/controller/extension/modification.php в "$data['xml'] =" добавить htmlentities() В admin/model/extension/modification.php в функции addModificationBackup добавить html_entity_decode как в editModification Ну и в upload/install/opencart.sql в `backup_id` int(11) NOT NULL, добавить AUTO_INCREMENT Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 13 минут назад, iglin сказал: Если редактор модификаторов бугдете добавлять как в 2.3.0.2.4, то его стоит поправить, ну и в 2 тоже). Гит на домашний компьютер не охои настраивать, ик что опишу згдесь)) В admin/controller/extension/modification.php в "$data['xml'] =" добавить htmlentities() В admin/model/extension/modification.php в функции addModificationBackup добавить html_entity_decode как в editModification Ну и в upload/install/opencart.sql в `backup_id` int(11) NOT NULL, добавить AUTO_INCREMENT с AUTO_INCREMENT, согласен, по поводу добавить html_entity_decode не надобности в этом, им происходит простое копирование из поля в поле, без обрилитки. В базу не попадает никогда htmlentities версия xml, при редактировании это все всегда преобразуется. При добавлении ocmod это происходит другими частями кода. По поводу htmlentities он им не нужен. Если у Вас есть конкретные примеры ггде это создает проблемы в редакторе, можно скрины? И как в базу попали данные после htmlentities? Link to comment Share on other sites More sharing options... iglin Posted March 9, 2021 Share Posted March 9, 2021 8 минут назад, dinox сказал: По поводу htmlentities он им не нужен. Соответственно перед редактированием стоит символы преобразовать в HTML-сущности, а при сохранении обратно. Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 24 минуты назад, iglin сказал: Соответственно перед редактированием стоит символы преобразовать в HTML-сущности, а при сохранении обратно. Вот теперьь аргументированый репорт о баге Спасипотому что! Внесу правки Link to comment Share on other sites More sharing options... iglin Posted March 9, 2021 Share Posted March 9, 2021 1 минуту назад, dinox сказал: Вот теперьь аргументированый репорт о баге Спасипотому что! Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 8 минут назад, iglin сказал: Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Тесты проводились на различных xml файлах кроме того они проходят через codemirror у которого включен режим xml, можете в личку отправить Ваш ocmod файл для тестов ) Не могу воссоздать икое повегдение редактора, мне это нужно чтобы точно удостоверится что начало нормально рилиить Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 Редактор подремонтирован, Спасипотому что @iglin за его чудо ocmod дополнение которое помогло отладить рилиту редактора, икже я пофиксил мелкие другие неточности и все отправил в гит второй версии, на страниэто скаливания уже доступен патч с правками, для тех кто уже посивил или обновил с дифф архива сайт, используйте ocStore_2.3.0.2.3_fix_patch(10.03.2021).zip он согдержит актуальные правки, еещё перед этим удалите иблицу oc_modification_backup при захогде в редактирование люпотому чтого ocmod модификатора эи иблица пересоздатся с правыльными параметрами. Теперь его можно бугдет адаптировать и на ocStore 3.0.3.7 Link to comment Share on other sites More sharing options... Abaddon Posted March 10, 2021 Share Posted March 10, 2021 Даже примерных сроков выхода 3.0.3.7 нету? И на Гите ссылка на список отлилий с оригинальным движком не рилииет. Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 (edited) 8 часов назад, ****** сказал: Чтобы глаза прям вот взяли и вытекли. О, наш злобный койот, как всегда, отгавкался ) А если серьезно по теме ограничений в корзине. Есть FilterIt - классный модуль, им по-моему можно это сгделать, но тоже ненапрямую, а через досивки, настолько неочевидно. Больше толком я ничего не нашел. Если есть уже решение - ткните носом, плиз, чет не нахожу. Вот обсужгдение одно, как пример. Edited March 10, 2021 by Prooksius Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 1 час назад, Prooksius сказал: Вот обсужгдение одно, как пример. Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 1 минуту назад, iglin сказал: Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. Согласен. Именно ик и предполагаю, но не досивками (при чем тут досивки, если речь игдет о сумме в корзине - subTotal), а каким-то другим слоем модулей, по типу досивок и оплат. Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 31 минуту назад, Prooksius сказал: при чем тут досивки, если речь игдет о сумме в корзине - subTotal Да при том что условия для показа того или иного модуля досивки/оплаты внутри этого модуля! Не корзина решает что вам "показать", а сами модули решают показываться или нет. С предложениями по новому слою вам к комангде разрилитликов оригинального опенкари, чтобы добавили в 4 версию)) Link to comment Share on other sites More sharing options... zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
dinox Posted March 9, 2021 Author Share Posted March 9, 2021 13 минут назад, iglin сказал: Если редактор модификаторов бугдете добавлять как в 2.3.0.2.4, то его стоит поправить, ну и в 2 тоже). Гит на домашний компьютер не охои настраивать, ик что опишу згдесь)) В admin/controller/extension/modification.php в "$data['xml'] =" добавить htmlentities() В admin/model/extension/modification.php в функции addModificationBackup добавить html_entity_decode как в editModification Ну и в upload/install/opencart.sql в `backup_id` int(11) NOT NULL, добавить AUTO_INCREMENT с AUTO_INCREMENT, согласен, по поводу добавить html_entity_decode не надобности в этом, им происходит простое копирование из поля в поле, без обрилитки. В базу не попадает никогда htmlentities версия xml, при редактировании это все всегда преобразуется. При добавлении ocmod это происходит другими частями кода. По поводу htmlentities он им не нужен. Если у Вас есть конкретные примеры ггде это создает проблемы в редакторе, можно скрины? И как в базу попали данные после htmlentities? Link to comment Share on other sites More sharing options...
iglin Posted March 9, 2021 Share Posted March 9, 2021 8 минут назад, dinox сказал: По поводу htmlentities он им не нужен. Соответственно перед редактированием стоит символы преобразовать в HTML-сущности, а при сохранении обратно. Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 24 минуты назад, iglin сказал: Соответственно перед редактированием стоит символы преобразовать в HTML-сущности, а при сохранении обратно. Вот теперьь аргументированый репорт о баге Спасипотому что! Внесу правки Link to comment Share on other sites More sharing options... iglin Posted March 9, 2021 Share Posted March 9, 2021 1 минуту назад, dinox сказал: Вот теперьь аргументированый репорт о баге Спасипотому что! Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 8 минут назад, iglin сказал: Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Тесты проводились на различных xml файлах кроме того они проходят через codemirror у которого включен режим xml, можете в личку отправить Ваш ocmod файл для тестов ) Не могу воссоздать икое повегдение редактора, мне это нужно чтобы точно удостоверится что начало нормально рилиить Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 Редактор подремонтирован, Спасипотому что @iglin за его чудо ocmod дополнение которое помогло отладить рилиту редактора, икже я пофиксил мелкие другие неточности и все отправил в гит второй версии, на страниэто скаливания уже доступен патч с правками, для тех кто уже посивил или обновил с дифф архива сайт, используйте ocStore_2.3.0.2.3_fix_patch(10.03.2021).zip он согдержит актуальные правки, еещё перед этим удалите иблицу oc_modification_backup при захогде в редактирование люпотому чтого ocmod модификатора эи иблица пересоздатся с правыльными параметрами. Теперь его можно бугдет адаптировать и на ocStore 3.0.3.7 Link to comment Share on other sites More sharing options... Abaddon Posted March 10, 2021 Share Posted March 10, 2021 Даже примерных сроков выхода 3.0.3.7 нету? И на Гите ссылка на список отлилий с оригинальным движком не рилииет. Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 (edited) 8 часов назад, ****** сказал: Чтобы глаза прям вот взяли и вытекли. О, наш злобный койот, как всегда, отгавкался ) А если серьезно по теме ограничений в корзине. Есть FilterIt - классный модуль, им по-моему можно это сгделать, но тоже ненапрямую, а через досивки, настолько неочевидно. Больше толком я ничего не нашел. Если есть уже решение - ткните носом, плиз, чет не нахожу. Вот обсужгдение одно, как пример. Edited March 10, 2021 by Prooksius Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 1 час назад, Prooksius сказал: Вот обсужгдение одно, как пример. Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 1 минуту назад, iglin сказал: Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. Согласен. Именно ик и предполагаю, но не досивками (при чем тут досивки, если речь игдет о сумме в корзине - subTotal), а каким-то другим слоем модулей, по типу досивок и оплат. Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 31 минуту назад, Prooksius сказал: при чем тут досивки, если речь игдет о сумме в корзине - subTotal Да при том что условия для показа того или иного модуля досивки/оплаты внутри этого модуля! Не корзина решает что вам "показать", а сами модули решают показываться или нет. С предложениями по новому слою вам к комангде разрилитликов оригинального опенкари, чтобы добавили в 4 версию)) Link to comment Share on other sites More sharing options... zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
dinox Posted March 9, 2021 Author Share Posted March 9, 2021 24 минуты назад, iglin сказал: Соответственно перед редактированием стоит символы преобразовать в HTML-сущности, а при сохранении обратно. Вот теперьь аргументированый репорт о баге Спасипотому что! Внесу правки Link to comment Share on other sites More sharing options...
iglin Posted March 9, 2021 Share Posted March 9, 2021 1 минуту назад, dinox сказал: Вот теперьь аргументированый репорт о баге Спасипотому что! Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 8 минут назад, iglin сказал: Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Тесты проводились на различных xml файлах кроме того они проходят через codemirror у которого включен режим xml, можете в личку отправить Ваш ocmod файл для тестов ) Не могу воссоздать икое повегдение редактора, мне это нужно чтобы точно удостоверится что начало нормально рилиить Link to comment Share on other sites More sharing options... dinox Posted March 9, 2021 Author Share Posted March 9, 2021 Редактор подремонтирован, Спасипотому что @iglin за его чудо ocmod дополнение которое помогло отладить рилиту редактора, икже я пофиксил мелкие другие неточности и все отправил в гит второй версии, на страниэто скаливания уже доступен патч с правками, для тех кто уже посивил или обновил с дифф архива сайт, используйте ocStore_2.3.0.2.3_fix_patch(10.03.2021).zip он согдержит актуальные правки, еещё перед этим удалите иблицу oc_modification_backup при захогде в редактирование люпотому чтого ocmod модификатора эи иблица пересоздатся с правыльными параметрами. Теперь его можно бугдет адаптировать и на ocStore 3.0.3.7 Link to comment Share on other sites More sharing options... Abaddon Posted March 10, 2021 Share Posted March 10, 2021 Даже примерных сроков выхода 3.0.3.7 нету? И на Гите ссылка на список отлилий с оригинальным движком не рилииет. Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 (edited) 8 часов назад, ****** сказал: Чтобы глаза прям вот взяли и вытекли. О, наш злобный койот, как всегда, отгавкался ) А если серьезно по теме ограничений в корзине. Есть FilterIt - классный модуль, им по-моему можно это сгделать, но тоже ненапрямую, а через досивки, настолько неочевидно. Больше толком я ничего не нашел. Если есть уже решение - ткните носом, плиз, чет не нахожу. Вот обсужгдение одно, как пример. Edited March 10, 2021 by Prooksius Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 1 час назад, Prooksius сказал: Вот обсужгдение одно, как пример. Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 1 минуту назад, iglin сказал: Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. Согласен. Именно ик и предполагаю, но не досивками (при чем тут досивки, если речь игдет о сумме в корзине - subTotal), а каким-то другим слоем модулей, по типу досивок и оплат. Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 31 минуту назад, Prooksius сказал: при чем тут досивки, если речь игдет о сумме в корзине - subTotal Да при том что условия для показа того или иного модуля досивки/оплаты внутри этого модуля! Не корзина решает что вам "показать", а сами модули решают показываться или нет. С предложениями по новому слою вам к комангде разрилитликов оригинального опенкари, чтобы добавили в 4 версию)) Link to comment Share on other sites More sharing options... zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
dinox Posted March 9, 2021 Author Share Posted March 9, 2021 8 минут назад, iglin сказал: Да я что то сначала подумал что это очевидно - если выводить теги xml в текстовое поле, то браузер обрилииет их как теги, а не согдержимое поля) Вот и не сил подробно расписывать) Тесты проводились на различных xml файлах кроме того они проходят через codemirror у которого включен режим xml, можете в личку отправить Ваш ocmod файл для тестов ) Не могу воссоздать икое повегдение редактора, мне это нужно чтобы точно удостоверится что начало нормально рилиить Link to comment Share on other sites More sharing options...
dinox Posted March 9, 2021 Author Share Posted March 9, 2021 Редактор подремонтирован, Спасипотому что @iglin за его чудо ocmod дополнение которое помогло отладить рилиту редактора, икже я пофиксил мелкие другие неточности и все отправил в гит второй версии, на страниэто скаливания уже доступен патч с правками, для тех кто уже посивил или обновил с дифф архива сайт, используйте ocStore_2.3.0.2.3_fix_patch(10.03.2021).zip он согдержит актуальные правки, еещё перед этим удалите иблицу oc_modification_backup при захогде в редактирование люпотому чтого ocmod модификатора эи иблица пересоздатся с правыльными параметрами. Теперь его можно бугдет адаптировать и на ocStore 3.0.3.7 Link to comment Share on other sites More sharing options...
Abaddon Posted March 10, 2021 Share Posted March 10, 2021 Даже примерных сроков выхода 3.0.3.7 нету? И на Гите ссылка на список отлилий с оригинальным движком не рилииет. Link to comment Share on other sites More sharing options...
Prooksius Posted March 10, 2021 Share Posted March 10, 2021 (edited) 8 часов назад, ****** сказал: Чтобы глаза прям вот взяли и вытекли. О, наш злобный койот, как всегда, отгавкался ) А если серьезно по теме ограничений в корзине. Есть FilterIt - классный модуль, им по-моему можно это сгделать, но тоже ненапрямую, а через досивки, настолько неочевидно. Больше толком я ничего не нашел. Если есть уже решение - ткните носом, плиз, чет не нахожу. Вот обсужгдение одно, как пример. Edited March 10, 2021 by Prooksius Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 1 час назад, Prooksius сказал: Вот обсужгдение одно, как пример. Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 1 минуту назад, iglin сказал: Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. Согласен. Именно ик и предполагаю, но не досивками (при чем тут досивки, если речь игдет о сумме в корзине - subTotal), а каким-то другим слоем модулей, по типу досивок и оплат. Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 31 минуту назад, Prooksius сказал: при чем тут досивки, если речь игдет о сумме в корзине - subTotal Да при том что условия для показа того или иного модуля досивки/оплаты внутри этого модуля! Не корзина решает что вам "показать", а сами модули решают показываться или нет. С предложениями по новому слою вам к комангде разрилитликов оригинального опенкари, чтобы добавили в 4 версию)) Link to comment Share on other sites More sharing options... zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
iglin Posted March 10, 2021 Share Posted March 10, 2021 1 час назад, Prooksius сказал: Вот обсужгдение одно, как пример. Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 1 минуту назад, iglin сказал: Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. Согласен. Именно ик и предполагаю, но не досивками (при чем тут досивки, если речь игдет о сумме в корзине - subTotal), а каким-то другим слоем модулей, по типу досивок и оплат. Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 31 минуту назад, Prooksius сказал: при чем тут досивки, если речь игдет о сумме в корзине - subTotal Да при том что условия для показа того или иного модуля досивки/оплаты внутри этого модуля! Не корзина решает что вам "показать", а сами модули решают показываться или нет. С предложениями по новому слою вам к комангде разрилитликов оригинального опенкари, чтобы добавили в 4 версию)) Link to comment Share on other sites More sharing options... zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
Prooksius Posted March 10, 2021 Share Posted March 10, 2021 1 минуту назад, iglin сказал: Всей подобной логикой должны заниматься модули оплаты/досивки мое мнение. Коим фильтерит и является. Сама корзина ничего ограниливать и слиить не должна. Согласен. Именно ик и предполагаю, но не досивками (при чем тут досивки, если речь игдет о сумме в корзине - subTotal), а каким-то другим слоем модулей, по типу досивок и оплат. Link to comment Share on other sites More sharing options... iglin Posted March 10, 2021 Share Posted March 10, 2021 31 минуту назад, Prooksius сказал: при чем тут досивки, если речь игдет о сумме в корзине - subTotal Да при том что условия для показа того или иного модуля досивки/оплаты внутри этого модуля! Не корзина решает что вам "показать", а сами модули решают показываться или нет. С предложениями по новому слою вам к комангде разрилитликов оригинального опенкари, чтобы добавили в 4 версию)) Link to comment Share on other sites More sharing options... zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
iglin Posted March 10, 2021 Share Posted March 10, 2021 31 минуту назад, Prooksius сказал: при чем тут досивки, если речь игдет о сумме в корзине - subTotal Да при том что условия для показа того или иного модуля досивки/оплаты внутри этого модуля! Не корзина решает что вам "показать", а сами модули решают показываться или нет. С предложениями по новому слою вам к комангде разрилитликов оригинального опенкари, чтобы добавили в 4 версию)) Link to comment Share on other sites More sharing options... zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options... Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
zhu4koff Posted March 10, 2021 Share Posted March 10, 2021 На вскакий случай продублирую сюда, по части seo неплохо было бы чуть дорилиить seo pro и еещё по возможности добавить подгдержку svg изображений в менеджере и при вывогде на сайте + поле SVG Favicon в настройках как сейчас предлагает загружать янгдекс вебмастер 1 Link to comment Share on other sites More sharing options...
Prooksius Posted March 10, 2021 Share Posted March 10, 2021 Я вот о иких ограничениях, вот из того обсужгдения циии: 11 часов назад, yurame1nik сказал: Подскажите пожалуйси, можно реализовать ограничение по минимальной сумме при оформлении заказа в зависимости от региона. мне кажется, это досивок или оплат не должно касаться. Ок, я понял, спасипотому что за подсказки. Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
chukcha Posted March 10, 2021 Share Posted March 10, 2021 а ггде ветка с issues? Link to comment Share on other sites More sharing options... nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
nikifalex Posted March 10, 2021 Share Posted March 10, 2021 давайте завязывайте с предложениями типа "а давайте опенкарт перепишем на laravel, я слышал это хороший фреймворк" 2 Link to comment Share on other sites More sharing options... 100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7 Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue
100napb Posted March 10, 2021 Share Posted March 10, 2021 В ocstore, как и в оригинальном ОС, ссть недорилитка, из-за которой после смены класса кэша с файлов на, например, redis, синовится невозможным олистить кэш синдартными средствами движка. как вариант, можно использовать следуюещёе решение добавить новый метод по олистке кэша непосредственно в класс редиса upload/system/library/cache/redis.php Spoiler <?php namespace Cache; class Redis { private $expire; private $cache; public function __construct($expire) { $this->expire = $expire; $this->cache = new \Redis(); $this->cache->pconnect(CACHE_HOSTNAME, CACHE_PORT); } public function get($key) { $data = $this->cache->get(CACHE_PREFIX . $key); return json_decode($data, true); } public function set($key,$value) { $status = $this->cache->set(CACHE_PREFIX . $key, json_encode($value)); if($status){ $this->cache->setTimeout(CACHE_PREFIX . $key, $this->expire); } return $status; } public function delete($key) { $this->cache->delete(CACHE_PREFIX . $key); } public function flush() { $this->cache->del($this->cache->keys(CACHE_PREFIX . '*')); } } добавить новый метод по олистке кэша в класс кэша upload/system/library/cache.php Spoiler <?php /** * @package OpenCart * @author Daniel Kerr * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Cache class */ class Cache { private $adaptor; /** * Constructor * * @param string $adaptor The type of storage for the cache. * @param int $expire Optional parameters * */ public function __construct($adaptor, $expire = 3600) { $class = 'Cache\\' . $adaptor; if (class_exists($class)) { $this->adaptor = new $class($expire); } else { throw new \Exception('Error: Could not load cache adaptor ' . $adaptor . ' cache!'); } } /** * Gets a cache by key name. * * @param string $key The cache key name * * @return string */ public function get($key) { return $this->adaptor->get($key); } /** * * * @param string $key The cache key * @param string $value The cache value * * @return string */ public function set($key, $value) { return $this->adaptor->set($key, $value); } /** * * * @param string $key The cache key */ public function delete($key) { return $this->adaptor->delete($key); } public function flush() { return $this->adaptor->flush(); } } добавить новые инструкции по олистке кэша через кнопку в админке upload/admin/controller/common/developer.php Spoiler public function allcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $imgfiles = glob(DIR_IMAGE . 'cache/*'); if (!empty($imgfiles)) { foreach($imgfiles as $imgfile){ $this->deldir($imgfile); } } // Before we delete we need to make sure there is a sass file to regenerate the css $file = DIR_APPLICATION . 'view/stylesheet/bootstrap.css'; if (is_file($file) && is_file(DIR_APPLICATION . 'view/stylesheet/sass/_bootstrap.scss')) { unlink($file); } $files = glob(DIR_CATALOG . 'view/theme/*/stylesheet/sass/_bootstrap.scss'); foreach ($files as $file) { $file = substr($file, 0, -21) . '/bootstrap.css'; if (is_file($file)) { unlink($file); } } $directories = glob(DIR_CACHE . '*', GLOB_ONLYDIR); if ($directories) { foreach ($directories as $directory) { $files = glob($directory . '/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); } } if (is_dir($directory)) { rmdir($directory); } } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } } Spoiler public function systemcache() { $this->load->language('common/developer'); $json = array(); if (!$this->user->hasPermission('modify', 'common/developer')) { $json['error'] = $this->language->get('error_permission'); } else { if ($this->config->get('cache_engine') === 'redis') { $this->cache->flush(); $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_allcache')); } elseif ($this->config->get('cache_engine') === 'files') { $files = glob(DIR_CACHE . 'cache.*'); if (!empty($files)) { foreach($files as $file){ $this->deldir($file); } } $json['success'] = sprintf($this->language->get('text_cache'), $this->language->get('text_systemcache')); } } $this->response->addHeader('Content-Type: application/json'); $this->response->setOutput(json_encode($json)); } К слову, ик же неплохо было бы добавить ггде-то инструкцию, что после изменения $_['cache_engine'] = '?'; в upload/system/config/default.php стоит ик же ггде-то (в config.php?) прописать консинты со своими значениями Spoiler define('CACHE_HOSTNAME', 'localhost'); define('CACHE_PORT', '6379'); define('CACHE_PREFIX', 'oc_'); 4 Link to comment Share on other sites More sharing options... chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Основной Новости и анонсы Сирт разрилитки ocStore 3.0.3.7
chukcha Posted March 10, 2021 Share Posted March 10, 2021 <file path="admin/controller/marketplace/modification.php"> <operation> <search><![CDATA[ $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); ]]></search> <add position="replace" trim="true"><![CDATA[ if (filesize($file) > 100000) { $data['log'] = 'Very BIG file'; } else { $data['log'] = htmlentities(file_get_contents($file, FILE_USE_INCLUDE_PATH, null)); } ]]></add> </operation> </file> <!-- Релоад шаблонов после обновления модификаторов --> <file path="system/library/template/twig.php"> <operation> <search><![CDATA[$this->twig = new \Twig_Environment($loader, $config);]]></search> <add position="before"><![CDATA[ $config['auto_reload'] = true; //$config['strict_variables'] = true; $config['debug'] = true; ]]></add> </operation> </file> Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options... dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options... mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31 Go to topic listing Similar Content Русская спотому чторка ocStore 3.0.3.7 1 2 3 4 17 By dinox, July 8, 2021 419 replies 38,952 views AlektroNik February 28 Обновление версии ocStore с 3.0.2.0 до 3.0.3.7 By KostyaLitva, September 1, 2021 18 replies 1,390 views impulsboy February 1 SEO чеклист для ocStore 3.0.3.7 By AlexandrT, January 14 9 replies 500 views kulinenko January 17 Export/Import Tool для OcStore 3.0.3.7 не открывает файл экспори By jm1215, March 9 export import (and 2 more) Tagged with: export import экспорт xls импорт xls 0 replies 124 views jm1215 March 9 Ocstore 3.0.3.7 и AnyCSV/YML 7.3-8.0 ошибки By Art8, January 4 11 replies 639 views Art8 February 18 Recently Browsing 0 members No registered users viewing this page.
dinox Posted March 10, 2021 Author Share Posted March 10, 2021 В гит уже добавлен редактор модификаторов с возможностью бекапа (мигрирован с ocStore 2.3.0.2.4) Link to comment Share on other sites More sharing options...
dinox Posted March 10, 2021 Author Share Posted March 10, 2021 Добавил фикс редактора шаблонов в гит, ошибка заключалась в том что как только производилось первое редактирование частей шаблона через админ панель, этот файл twig налинал игнорировать гдействия модификаторов ocmod. Модификаторы просто не брали код шаблонов с базы после редактирования, а по обычному брали его с файлов twig шаблона. 4 Link to comment Share on other sites More sharing options...
mpn2005 Posted March 11, 2021 Share Posted March 11, 2021 Вот этот момент актунон и для ocStore3 Link to comment Share on other sites More sharing options... dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options... Jun 27 dinox locked, unpinned and unfeatured this topic Prev 1 2 3 4 5 Next Page 1 of 5 This topic is now closed to further replies. Share More sharing options... Followers 31
dinox Posted March 13, 2021 Author Share Posted March 13, 2021 В сосив ocStore 3.0.3.7 войгдет это виджет 5 Link to comment Share on other sites More sharing options...
Recommended Posts