[Skip to main content](#vessel-content)

#   Hikashop Cart Module bug

##

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

8 years 2 months ago [\#297535](#297535) by [Bender](/forum/user/38688-bender "View Bender's Profile")  *[Hikashop Cart Module bug](/forum/3-bug-report/895650-hikashop-cart-module-bug#297535 "-- HikaShop version -- : 351 -- Joomla version -- : 3812 -- PHP version -- : 7 -- Browser(s) name and version -- : chrome  Hikashop Cart Module  It is difficult to explain in English, so I translate Google translator  Noticed  I have a product, it is added to two different categories, being in each of the categories you can watch the goods and in the navigation menu (bread crumbs) you will see the correct the way to this product, for example, Item with an alias mean-well-hdr-15-24  Has the form in each category of such URL  / bloki-pitaniya / 24-volt / product / mean-well-hdr-15-24 / category&#95;pathway-1208 / meanwell / product / mean-well-hdr-15-24 / category&#95;pathway-1329  This is the right job. In order to search the product out of the main category he has a canonical URL and a permanent link, this is also correct.  Further I do so: I add the goods to the basket, I click on the button to look the basket I'm looking at the URL of the product and at this point it will have an automatic URL from the root of the category from which you are looking at the basket, for example, can be such urls  / datchiki / vlazhnosti / product / mean-well-hdr-15-24 / danfoss / solenoid-valves / product / mean-well-hdr-15-24  that is, such URLs should not be in principle, because this leads to a navigation error, If you go on bread crumbs you will fall into other categories that you do not need, or pay attention, such pages are in Google search, which is also wrong If you go to the checkout page and see the product URL, then url will have a root from the first point of the first jumla menu, then this is also wrong  Here is the question of how to fix this, what is the reason for this? It's hard to explain in English, but it's better to see for yourself the site's behavior in the shopping cart module")* was created by *[Bender](/forum/user/38688-bender "View Bender's Profile")*

-- HikaShop version -- : 351
-- Joomla version -- : 3812
-- PHP version -- : 7
-- Browser(s) name and version -- : chrome

Hikashop Cart Module

It is difficult to explain in English, so I translate Google translator

Noticed

I have a product, it is added to two different categories, being in each of the categories
you can watch the goods and in the navigation menu (bread crumbs) you will see the correct
the way to this product, for example,
Item with an alias mean-well-hdr-15-24

Has the form in each category of such URL

/ bloki-pitaniya / 24-volt / product / mean-well-hdr-15-24 / category_pathway-1208
/ meanwell / product / mean-well-hdr-15-24 / category_pathway-1329

This is the right job. In order to search the product out of the main category
he has a canonical URL and a permanent link, this is also correct.

Further I do so: I add the goods to the basket, I click on the button to look the basket
I'm looking at the URL of the product and at this point it will have an automatic URL
from the root of the category from which you are looking at the basket, for example, can
be such urls

/ datchiki / vlazhnosti / product / mean-well-hdr-15-24
/ danfoss / solenoid-valves / product / mean-well-hdr-15-24

that is, such URLs should not be in principle, because this leads to a navigation error,
If you go on bread crumbs you will fall into other categories that
you do not need, or pay attention, such pages are in Google search,
which is also wrong
If you go to the checkout page and see the product URL, then url
will have a root from the first point of the first jumla menu, then this is also wrong

Here is the question of how to fix this, what is the reason for this?
It's hard to explain in English, but it's better to see for yourself the site's behavior
in the shopping cart module

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTU2NTAtaGlrYXNob3AtY2FydC1tb2R1bGUtYnVnP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

8 years 2 months ago [\#297561](#297561) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop Cart Module bug](/forum/3-bug-report/895650-hikashop-cart-module-bug#297561 "-- HikaShop version -- : 351 -- Joomla version -- : 3812 -- PHP version -- : 7 -- Browser(s) name and version -- : chrome  Hikashop Cart Module  It is difficult to explain in English, so I translate Google translator  Noticed  I have a product, it is added to two different categories, being in each of the categories you can watch the goods and in the navigation menu (bread crumbs) you will see the correct the way to this product, for example, Item with an alias mean-well-hdr-15-24  Has the form in each category of such URL  / bloki-pitaniya / 24-volt / product / mean-well-hdr-15-24 / category&#95;pathway-1208 / meanwell / product / mean-well-hdr-15-24 / category&#95;pathway-1329  This is the right job. In order to search the product out of the main category he has a canonical URL and a permanent link, this is also correct.  Further I do so: I add the goods to the basket, I click on the button to look the basket I'm looking at the URL of the product and at this point it will have an automatic URL from the root of the category from which you are looking at the basket, for example, can be such urls  / datchiki / vlazhnosti / product / mean-well-hdr-15-24 / danfoss / solenoid-valves / product / mean-well-hdr-15-24  that is, such URLs should not be in principle, because this leads to a navigation error, If you go on bread crumbs you will fall into other categories that you do not need, or pay attention, such pages are in Google search, which is also wrong If you go to the checkout page and see the product URL, then url will have a root from the first point of the first jumla menu, then this is also wrong  Here is the question of how to fix this, what is the reason for this? It's hard to explain in English, but it's better to see for yourself the site's behavior in the shopping cart module")*

Hi,

On the checkout/cart HikaShop has to generate the link to the product page of each product. However, it doesn't know the URL that you were using when you added the product to the cart. And it could come from any menu item listing categories or products and any category selected in the product. So HikaShop uses the current menu item if possible or pick a random one.
Ther only other possible is that you turn on the "force canonical URLs on listings" setting.
In that case, the cart/checkout won't have to generate the URL and will use the canonical URL of the product instead.
However, this will also be the case on the listings, which you might not want for your breacrumbs.
Alternatively, the cart/checkout have a setting to remove the link to the product page so you might want to turn that off.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTU2NTAtaGlrYXNob3AtY2FydC1tb2R1bGUtYnVnP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

8 years 2 months ago [\#297570](#297570) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop Cart Module bug](/forum/3-bug-report/895650-hikashop-cart-module-bug#297570 "-- HikaShop version -- : 351 -- Joomla version -- : 3812 -- PHP version -- : 7 -- Browser(s) name and version -- : chrome  Hikashop Cart Module  It is difficult to explain in English, so I translate Google translator  Noticed  I have a product, it is added to two different categories, being in each of the categories you can watch the goods and in the navigation menu (bread crumbs) you will see the correct the way to this product, for example, Item with an alias mean-well-hdr-15-24  Has the form in each category of such URL  / bloki-pitaniya / 24-volt / product / mean-well-hdr-15-24 / category&#95;pathway-1208 / meanwell / product / mean-well-hdr-15-24 / category&#95;pathway-1329  This is the right job. In order to search the product out of the main category he has a canonical URL and a permanent link, this is also correct.  Further I do so: I add the goods to the basket, I click on the button to look the basket I'm looking at the URL of the product and at this point it will have an automatic URL from the root of the category from which you are looking at the basket, for example, can be such urls  / datchiki / vlazhnosti / product / mean-well-hdr-15-24 / danfoss / solenoid-valves / product / mean-well-hdr-15-24  that is, such URLs should not be in principle, because this leads to a navigation error, If you go on bread crumbs you will fall into other categories that you do not need, or pay attention, such pages are in Google search, which is also wrong If you go to the checkout page and see the product URL, then url will have a root from the first point of the first jumla menu, then this is also wrong  Here is the question of how to fix this, what is the reason for this? It's hard to explain in English, but it's better to see for yourself the site's behavior in the shopping cart module")*

I use No generate the URLs option

It is preferable to enable use canonical url if specified only in cart module
not for whole site this will be ok

How to change ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTU2NTAtaGlrYXNob3AtY2FydC1tb2R1bGUtYnVnP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

8 years 2 months ago [\#297574](#297574) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop Cart Module bug](/forum/3-bug-report/895650-hikashop-cart-module-bug#297574 "-- HikaShop version -- : 351 -- Joomla version -- : 3812 -- PHP version -- : 7 -- Browser(s) name and version -- : chrome  Hikashop Cart Module  It is difficult to explain in English, so I translate Google translator  Noticed  I have a product, it is added to two different categories, being in each of the categories you can watch the goods and in the navigation menu (bread crumbs) you will see the correct the way to this product, for example, Item with an alias mean-well-hdr-15-24  Has the form in each category of such URL  / bloki-pitaniya / 24-volt / product / mean-well-hdr-15-24 / category&#95;pathway-1208 / meanwell / product / mean-well-hdr-15-24 / category&#95;pathway-1329  This is the right job. In order to search the product out of the main category he has a canonical URL and a permanent link, this is also correct.  Further I do so: I add the goods to the basket, I click on the button to look the basket I'm looking at the URL of the product and at this point it will have an automatic URL from the root of the category from which you are looking at the basket, for example, can be such urls  / datchiki / vlazhnosti / product / mean-well-hdr-15-24 / danfoss / solenoid-valves / product / mean-well-hdr-15-24  that is, such URLs should not be in principle, because this leads to a navigation error, If you go on bread crumbs you will fall into other categories that you do not need, or pay attention, such pages are in Google search, which is also wrong If you go to the checkout page and see the product URL, then url will have a root from the first point of the first jumla menu, then this is also wrong  Here is the question of how to fix this, what is the reason for this? It's hard to explain in English, but it's better to see for yourself the site's behavior in the shopping cart module")*

Hi,

There is no option to use it in some places and not in others.
So you would have to change the code in the view file displaying the cart module.
In the file "cart" of the view "product", you can change the line: Code:

?&gt;&lt;a href="&lt;?php echo hikashop_contentLink('product&amp;task=show&amp;cid='.$product-&gt;product_id.'&amp;name='.$product-&gt;alias.$this-&gt;url_itemid, $product);?&gt;"&gt;&lt;?php

to: Code:

?&gt;&lt;a href="&lt;?php echo hikashop_cleanURL($product-&gt;product_canonical, false, true);?&gt;"&gt;&lt;?php

and that should use the canonical URL on the cart module even with the "force canonical URLs on listings" setting turned off.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84OTU2NTAtaGlrYXNob3AtY2FydC1tb2R1bGUtYnVnP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.056 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
