alinalessioYandex Posted October 24, 2019 Share Posted October 24, 2019 По умолчанию опенкарт предполагает сортировку товаров в категории: 1. По имени 2. По этоне 3. По рейтингу 4. По могдели Как добавить, заменить или перегделать, чтобы была сортировка по самым "популярным" (посещаемым) товарам? Link to comment Share on other sites More sharing options...
spectre Posted October 24, 2019 Share Posted October 24, 2019 p.viewed Link to comment Share on other sites More sharing options... vier Posted October 24, 2019 Share Posted October 24, 2019 18 минут назад, alinalessioYandex сказал: Как добавить, заменить или перегделать, чтобы была сортировка по самым "популярным" (посещаемым) товарам? добавить/изменить в свой код запроса могдели товара вот икой код сортировки - p.`viewed` DESC Link to comment Share on other sites More sharing options... alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 8 часов назад, vier сказал: добавить/изменить в свой код запроса могдели товара вот икой код сортировки - p.`viewed` DESC Простите. Туплю )) Эи строчка для контроллера, правильно? Если да, то в каком месте в контроллере речь о сортировке? Или это в шаблоне прописать? Можно подробней? Link to comment Share on other sites More sharing options... alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 Сгделал ик. Но не рилииет. Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. В файле catalog/controller/product/category.php Было: $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); Сило: $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed=DESC' . $url) ); Link to comment Share on other sites More sharing options... chukcha Posted October 24, 2019 Share Posted October 24, 2019 Сколько товаров? Link to comment Share on other sites More sharing options... alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 6 минут назад, chukcha сказал: Сколько товаров? 700 товаров. Link to comment Share on other sites More sharing options... chukcha Posted October 24, 2019 Share Posted October 24, 2019 а в могдель добавили? Link to comment Share on other sites More sharing options... Ptenec Posted October 24, 2019 Share Posted October 24, 2019 if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 19 минут назад, Ptenec сказал: в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Зачем? Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 3 часа назад, alinalessioYandex сказал: Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 5 Link to comment Share on other sites More sharing options... 1 year later... lutuy Posted January 12, 2021 Share Posted January 12, 2021 (edited) Доброе время суток. Извините, как можно догделать, что бы не выводилась не нужная сортировка в шаблоне (к примеру не нужно По этоне По могдели...) И как можно сгделать по product.latest. product.popular. product.bestseller. Edited January 12, 2021 by lutuy Link to comment Share on other sites More sharing options... 2 weeks later... eremin90 Posted January 21, 2021 Share Posted January 21, 2021 В 24.10.2019 в 23:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u043a\u0411 · 34 downloads Спасипотому что за модификатор! Отлично рилииет. Спотому чторка ocStore 2.3.0.2.3 Link to comment Share on other sites More sharing options... 1 year later... motobrat Posted Monday at 06:10 PM Share Posted Monday at 06:10 PM 24.10.2019 в 22:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u041a\u0431 · 80 скаливаний А для OcStore 3.0.3.7 есть икой модификатор? Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: Настройка и оптимизация Сортировать товары по ПРОСМОТРАМ. Как сгделать? Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений 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
vier Posted October 24, 2019 Share Posted October 24, 2019 18 минут назад, alinalessioYandex сказал: Как добавить, заменить или перегделать, чтобы была сортировка по самым "популярным" (посещаемым) товарам? добавить/изменить в свой код запроса могдели товара вот икой код сортировки - p.`viewed` DESC Link to comment Share on other sites More sharing options... alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 8 часов назад, vier сказал: добавить/изменить в свой код запроса могдели товара вот икой код сортировки - p.`viewed` DESC Простите. Туплю )) Эи строчка для контроллера, правильно? Если да, то в каком месте в контроллере речь о сортировке? Или это в шаблоне прописать? Можно подробней? Link to comment Share on other sites More sharing options... alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 Сгделал ик. Но не рилииет. Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. В файле catalog/controller/product/category.php Было: $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); Сило: $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed=DESC' . $url) ); Link to comment Share on other sites More sharing options... chukcha Posted October 24, 2019 Share Posted October 24, 2019 Сколько товаров? Link to comment Share on other sites More sharing options... alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 6 минут назад, chukcha сказал: Сколько товаров? 700 товаров. Link to comment Share on other sites More sharing options... chukcha Posted October 24, 2019 Share Posted October 24, 2019 а в могдель добавили? Link to comment Share on other sites More sharing options... Ptenec Posted October 24, 2019 Share Posted October 24, 2019 if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 19 минут назад, Ptenec сказал: в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Зачем? Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 3 часа назад, alinalessioYandex сказал: Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 5 Link to comment Share on other sites More sharing options... 1 year later... lutuy Posted January 12, 2021 Share Posted January 12, 2021 (edited) Доброе время суток. Извините, как можно догделать, что бы не выводилась не нужная сортировка в шаблоне (к примеру не нужно По этоне По могдели...) И как можно сгделать по product.latest. product.popular. product.bestseller. Edited January 12, 2021 by lutuy Link to comment Share on other sites More sharing options... 2 weeks later... eremin90 Posted January 21, 2021 Share Posted January 21, 2021 В 24.10.2019 в 23:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u043a\u0411 · 34 downloads Спасипотому что за модификатор! Отлично рилииет. Спотому чторка ocStore 2.3.0.2.3 Link to comment Share on other sites More sharing options... 1 year later... motobrat Posted Monday at 06:10 PM Share Posted Monday at 06:10 PM 24.10.2019 в 22:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u041a\u0431 · 80 скаливаний А для OcStore 3.0.3.7 есть икой модификатор? Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: Настройка и оптимизация Сортировать товары по ПРОСМОТРАМ. Как сгделать? Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений 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
alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 8 часов назад, vier сказал: добавить/изменить в свой код запроса могдели товара вот икой код сортировки - p.`viewed` DESC Простите. Туплю )) Эи строчка для контроллера, правильно? Если да, то в каком месте в контроллере речь о сортировке? Или это в шаблоне прописать? Можно подробней? Link to comment Share on other sites More sharing options...
alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 Сгделал ик. Но не рилииет. Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. В файле catalog/controller/product/category.php Было: $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); Сило: $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed=DESC' . $url) ); Link to comment Share on other sites More sharing options...
chukcha Posted October 24, 2019 Share Posted October 24, 2019 Сколько товаров? Link to comment Share on other sites More sharing options... alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 6 минут назад, chukcha сказал: Сколько товаров? 700 товаров. Link to comment Share on other sites More sharing options... chukcha Posted October 24, 2019 Share Posted October 24, 2019 а в могдель добавили? Link to comment Share on other sites More sharing options... Ptenec Posted October 24, 2019 Share Posted October 24, 2019 if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 19 минут назад, Ptenec сказал: в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Зачем? Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 3 часа назад, alinalessioYandex сказал: Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 5 Link to comment Share on other sites More sharing options... 1 year later... lutuy Posted January 12, 2021 Share Posted January 12, 2021 (edited) Доброе время суток. Извините, как можно догделать, что бы не выводилась не нужная сортировка в шаблоне (к примеру не нужно По этоне По могдели...) И как можно сгделать по product.latest. product.popular. product.bestseller. Edited January 12, 2021 by lutuy Link to comment Share on other sites More sharing options... 2 weeks later... eremin90 Posted January 21, 2021 Share Posted January 21, 2021 В 24.10.2019 в 23:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u043a\u0411 · 34 downloads Спасипотому что за модификатор! Отлично рилииет. Спотому чторка ocStore 2.3.0.2.3 Link to comment Share on other sites More sharing options... 1 year later... motobrat Posted Monday at 06:10 PM Share Posted Monday at 06:10 PM 24.10.2019 в 22:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u041a\u0431 · 80 скаливаний А для OcStore 3.0.3.7 есть икой модификатор? Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: Настройка и оптимизация Сортировать товары по ПРОСМОТРАМ. Как сгделать? Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений 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
alinalessioYandex Posted October 24, 2019 Author Share Posted October 24, 2019 6 минут назад, chukcha сказал: Сколько товаров? 700 товаров. Link to comment Share on other sites More sharing options...
chukcha Posted October 24, 2019 Share Posted October 24, 2019 а в могдель добавили? Link to comment Share on other sites More sharing options... Ptenec Posted October 24, 2019 Share Posted October 24, 2019 if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 19 минут назад, Ptenec сказал: в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Зачем? Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 3 часа назад, alinalessioYandex сказал: Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 5 Link to comment Share on other sites More sharing options... 1 year later... lutuy Posted January 12, 2021 Share Posted January 12, 2021 (edited) Доброе время суток. Извините, как можно догделать, что бы не выводилась не нужная сортировка в шаблоне (к примеру не нужно По этоне По могдели...) И как можно сгделать по product.latest. product.popular. product.bestseller. Edited January 12, 2021 by lutuy Link to comment Share on other sites More sharing options... 2 weeks later... eremin90 Posted January 21, 2021 Share Posted January 21, 2021 В 24.10.2019 в 23:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u043a\u0411 · 34 downloads Спасипотому что за модификатор! Отлично рилииет. Спотому чторка ocStore 2.3.0.2.3 Link to comment Share on other sites More sharing options... 1 year later... motobrat Posted Monday at 06:10 PM Share Posted Monday at 06:10 PM 24.10.2019 в 22:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u041a\u0431 · 80 скаливаний А для OcStore 3.0.3.7 есть икой модификатор? Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: Настройка и оптимизация Сортировать товары по ПРОСМОТРАМ. Как сгделать? Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue
Ptenec Posted October 24, 2019 Share Posted October 24, 2019 if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 19 минут назад, Ptenec сказал: в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Зачем? Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 3 часа назад, alinalessioYandex сказал: Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 5 Link to comment Share on other sites More sharing options... 1 year later... lutuy Posted January 12, 2021 Share Posted January 12, 2021 (edited) Доброе время суток. Извините, как можно догделать, что бы не выводилась не нужная сортировка в шаблоне (к примеру не нужно По этоне По могдели...) И как можно сгделать по product.latest. product.popular. product.bestseller. Edited January 12, 2021 by lutuy Link to comment Share on other sites More sharing options... 2 weeks later... eremin90 Posted January 21, 2021 Share Posted January 21, 2021 В 24.10.2019 в 23:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u043a\u0411 · 34 downloads Спасипотому что за модификатор! Отлично рилииет. Спотому чторка ocStore 2.3.0.2.3 Link to comment Share on other sites More sharing options... 1 year later... motobrat Posted Monday at 06:10 PM Share Posted Monday at 06:10 PM 24.10.2019 в 22:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u041a\u0431 · 80 скаливаний А для OcStore 3.0.3.7 есть икой модификатор? Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: Настройка и оптимизация Сортировать товары по ПРОСМОТРАМ. Как сгделать?
Yesvik Posted October 24, 2019 Share Posted October 24, 2019 19 минут назад, Ptenec сказал: в могделе добавим по пути catalog\model\catalog\product.php после 'date_modified' => $query->row['date_modified'], 'viewed' => $query->row['viewed'] Зачем? Link to comment Share on other sites More sharing options... Yesvik Posted October 24, 2019 Share Posted October 24, 2019 3 часа назад, alinalessioYandex сказал: Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 5 Link to comment Share on other sites More sharing options... 1 year later... lutuy Posted January 12, 2021 Share Posted January 12, 2021 (edited) Доброе время суток. Извините, как можно догделать, что бы не выводилась не нужная сортировка в шаблоне (к примеру не нужно По этоне По могдели...) И как можно сгделать по product.latest. product.popular. product.bestseller. Edited January 12, 2021 by lutuy Link to comment Share on other sites More sharing options... 2 weeks later... eremin90 Posted January 21, 2021 Share Posted January 21, 2021 В 24.10.2019 в 23:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u043a\u0411 · 34 downloads Спасипотому что за модификатор! Отлично рилииет. Спотому чторка ocStore 2.3.0.2.3 Link to comment Share on other sites More sharing options... 1 year later... motobrat Posted Monday at 06:10 PM Share Posted Monday at 06:10 PM 24.10.2019 в 22:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u041a\u0431 · 80 скаливаний А для OcStore 3.0.3.7 есть икой модификатор? Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1 Go to topic listing Recently Browsing 0 members No registered users viewing this page.
Yesvik Posted October 24, 2019 Share Posted October 24, 2019 3 часа назад, alinalessioYandex сказал: Помогите пожалуйси, как правильно сгделать? Хочу просто чтобы по умолчанию сортировалось по просмотрам. Самые просматриваемые вверху. Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 5 Link to comment Share on other sites More sharing options... 1 year later... lutuy Posted January 12, 2021 Share Posted January 12, 2021 (edited) Доброе время суток. Извините, как можно догделать, что бы не выводилась не нужная сортировка в шаблоне (к примеру не нужно По этоне По могдели...) И как можно сгделать по product.latest. product.popular. product.bestseller. Edited January 12, 2021 by lutuy Link to comment Share on other sites More sharing options... 2 weeks later... eremin90 Posted January 21, 2021 Share Posted January 21, 2021 В 24.10.2019 в 23:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u043a\u0411 · 34 downloads Спасипотому что за модификатор! Отлично рилииет. Спотому чторка ocStore 2.3.0.2.3 Link to comment Share on other sites More sharing options... 1 year later... motobrat Posted Monday at 06:10 PM Share Posted Monday at 06:10 PM 24.10.2019 в 22:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u041a\u0431 · 80 скаливаний А для OcStore 3.0.3.7 есть икой модификатор? Link to comment Share on other sites More sharing options... Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 1
lutuy Posted January 12, 2021 Share Posted January 12, 2021 (edited) Доброе время суток. Извините, как можно догделать, что бы не выводилась не нужная сортировка в шаблоне (к примеру не нужно По этоне По могдели...) И как можно сгделать по product.latest. product.popular. product.bestseller. Edited January 12, 2021 by lutuy Link to comment Share on other sites More sharing options...
eremin90 Posted January 21, 2021 Share Posted January 21, 2021 В 24.10.2019 в 23:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u043a\u0411 · 34 downloads Спасипотому что за модификатор! Отлично рилииет. Спотому чторка ocStore 2.3.0.2.3 Link to comment Share on other sites More sharing options...
motobrat Posted Monday at 06:10 PM Share Posted Monday at 06:10 PM 24.10.2019 в 22:46, Yesvik сказал: Надо в файле catalog/controller/product/category.php найти if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.sort_order'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'ASC'; } и изменить вот ик if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort']; } else { $sort = 'p.viewed'; } if (isset($this->request->get['order'])) { $order = $this->request->get['order']; } else { $order = 'DESC'; } найти $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.sort_order-ASC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.sort_order&order=ASC' . $url) ); и изменить вот ик $data['sorts'][] = array( 'text' => $this->language->get('text_default'), 'value' => 'p.viewed-DESC', 'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '&sort=p.viewed&order=DESC' . $url) ); В файле catalog/model/catalog/product.php найти $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.date_added' ); и изменить вот ик $sort_data = array( 'pd.name', 'p.model', 'p.quantity', 'p.price', 'rating', 'p.sort_order', 'p.viewed', 'p.date_added' ); А теперьь верни всё как было и усинови модификатор ) default_order_by_viewed.ocmod.xml 1 \u041a\u0431 · 80 скаливаний А для OcStore 3.0.3.7 есть икой модификатор? Link to comment Share on other sites More sharing options...
Recommended Posts