Products in articles displays the same category

  • Posts: 34
  • Thank you received: 0
10 years 10 months ago #179194

-- url of the page with the problem -- : innovazionitecnologiche.it
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : Firefox latest
-- Error-message(debug-mod must be tuned on) -- : No error

Hi,
I am using short codes like the one below to display Hikashop products directly in articles.

{product}56|name|cart|picture|link|pricedis1{/product}

Problem - the products display correctly (with title, image and price), but the link given is incorrect (the category never changes).

I have created a quick example page here . These products should all be in different categories, yet the category url it always tecnologie-viso-corpo

Any ideas

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 10 months ago #179218

Hi,

The category and the url are two things different.
If you want to have nicer and more personalized url for your products, the best is to use the canonical url.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 34
  • Thank you received: 0
10 years 10 months ago #179296

Hi Jerome thanks for the reply,

So are you saying that I should:

- removed the personalised URL (which takes the Joomla menu alias + product name and number )
- change every single product url to add in a category + product name in the canonical url field?

This seems an inefficient way of creating each product link - is that the best way to set up Hikashop store? Especially if a shop has a lot of products and categories, when a category name gets changed, I would have to pass through each product and manually change the category or do some htaccess rewrites (which is not ideal).

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 10 months ago #179337

Hi,

The product tags have an attribute you can use in order to specify the menu item you want to use for the link to the product page.
If you don't specify any, it will use the first one it finds and thus the category used in the url might not correspond to the category of the product (that's why there is this option). However, the canonical URL of each product allows you to define the URL you want to use for each product.

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

  • Posts: 34
  • Thank you received: 0
10 years 9 months ago #179415

Hi Nicolas,
I am not sure I follow. You mean that within the code below, I can specify the correct category?

{product}56|name|cart|picture|link|pricedis1{/product}

Already each product has been given a specific category on the product page.

Last edit: 10 years 9 months ago by Jeyjoo. Reason: Missed a line

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

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #179438

Hello,
Nicolas was talking about the "Menu ID" option of the "Product" button popup. However, the product tag plugin doesn't use the product canonical URL so I'll edit the code of that plugin to correct it :).
I'll post the last plugin version after the modifications/tests.

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

  • Posts: 34
  • Thank you received: 0
10 years 9 months ago #179534

Thanks Mohamed. Any time frame on the update?
Thanks

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

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #179793

Sure, I'll start it monday and give you the last version through that thread :).

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

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #180189

Hello,
Can you test it with that last plugin version ?
Also note that you should set the canonical url option of your products or set the "Force canonical URLs on listings" option to Use canonical URL if specified via "Hikashop->System->Configuration->Features".

Attachments:

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

  • Posts: 34
  • Thank you received: 0
10 years 9 months ago #180445

Thankyou Mohamed the updated plugin did the trick, though I have a separate issue in that whenever I set canonical URL, I get a 404 error. I opened a thread here:

www.hikashop.com/forum/product-category-...orrect-category.html

Do you have any idea on how to resolve this?

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

  • Posts: 34
  • Thank you received: 0
10 years 9 months ago #182811

Hi Mohamed,
Is there a way to get this to work without forcing canonical? I have been advised to not force canonical due to 404 errors.
There are two examples of this module on this page - innovazionitecnologiche.it/news/guida-al...ta-per-i-piedi-detox
Both links give 404 as they are missing the /shop/ extention on the url after the .it and before the category.
Any way around this (I would like to get Hikashop working correctly rather than add in a htaccess rewrite).

Thanks

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

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #182850

Hello,
To do that the only solution will be to manually add canonical URLs through the "Canonical URL" option of your products configuration page.

The following user(s) said Thank You: Jeyjoo

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

Time to create page: 0.086 seconds
Powered by Kunena Forum