Wrong product is shown

  • Posts: 12
  • Thank you received: 0
10 years 9 months ago #182102

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.8
-- Browser(s) name and version -- : Chrome/Ie/Firefox (latest)
-- Error-message(debug-mod must be tuned on) -- : Wrong product is shown

When going to one specific product page, the wrong product is shown.
Titles are almost identical, but not the same.

Example:
Url1: /lines/nylon/hunter-freestyle-retriever-line.html
Url2: /lines/nylon/hunter-freestyle-retriever-reflect-line.html

The product of url2 shows in both cases (even on the wrong canonical url which are different in DB).
How can I fix that so the right product shows instead?

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 9 months ago #182121

Hi,

If you enable the option "Remove products and categories id in URLs " in Configuration > Features > SEF that should solve this issue.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
10 years 9 months ago #182265

Hi Xavier

Thank you, but that option have been enabled since the beginning.. :)
These are the settings: i.imgur.com/JqyyTIq.png

Any other known solutions? (Or is this a known bug..?) ;)
I am a developer myself and could probably find the issue, but I have no clue where to look (where the id's are worked out according to the url/menuitem/prod id)..

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 9 months ago #182267

Hi,

I wanted to say "Disable".
Are the Alias of the two products differrent ? Or the sames, if the sames so please edit them to have different aliases.

To find the source of the problem I think that there is some checks to do in the file "components/com_hikashop/router.php" function "hiakshop_retrieve_url_id()".

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
10 years 9 months ago #182630

Awesome. If found the issue through the code.

The issue is that real product name have more non a-z characters in it that the router (regex) cannot find.
On top of that, the product didnt have a computed alias set. But - The computed alias gets a match when the router runs, because it trims out the non a-z characters.
All I had to do, was to find the product in the backend and press "save" on it.

So, a final question: There are many products without an alias and going through them manually and press Save will work, but there are many.
Is there some way to mass generate new alias's for all products (ie. do a mass Save function)?

Last edit: 10 years 9 months ago by cgonline.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 9 months ago #182641

Hi,

The mass actions don't call the save function of the product class, so the aliases will not be added automatically.
What can be done is create a little function which will just call the save function to save the products in a foreach.

Or, you can export the products, fill the product alias column in the csv file an import it back.

Please Log in or Create an account to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum