Jump to content

Layered Navigation - Url Link


mackna

Recommended Posts

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

Link to comment
Share on other sites

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....t-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

I think it's a common problem...

 

At least, for me too...

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

Hi Everyone,

 

Thanks for any insight into this problem, as I'm just trying to scope it out in order to understand if it is even something that can be fixed.

 

When I am in my shop, I can filter by categories and features. It works like a beauty. If I filter by a category, the URL that is produced looks like this:

 

localhost:8888/50-shop#/categories-category_name

 

I can copy this link, paste it into a new browser window, and the page loads with the selected filters enabled and products filtered appropriately.

 

 

The issue I have is when I filter by features.

 

If I filter by a feature, the URL that is produced looks like this:

 

localhost:8888/50-shop#/feature_name-feature_value

 

If I copy and paste this link into a new browser window, the url redirects to:

 

localhost:8888/50-shop#/

 

The selected filters are removed, or rather, never appear.

 

I have been searching high and low for a solution to this. I think that a lot of people are having the same issue, but I'm not sure, because I don't always understand the problem that people are describing. In any case, does anyone know if there is a solution to this?

 

Is this a bug, or is the functionality that I'm expecting just not something that is built into Prestashop? Does anyone have any leads on how this problem can be solved?

 

Thanks for any thoughts. I will try to pay them forward.

 

Kent

Edited by threeopus3 (see edit history)
  • Like 1
Link to comment
Share on other sites

Just wanted to give some feedback on this in case anyone else has the same problems that I was having. See the problem, as described above - when I had features in my layered nav links/urls, they would disappear if I copy and pasted the links.

 

I searched everywhere for a solution to this, finally hired someone to customize the layered nav module for me, only to find out that the default 1.5.4 module works fine as it is. You just need to make sure that in your module settings, you reindex all products after adding new features. If you do that, everything works like a charm.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

Same problem but I think I have more details, maybe it will help to find solution.

 

It's important that my shop is non-english (polish): sklepdlaciebie.pl, layered navigation works but links are not working and, in my opinion, problem is with "translations".

 

Few examples

So, where translation is applied to filters? I'd like to disable it and check, but can't find.

Edited by adamuss (see edit history)
  • Like 2
Link to comment
Share on other sites

adamuss > i didn't know there were super-hero in Poland so far... and then i read your post and it made my day :lol:

I 've been searching for a solution to "keep" manufacturer filter in url for hours.

Thanks to you i now know that you need to keep "manufacturer" instead of "fabricant" (french word for "manufacturer")

 

thanks a million man

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Dont work for me. Spanish Shop. 1.5.4.1

 

Filters put # in url and dont work

If I manually remove the # from url it works and send me to another url (for example: http://www.myshop.com/8-camisetas/talla-2xl (talla-2xl filter) send me to: http://www.myshop.com/8-camisetas?selected_filters=talla-2xl 

 

And sometimes i clic the filters but it dont update url or anything...

Link to comment
Share on other sites

  • 2 months later...
  • 5 months later...

Just wanted to give some feedback on this in case anyone else has the same problems that I was having. See the problem, as described above - when I had features in my layered nav links/urls, they would disappear if I copy and pasted the links.

 

I searched everywhere for a solution to this, finally hired someone to customize the layered nav module for me, only to find out that the default 1.5.4 module works fine as it is. You just need to make sure that in your module settings, you reindex all products after adding new features. If you do that, everything works like a charm.

Thanks Threeopus3,

   Re-indexing done  the trick....

Link to comment
Share on other sites

  • 2 months later...

Same hash (#) problems in category name with polish language. Rebuilding attribute and URL in blockalyerd module not help

Same here...

 

Thanks Threeopus3,

   Re-indexing done  the trick....

How does it work ? 

Even on the demo PS site: http://fo.demo.prestashop.com/en/3-women , when you select any option from the layered nav on the left, you get a url with a #

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 9 months later...
  • 9 months later...

The same issue I had with russian localization. There I had parameters kategorii and brend instead of categories and manufacturer in the URL. So preseletion also didn't work for me. That's because blocklayered-ajax.php expect categories and manufacturer parameters. I didn't find where it could be changed. If anybody knows, please tell.

 

I created a little hack. I replace parameters in javascript code each time before module performs request to the server.

 

In

/your-theme/js/modules/blocklayered/blocklayered.js

 

find following code:

var params = window.location.href.split('#')[1];
reloadContent('&selected_filters='+params);
 
and update to:
var params = window.location.href.split('#')[1];
   if (params) {
       params = params
                .replace(/kategorii/i, 'categories')
                .replace(/brend/i, 'manufacturer');
   }
reloadContent('&selected_filters='+params);
 
IMPORTANT: instead of kategorii and brend you need to put parameters used in your locale.
 
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 1 month later...

This problem is still there in PrestaShop 1.6.7.

 

Re-indexing URL's does not help. The shop is in Dutch language, and will also be in French language soon.

How to get this to work with translated strings?

 

Anyone got this to work in PrestaShop without having English or French language installed?

Link to comment
Share on other sites

  • 2 months later...
  • 5 weeks later...

Ok.

I have some tips for some people not getting this to work.

Step 1.
Go into your attributes and see that the attribute value have the same URL in each language you are using. Pref. English.
IMPORTANT PS: Make sure none of the URLs have spaces or dashes in them.  For example dont make the url look like this:
URL ex: "large XL"
Instead make them look like this:
largexl

This is only needed if you want to filter the values and perhaps make a own link to the values. for example:

http://yourdomain//t-shirt#/size-smalm-largel-largexl

 

If you add a space or a dash it will look like this "/size-smal-l-large-l-large-xl"  and, well you can see the problem. :)

I have tested this out and sometimes presta will add a underscore instead but it dosnt work with more than one language in your shop.

Step 2.
​Go into Blocklayered Navigation (filter) module and Press the "indexing" buttons at the top.

 

Step3.
Ad the CRON JOBs in your cpanel/hosting.

Edited by rfourt (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

Hello, 

I have the same problème my shop was in frensh and block layered is working but when i do use the filters and change the language, the language is changed but it goes back to the caategory page without any filters in the URLs

please help!

Link to comment
Share on other sites

  • 2 years later...

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
×
×
  • Create New...