cart URL to product page

  • Posts: 62
  • Thank you received: 1
9 years 11 months ago #214459

-- url of the page with the problem -- : flatize.fabulosa.ch
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.4.44

Hi
Im having a Problem to understand the linking to product page in the cart.
Example:

- When I add a product to the cart on product listing the link to the product page is a SEF URL like /shop/damen/halsketten/kette-rainbow-leaf and the page is showing as I set it up.

- When I add a product to the cart on a slider from home and click on the link in cart the URL Looks like /component/hikashop/set-light-pastel?Itemid= and the productpage is not showing what I set up.

I would appreciate any help to let me understand this linking and let me set up correctly.
Thanks in advance and best regards
florcar

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
9 years 11 months ago #214466

Hi,

The link to the product page in the cart is generated dynamically. But the module doesn't know the real link to the product page.
To solve that, the simplest is to fill the "canonical URL" field of each product with the product page URL of the product.
That way, the links on the cart will use that link automatically instead of trying to guess it.
Also, if you set the "force canonical URLs on listing" setting of the HikaShop configuration to generate the canonical URLs, they will be filled automatically for you when you display the listing of products.

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

  • Posts: 62
  • Thank you received: 1
9 years 11 months ago #214545

Hi
Well I set the canonical URL for some products but it is not working.
It is working when you add the product on product listing or product page to cart but not when you add it on home page.
Weird :blink:
Regards
florcar

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

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
9 years 11 months ago #214570

Hi,

If you set the canonical URL in your product but that the link doesn't correspond to it on the cart, then it means that either you have an old version of HikaShop, or you have an old version of the file "cart" of the view "checkout" via the menu Display>Views which doesn't support the canonical URL of products. So check on that.

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

  • Posts: 62
  • Thank you received: 1
9 years 11 months ago #214586

Hi
Yeah that could it be. File cart of view product has Version * @version 2.3.0 and cart of view checkout * @version 2.3.2. Is it too old?
Regards

Edit: file cart of view checkout allready uses canonical URL with Version 2.3.2

Last edit: 9 years 11 months ago by florcar. Reason: Added the correct view

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

  • Posts: 62
  • Thank you received: 1
9 years 11 months ago #214589

Hi Nicolas
I think I fixed it.
changed every

[<?php if(@$defaultParams['link_to_product_page']){ ?> <a href="<?php echo hikashop_completeLink('product&task=show&cid='.$row->product_id.'&name='.$row->alias.$url_itemid);?>" ><?php } ?>])
to
<?php if(@$defaultParams['link_to_product_page']){ ?> <a href="<?php echo hikashop_contentLink('product&task=show&cid='.$row->product_id.'&name='.$row->alias.$url_itemid,$row);?>" ><?php } ?>
also in the file cart of the view product.
Regards

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

Time to create page: 0.063 seconds
Powered by Kunena Forum