Is there an easy was to add all filters to all categories?
Perhaps a sql query in phpmyadmin?
The autocomplete and add is so uneconomical a clickable/selectable list would be much more convenient.
If you've got 50-100 filters and the same number of categories, it's going to take a couple of hours to do manually.
Any ideas on an easy way to do this?
Thanks.
Perhaps a sql query in phpmyadmin?
The autocomplete and add is so uneconomical a clickable/selectable list would be much more convenient.
If you've got 50-100 filters and the same number of categories, it's going to take a couple of hours to do manually.
Any ideas on an easy way to do this?
Thanks.
There are several extensions that do this - search for "filters" in the extension store. I use one for v1.5 but am sure I saw one for v2 as well.
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
There appears to be extension(s) that automatically show filters in categories where they have been added to the products within a category,labeshops wrote:There are several extensions that do this - search for "filters" in the extension store. I use one for v1.5 but am sure I saw one for v2 as well.
But nothing to show all filters for all categories per se.
As a work around to help make the existing assignment method a little easier I have changed /admin/controller/catalog/filter.php
Replacing where it says 5 with 100
The autocomplete will then show a list of 100 attributes so you can simply click them in turn, instead of having to type and then click matching attributes.
Code: Select all
public function autocomplete() {
$json = array();
if (isset($this->request->get['filter_name'])) {
$this->load->model('catalog/filter');
$filter_data = array(
'filter_name' => $this->request->get['filter_name'],
'start' => 0,
'limit' => 5
);
$filters = $this->model_catalog_filter->getFilters($filter_data);
foreach ($filters as $filter) {
$json[] = array(
'filter_id' => $filter['filter_id'],
'name' => strip_tags(html_entity_decode($filter['group'] . ' > ' . $filter['name'], ENT_QUOTES, 'UTF-8'))
);
}
}
The autocomplete will then show a list of 100 attributes so you can simply click them in turn, instead of having to type and then click matching attributes.
Found an even simpler solution:
1. Go to a category in which the required filters have been set.
2. Open web inspector
3. Find "<div id="category-filter" class="well well-sm" style="height: 150px; overflow: auto;">...</div>"
4. Right click and "Copy as HTML"
5. Go to category where you want same attributes and find "<div id="category-filter" class="well well-sm" style="height: 150px; overflow: auto;">...</div>" and right click and "Edit as HTML"
6. Replace existing HTML by pasting that copied.
7. Save
1. Go to a category in which the required filters have been set.
2. Open web inspector
3. Find "<div id="category-filter" class="well well-sm" style="height: 150px; overflow: auto;">...</div>"
4. Right click and "Copy as HTML"
5. Go to category where you want same attributes and find "<div id="category-filter" class="well well-sm" style="height: 150px; overflow: auto;">...</div>" and right click and "Edit as HTML"
6. Replace existing HTML by pasting that copied.
7. Save
Yeah, the one I use does. I don't assign any filters to categories at all. I think this is the one I use. http://www.opencart.com/index.php?route ... n_id=15984dazoosh wrote:There appears to be extension(s) that automatically show filters in categories where they have been added to the products within a category,labeshops wrote:There are several extensions that do this - search for "filters" in the extension store. I use one for v1.5 but am sure I saw one for v2 as well.
But nothing to show all filters for all categories per se.
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Thanks for your suggestion anyway, shame it did't add filters to categories regardless of not been assigned to products for it to show in the category.labeshops wrote:Yeah, the one I use does. I don't assign any filters to categories at all. I think this is the one I use. http://www.opencart.com/index.php?route ... n_id=15984dazoosh wrote:There appears to be extension(s) that automatically show filters in categories where they have been added to the products within a category,labeshops wrote:There are several extensions that do this - search for "filters" in the extension store. I use one for v1.5 but am sure I saw one for v2 as well.
But nothing to show all filters for all categories per se.
Hopefully a solution/extension will be created for anyone in future.
I managed to do it in a few minutes by copy and pasting into the source via web inspector, but not ideal solution.
Thanks again.
Who is online
Users browsing this forum: No registered users and 9 guests