Search the Community
Showing results for tags 'Layered Navigation'.
-
Hello. I have a problem with layered navigation i think, if i choice some features i regenerates a url link. But when i copy/past the same link i disappears. Example. http://www.skinlife.se/3-ansiktsvard#/kon-man/produkt-ansiktsvatten redirects to ---> http://www.skinlife.se/3-ansiktsvard#/ Is this a common problem our do i have bad settings? -- Marcus Horne www.skinlife.se
-
Here as small how to for Layered Navigation module. I found too much people asking for that mod, so i wrote this how to and it is also available in portuguese here: http://goo.gl/CCMjA7 So here we go. Block Layered works with product attributes filter (like size, color, etc) and when you have one attribute out-of-stock but still enabled, when customer check the attribute, the product still appear, even with this attribute with quantity 0. The only way to change that without changing the core of module, is disabling this attribute when it is out-of-stock, which if you have a million products is a nightmare... So, to avoid this problem i made some changes in blocklayered.php. Note that my blocklayered version is 1.8.9 and my prestashop version is 1.5.4. 1 - Dont Show Products With Selected Filter Attribute Unavailable To hide products which have the customer selected filter out of stock, open the file blocklayered.php and around line 2375 you find the code: case 'id_product_attribute' : After that you find 2 foreach. In the second one you will find the code: foreach ($sub_queries as $sub_query) { $query_filters_where .= ' AND p.id_product IN (SELECT pa.`id_product` FROM `'._DB_PREFIX_.'product_attribute_combination` pac LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.`id_product_attribute` = pac.`id_product_attribute`)'; if (version_compare(_PS_VERSION_,'1.5','>')) $query_filters_where .= Shop::addSqlAssociation('product_attribute', 'pa'); $query_filters_where .= 'WHERE '.implode(' OR ', $sub_query).') '; } Replace with: foreach ($sub_queries as $sub_query) { $query_filters_where .= ' AND p.id_product IN (SELECT pa.`id_product` FROM `'._DB_PREFIX_.'product_attribute_combination` pac LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.`id_product_attribute` = pac.`id_product_attribute`)'; if (version_compare(_PS_VERSION_,'1.5','>')) $query_filters_where .= 'INNER JOIN `'._DB_PREFIX_.'stock_available` sa ON (sa.`id_product_attribute` = pac.`id_product_attribute` AND sa.`quantity` > 0)'; if (version_compare(_PS_VERSION_,'1.5','>')) $query_filters_where .= Shop::addSqlAssociation('product_attribute', 'pa'); $query_filters_where .= 'WHERE '.implode(' OR ', $sub_query).') '; } OK, now, navigating to category where this problem happens you can note that products with selected attribute unavailable will not be shown anymore. But, looking to filter name you will se that the total products do not correspond with the ones presented, this is because the block layered table still add product attributes even when out of stock. 2 - Correction Of Out-Of-Stock Attributes in DB To correct this problem, we need to index only attributes available. To do this, open again the blocklayered.php file and search for public function indexAttribute($id_product = null) (around line 255). After that, change the code: Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'layered_product_attribute` (`id_attribute`, `id_product`, `id_attribute_group`, `id_shop`) SELECT pac.id_attribute, pa.id_product, ag.id_attribute_group, '.(version_compare(_PS_VERSION_,'1.5','>') ? 'product_attribute_shop.`id_shop`' : '1').' FROM '._DB_PREFIX_.'product_attribute pa '.(version_compare(_PS_VERSION_,'1.5','>') ? Shop::addSqlAssociation('product_attribute', 'pa') : '').' INNER JOIN '._DB_PREFIX_.'product_attribute_combination pac ON pac.id_product_attribute = pa.id_product_attribute INNER JOIN '._DB_PREFIX_.'attribute a ON (a.id_attribute = pac.id_attribute) INNER JOIN '._DB_PREFIX_.'attribute_group ag ON ag.id_attribute_group = a.id_attribute_group '.(is_null($id_product) ? '' : 'AND pa.id_product = '.(int)$id_product).' GROUP BY a.id_attribute, pa.id_product '.(version_compare(_PS_VERSION_,'1.5','>') ? ', product_attribute_shop.`id_shop`' : '')); To: Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'layered_product_attribute` (`id_attribute`, `id_product`, `id_attribute_group`, `id_shop`) SELECT pac.id_attribute, pa.id_product, ag.id_attribute_group, '.(version_compare(_PS_VERSION_,'1.5','>') ? 'product_attribute_shop.`id_shop`' : '1').' FROM '._DB_PREFIX_.'product_attribute pa '.(version_compare(_PS_VERSION_,'1.5','>') ? Shop::addSqlAssociation('product_attribute', 'pa') : '').' INNER JOIN '._DB_PREFIX_.'product_attribute_combination pac ON pac.id_product_attribute = pa.id_product_attribute '.(version_compare(_PS_VERSION_,'1.5','>') ? ' INNER JOIN '._DB_PREFIX_.'stock_available sa ON (sa.id_product_attribute = pac.id_product_attribute AND sa.quantity > 0) ' : '').' INNER JOIN '._DB_PREFIX_.'attribute a ON (a.id_attribute = pac.id_attribute) INNER JOIN '._DB_PREFIX_.'attribute_group ag ON ag.id_attribute_group = a.id_attribute_group '.(is_null($id_product) ? '' : 'AND pa.id_product = '.(int)$id_product).' GROUP BY a.id_attribute, pa.id_product '.(version_compare(_PS_VERSION_,'1.5','>') ? ', product_attribute_shop.`id_shop`' : '')); Now, navigate your your Layered Navigation configuration page in admin and Build Attribute Index. You should note that the number of products with attribute have been changed too. Hope you enjoy this mod and dont forget to make a backup of your file... Regards Mozack
- 45 replies
-
- 8
-
-
- blocklayered
- block layered
-
(and 3 more)
Tagged with:
-
Hi all, my goal is to create a list of links in the top menù to go to category page filtered by manufacturer. At the moment I'm using: getCategoryLink((int)$category['id_category'], null, null).'#/manufacturer-'.$manufacturer["name"] I need that the page is exactly the category page to use the blocklayered module. The problem is that the page reloads automatically removing filters from url. It happens the same thing using the url generated by the module blocklayered in the category page. This is an example link generated by the module: http://localhost/man/14-shoes#/manufacturer-manufacturer_test (same created by getCategoryLink() ) This is where it redirects: http://localhost/man/14-shoes# Debugging I understand that the problem come from the blocklayered module. I was wondering if anyone else had already encountered with this problem and maybe fixed it. Thanks in advance.
- 2 replies
-
- category page
- filter
-
(and 1 more)
Tagged with:
-
Hello, - I made a custom field `field_custom` to `{prefix}_product` tables and Product ( ObjectModel ) classes. How could I, add this `field_custom` searchable and also available to layered navigation filter or integrate with module ps_facetedsearch ? for reference i have added image as attachment - is there any hook available for extending this functionalities? - if no hook available, is there code fixing solution available there? My steps for already , trying to catch the solution: - modified in ps_facetedsearch.php , in function rebuildLayeredStructure() added field_custom to {prefix}_layered_category tables `type` field enum type value - in function , buildLayeredCategories() added another conditions layered_selection_km_slider in $sqlInsert - in src/Filters/Block.php added new switch case field_custom and made a function getFieldCustomRangeBlock() now i stuck here. any help will be appreciated. thank you.
-
- layered filters
- layered navigation
-
(and 1 more)
Tagged with:
-
Hi - am using latest version of Prestashop 1.6 an the layered navigation block. On Product list pages in all categories I have some extra content at the bottom of these category pages with anchors, linked to from the category description text. With layered navigaion block enabled clicking the link to the anchor results in the page scrolling down to the anchor momentarily, before scrolling back to the top. With the layered navigation module disabled the anchors work as expected. Has anyone else had this and found a fix? Thanks Baz
-
- product list
- product list anchors
-
(and 1 more)
Tagged with:
-
Hi, Can someone tell me how can I make the layered module on the left side of my category page to be active by default ? When an user come for the first time on the category page to see the filters on the left side without having to press Show Filters. I having a hard time with this and I don't know how to fix it. The filters are there, working but are hidden.
- 3 replies
-
- layered filters
- layered navigation
-
(and 1 more)
Tagged with:
-
Hello, I would like your help and opinion on the following - I'm really on a dead end with it: My main categories have subcategories (and viewing them is ON) - picture 1. If I click on the main category (smoking pipes), I see nothing - picture 2. Also, the subcategories on the left, lead to nothing, although the label says that there ARE products in this subcategory - picture 3. If I click directly on the subcategory from the horizontal menu, then everything is OK - picture 4. What can be the reason for this? I am totally exhausted trying to think of something! The site is: https://briar-pipes.com. Thank you so much in advance!
- 6 replies
-
- layered navigation
- category
-
(and 1 more)
Tagged with:
-
Is it possible to change the display order of the feature values in the layered navigation block? Please see the first attachment, I have a range of thicknesses which I would like to in ascending order. The IDs are not in proper order as I created the feature values over time and not in correct order, as you can see in the second attachment. As you can also see there are no arrows to move the values up/down. Is it possible to edit the IDs in the database or something like that, or will I just have to start again?? Thanks for any ideas
-
Hi My site currently has two Analytics tracking codes - one in the <head>, as you'd expect but also one outside of the <body>. Latter one is part of a bundle of javascripts and, I presume, is a result of CCC option to "move javascripts to the end". I tried to resolve duplication by switching CCC option off - got rid of duplicate Analytics tag issue but created new problems - namely... the Category block stopped nesting subcategories, making it very ugly. the layered navigation block stopped functioning altogether. When I turn the "move javascripts to the end" option back on, blocks start working again but the Analytics tag is duplicated again. Any ideas how to achieve the best of both worlds here? Thanks in advance. Kristian Site is www.tulchanonline.co.uk
- 1 reply
-
- analytics tracking
- layered navigation
-
(and 1 more)
Tagged with:
-
Hi ! We're running a Prestashop 1.6 instance with approx 1200 products with average of 5 declinations each. I noticed that since few weeks, our server is often crashed down, so I decided to investigate. When I received monitoring server down alert, I immediately checked the logs to see the latest request (the one that may possibly crashed down the website). Here's what I've seen : 70.80.151.18 - - [19/Nov/2017:22:15:31 -0500] "GET /modules/blocklayered/blocklayered-ajax.php?layered_id_attribute_group_6=6_1&layered_id_feature_20=20_1&layered_id_feature_14=14_3&laye red_id_feature_18=18_4&layered_id_feature_129=129_6&layered_id_feature_143=143_8&layered_id_feature_149=149_10&layered_id_feature_160=160_12&layered_id_feature_164=164_13&layered_id_feat ure_491=491_17&id_category_layered=53&layered_price_slider=19_165&orderby=date_add&orderway=desc&n=15&p=2&_=1511147621304 HTTP/1.1" 499 0 "https://www.XXXXXX.ca/fr/53-robes-soleil" "Mo zilla/5.0 (Linux; Android 7.0; SM-T580 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Safari/537.36" "-" So the problem seems to comes from the Layered Navigation module. When I type the "top" command, I see that MariaDB/MySQL process is running full throttle, so here's what "SHOW PROCESSLIST" says : | 63 | XXXXXX | localhost | XXXXXX_www | Query | 5 | statistics | SELECT fl.name feature_name, fp.id_feature, fv.id_feature_value, fvl.value, COUNT(DISTINCT p.id) | 0.000 | Then I decided to reproduce manually the crash : I go on the frontend website, go on a category and then click lots of layered navigation filters. Guess what happened ? Server crashed down ! So I guess that too much filters makes a SQL query with very big complexity, bottlenecking the website. Other than remove layered navigation, decrease max execution time of query, or set less filters choices, is there's a way to fix this ? Is this problem fixed with Prestashop 1.7 ? Thank you very much and have a great day !
- 1 reply
-
- denial of service
- crash
-
(and 3 more)
Tagged with:
-
Hi all, Having troubles with the Layered Navigation block on my website at http://casshudson.monkeydrupal.com/13-casters. The pagination works but the "Showing 1 - 10" count goes nuts when going to any other page using the pagination links. I read here that the problem could be with the # that Layered Nav is appending to the pagination links. I can see this when I hover my mouse over any of the pagination links. For example, hovering over page 2 link shows "http://casshudson.monkeydrupal.com/13-casters#/page-1" -- when in fact the correct URL would be http://casshudson.monkeydrupal.com/13-casters?p=2. As a matter of fact even hovering over the Page 10 link shows the exact same URL (http://casshudson.monkeydrupal.com/13-casters#/page-1). Why page-1? Shouldn't this be page 10? Anyone ever have any issues like this? I've read quite a bit of similar experiences but haven't been able to find anything that works.
- 4 replies
-
- layered navigation
- sort by
-
(and 2 more)
Tagged with:
-
Greetings, When I activate the "Layered Navigation" block, it will not work. Also, with "Layered Nav" active the "sort by" doesnt work (when "Layered Nav" is disabled it does work perfectly). Details: Using any filter will update the "There are x products" but will NOT change the product listing. The "Sort by" will not work when "Layered Nav" is active. Everything works fine with "Layered Nav" disabled. Also, I'm using a different theme, it seems to work fine with the default theme. I tried to initialize index (and the other stuff), cleared cache, enabled cache, disabled cache. I read the files a lot of times and search these (and other) forums for a similar problem, no luck. Theme is based off: http://html5-ninja.c...taShop-theme/10 Shop link is: http://omeuapito.pt/ Thank you for your time!
- 37 replies
-
- 1
-
-
- blocklayered
- layered navigation
-
(and 6 more)
Tagged with:
-
I am trying to configure Layered navigation block on PrestaShop 1.5.4.1 but on Step 1, on selecting categories, the module run continuously. Any help on this please because I would like to allow the visitor to filter the products through Layered navigation block. Regards Thomas
- 15 replies
-
- Layered navigation block
- Layered navigation
-
(and 3 more)
Tagged with:
-
I’m work with PS 1.6 in localhost for temp. So far, everything is ok until I’m use layered navigation block in my category. I have created a filter template in the module config and set 3 filters just in one category (for example category "B") for testing only. There are sub-category filter, product price filter and attribute filter. As often as I’m click via category block, which the category haven’t layered navigation, everything is ok, all products item are showed. But when I’m click which the category have layered navigation (category "B") all products doesn’t appear at all. And even, product price filter and attribute filter doesn’t appeared too. I have category block too. So my condition now I have checked all products in BO->Cataloque->Product are resides at its right category and each of them has right attribute too. I have tried reset & reinstalling the module, but is not worked for me I have re-index price, attribute and url in module configuration, but is not worked too So, what’s wrong with my PS or do I have missed step for my layered navigation? Thank in advanced for any solution. Sorry for my English.
- 1 reply
-
- layered navigation block
- layered navigation
-
(and 1 more)
Tagged with:
-
Hello everyone. How is it possible to get price range filter to work with specific prices (special discounts) on ps1.5.2? As i have seen so far price range work only with base price and not Final price value. Thanks in advance.
- 53 replies
-
- Layered Navigation
- price range
-
(and 1 more)
Tagged with:
-
the hash sign (#) is ignored by the search engines during indexing and therefore our ajax filtered layered navigation links never end up in the SERPs. but I found this guide in google where they explain how to use the hash tag SE friendly by appending a ! sign to it - #! https://support.google.com/webmasters/answer/174992?hl=en can it be done for layered navigation, do you think?
-
Hello everyone, I think that I read all topics related to the Layered Navigation and Cron task but I didn't found similar problem. What is my problem - even if I use a built-in CRON module or schedule CRON in my hosting panel it works properly (I got "1" in server logs and/or information when all tasks were executed in built-in module but values in filters in the Layered Navigation don't updated at all. If I do this manually by clicking each button in the module everything updates properly but why it doesn't work with a CRON task? Second, minor issue is that I have two currencies (default is PLN, second EUR) and filtering using EUR is only available on polish version of the shop with PLN currency. Thank you in advance for any bright ideas! Best regards!
-
I'd like to be able to use the layered navigation block on the manufacturers pages if possible. Some of my manufacturers have several hundred products in many categories, so it would be great for the customer to be able to filter down to what they're looking for if possible. Please could you let me know if this is possible? Thanks Gary
-
I found this bug every site that using the prestashop filtering on layered navigation, not only my site problem. (I am using 1.5.5 of prestashop clean install.) When press the “back button” to previous page in browser on product detail page, that I landed on it after a filtering on "layered navigation Block". The filters I put is missing! And The URL is change to wrong url. Example First page with filtering on "layered navigation”, URL is www.example.com/en/3-women#/manufacturer-nicole_miller When click to go to page 2, URL is www.example.com/en/3-women#/manufacturer-nicole_miller/page-2 But when I want to back to page 1 , by click “back button” in browser, URL is change to www.example.com/en/3-women#/ Not the right url like the first one. www.example.com/en/3-women#/manufacturer-nicole_miller I wonder if anyone can help me solve this problem. Best Regards
- 8 replies
-
- Layered navigation
- bugs
-
(and 1 more)
Tagged with:
-
Prestashop 1.5.4.1 Hi My import file has various Features loaded in. For instance, I have various products with the same categories, all with different weights. I have the Feature setup within BO, but have not added any values. When I import them into Prestashop, they import ok, and when viewed in BO appear in the "Custom" value field. However, when I try to setup a filter for this feature in layered navigation block, it does not appear in the list of avalable filters. What I have found is that to get this to work I have to have matching values for the Feature already added. This is not very logical as I could in theory have hundreds of different weights, and I don't want to have to add them all in manually before importing my products. I've noticed that the Color attribute adds in values automatically if they don't exist. Any help greatly appreciated.
- 11 replies
-
How can I keep the accordion for each filter section in the layered navigation block closed by default? Currently, they are all open
- 6 replies
-
- layered navigation
- 1.4
-
(and 2 more)
Tagged with:
-
I am using a custom theme which has custom hooks. I am trying to display the Layered Navigation Filters horizontally on my category page only. My theme has a hook call displayCategoryHeader which displays the category image. I have modified the module php file to add the displayCategoryHeader hook. Then I uninstalled and re-installed the module. It now shows that it in in the hook displayCategoryHeader, however it is not there on the page. It still displays on the left. I will edit the CSS to display horizontally but I need it to display in the correct hook. Can anyone help me? I haven't seen any 3rd party modules that will let me do this either. Thanks
- 7 replies
-
- Blocklayered
- Hooks
-
(and 1 more)
Tagged with:
-
I have configured layered navigation. The filter radio boxes appear but when I tick a box the results stay exactly the same (I would expect them to filter my results). http://multiplasticos.es/shop/en/3-women In other words in my "categories filter" i can see tops(2) dresses(5) I would expect that when I tick "tops" I am shown only the two tops. But when I do so , nothing happens. Thankyou in advance for any help you can give.