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

#   Don't show the Canonical URL in shopping cart

##

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 3 months ago [\#200947](#200947) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#200947 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")* was created by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")*

-- HikaShop version -- : 2.4.0 Business
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.31
-- Browser(s) name and version -- : Firefox

Hello everyone,

All my products have a canonical URL.

(In the frontend):
If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.

This is a problem for me.

Someone have a solution? Or what I'm doing wrong?

Thank you very much!

Last edit: 11 years 3 months ago by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile").

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago [\#200956](#200956) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#200956 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Hi,

In which cart, the module or the cart view page ?
The both views are using the function hikashop_contentLink() to display the url and that function check if there is a canonical url, if it is, this one is used.

Si please check if you don't have view overrides on the view "product / cart" and "cart / showcart".

The following user(s) said Thank You: [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 5 months ago [\#201098](#201098) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201098 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Hi Xavier,

The cart is the Hikashop module.

I don't have view overrides on the cart module, but I had created a view "product / cart". The files were the original files, still I have delete this files (overrides) and the problem remains.

Thanks for helping.

Other ideas?

PD: Al ver que su nombre podría ser catalán: Si puedo explicar la duda en español, por favor, dígamelo, sería más fácil para mí. Gracias

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago -  11 years 5 months ago [\#201099](#201099) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201099 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Hi,

Please check that for the option "Force canonical URLs on listings" you have another value than "No, generates the urls" selected.
Configuration &gt; Features &gt; Sef url options.

Last edit: 11 years 5 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 5 months ago [\#201105](#201105) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201105 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Yes, it was in another than "No, generates the urls"

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 5 months ago [\#201122](#201122) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201122 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

I probe too with both options in SEF Url Options, but nothing, don't work. ![:(](/media/kunena/emoticons/5.png ":(")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY4MjQtZG9udC1zaG93LXRoZS1jYW5vbmljYWwtdXJsLWluLXNob3BwaW5nLWNhcnQ/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

11 years 5 months ago [\#201130](#201130) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201130 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Hi,

With the latest version, I don't see why the canonical URL wouldn't be taken into account on the cart. It ha to come from a modification of one of the views.
Rename the folder templates/YOUR_TEMPLATE/html/com_hikashop and that will deactivate all the views overrides you made for HikaShop. Then, it should probably work, indicating that it comes from one of the view overrides made.

PS: Xavier is also a French name. Xavier don't speak Spanish.

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 5 months ago [\#201236](#201236) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201236 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

> nicolas wrote: Hi,
>
> With the latest version, I don't see why the canonical URL wouldn't be taken into account on the cart. It ha to come from a modification of one of the views.
> Rename the folder templates/YOUR\_TEMPLATE/html/com\_hikashop and that will deactivate all the views overrides you made for HikaShop. Then, it should probably work, indicating that it comes from one of the view overrides made.
>
> PS: Xavier is also a French name. Xavier don't speak Spanish.

Neither. Rename the directory and don't work.

It happens with **only one product.**

I have made many many tests.

I have seen that:
* if the SEF Url Option is "No, generates the urls", works (but the other products don't work)
* If the SEF Url Option is in another value than "No, generates the urls", this product don't work (but the other products work).

I'm going to create a new product (with the same information) and I probe if it works.

While, any more ideas?

PS: Thanks

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#201237](#201237) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201237 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

I hope that you can help me!

I created a new exact product (except characteristic)s and this product works ![:)](/media/kunena/emoticons/8.png ":)") (it goes to the Canonical Url).

When I add the characteristics and I add them a price, I have the same error (don't show the Canonical Url in the cart module) :blink: .

Any idea?

Last edit: 11 years 5 months ago by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile").

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#201238](#201238) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201238 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

If delete the characteristics, works, but if I create them (new characteristics) and I price them, don't work.

There is this error with any product with characteristics. **I checked it.**

Last edit: 11 years 5 months ago by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY4MjQtZG9udC1zaG93LXRoZS1jYW5vbmljYWwtdXJsLWluLXNob3BwaW5nLWNhcnQ/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

11 years 5 months ago [\#201273](#201273) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201273 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Hi,

Ok, try to add the code: Code:

}elseif(!empty($object-&gt;product_parent_id)){ $class = hikashop_get('class.product'); $parent = $class-&gt;get($object-&gt;product_parent_id); if(!empty($parent-&gt;product_canonical)) $url = hikashop_cleanURL($parent-&gt;product_canonical);

after the code: Code:

if(!empty($object-&gt;product_canonical)){ $url = hikashop_cleanURL($object-&gt;product_canonical);

in the file administrator/components/com_hikashop/helpers/helper.php and that should help.

The following user(s) said Thank You: [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#201305](#201305) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#201305 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

YEEEEEEEEEEEESSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ![;)](/media/kunena/emoticons/11.png ";)") ![:)](/media/kunena/emoticons/8.png ":)")

Delete this code: Code:

}elseif(!empty($object-&gt;category_canonical)){ $url = hikashop_cleanURL($object-&gt;category_canonical);

and replaced by: Code:

}elseif(!empty($object-&gt;product_parent_id)){ $class = hikashop_get('class.product'); $parent = $class-&gt;get($object-&gt;product_parent_id); if(!empty($parent-&gt;product_canonical)) $url = hikashop_cleanURL($parent-&gt;product_canonical);

and **works fine!**

Nicolas, thank you very much!!!! ![:)](/media/kunena/emoticons/8.png ":)")

Last edit: 11 years 5 months ago by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile").

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 3 months ago [\#206917](#206917) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#206917 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Now, again doesn't work with **Hikashop 2.5.0**

Joomla! 3.4.2

The code is replaced, but now doesn't work.

Can you help me again?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY4MjQtZG9udC1zaG93LXRoZS1jYW5vbmljYWwtdXJsLWluLXNob3BwaW5nLWNhcnQ/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

11 years 3 months ago [\#207004](#207004) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#207004 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Hi,

So does it work for normal products ? For variants ?
There should be no need to do that modification since the 2.5.0 edition includes it already. Did you perhaps made a mistake when doing the replacing about the update ?
It's working fine on our end.

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 3 months ago [\#207069](#207069) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#207069 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

> nicolas wrote: Hi,
>
> So does it work for normal products ? For variants ?
> There should be no need to do that modification since the 2.5.0 edition includes it already. Did you perhaps made a mistake when doing the replacing about the update ?
> It's working fine on our end.

For normal products and variant products.

When I update to 2.5.0 version, Joomla! display me an error. I lost the link to Hikashop in administration menu. But in URL, I put **/index.php?option=com\_hikashop** and Hikashop works fine.

I fix the error with similar SQL sentence:
Code:

INSERT INTO &#96;PREFIX_menu&#96; (&#96;id&#96;, &#96;menutype&#96;, &#96;title&#96;, &#96;alias&#96;, &#96;note&#96;, &#96;path&#96;, &#96;link&#96;, &#96;type&#96;, &#96;published&#96;, &#96;parent_id&#96;, &#96;level&#96;, &#96;component_id&#96;, &#96;checked_out&#96;, &#96;checked_out_time&#96;, &#96;browserNav&#96;, &#96;access&#96;, &#96;img&#96;, &#96;template_style_id&#96;, &#96;params&#96;, &#96;lft&#96;, &#96;rgt&#96;, &#96;home&#96;, &#96;language&#96;, &#96;client_id&#96;) VALUES (1, 'HIKASHOPNAME', 'Menu_Item_Root', 'root', '', '', '', '', 1, 0, 0, 0, 0, '0000-00-00 00:00:00', 0, 0, '', 0, '', 0, 137, 0, '*', 0)

So, I don't think that this is the problem.

I have the same problem that [ ](http://www.hikashop.com/forum/install-update/877870-upgrade-to-2-5-0-problems.html)[ www.hikashop.com/forum/install-update/87...-2-5-0-problems.html](http://www.hikashop.com/forum/install-update/877870-upgrade-to-2-5-0-problems.html)

* If I turn off the "force canonical URLs on listings" setting in the HikaShop configuration, I have the problem with canonical URL in cart module.

* If I turn on the "force canonical URLs on listings" setting in the HikaShop configuration, I have many 404 errors (page not found).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY4MjQtZG9udC1zaG93LXRoZS1jYW5vbmljYWwtdXJsLWluLXNob3BwaW5nLWNhcnQ/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

11 years 3 months ago [\#207100](#207100) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#207100 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

Hi,

If you get errors when you turn on the "force canonical URLs on listings" setting, it means that you have wrong canonical URLs in your products/categories.
I would recommend to clean them with a mass action:
[ www.hikashop.com/support/forum/product-c...tegories.html#193288](http://www.hikashop.com/support/forum/product-category-display/875343-multi-language-for-categories.html#193288)
and then activate the option so that HikaShop will regenerate valid canonical URLs.

The following user(s) said Thank You: [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")

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

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

Less More

- Posts: 13
- Thank you received: 0
-
-

11 years 3 months ago [\#207287](#207287) by [netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")  Replied by *[netandsoftware](/forum/user/29900-netandsoftware "View netandsoftware's Profile")* on topic *[Don't show the Canonical URL in shopping cart](/forum/26-product-category-display/876824-dont-show-the-canonical-url-in-shopping-cart#207287 "-- HikaShop version -- : 2.4.0 Business -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.31 -- Browser(s) name and version -- : Firefox  Hello everyone,  All my products have a canonical URL.  (In the frontend): If I click this product from other URL, always go to the Canonical URL, except in the shopping cart. The products in the shopping cart (if I click in them) don't go to the Canonical URL.  This is a problem for me.  Someone have a solution? Or what I'm doing wrong?  Thank you very much!")*

> nicolas wrote: Hi,
>
> If you get errors when you turn on the "force canonical URLs on listings" setting, it means that you have wrong canonical URLs in your products/categories.
> I would recommend to clean them with a mass action:
> [ www.hikashop.com/support/forum/product-c...tegories.html#193288](http://www.hikashop.com/support/forum/product-category-display/875343-multi-language-for-categories.html#193288)
> and then activate the option so that HikaShop will regenerate valid canonical URLs.

Yes, this was the solution.

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY4MjQtZG9udC1zaG93LXRoZS1jYW5vbmljYWwtdXJsLWluLXNob3BwaW5nLWNhcnQ/dG1wbD1tYXJrZG93bg==) 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.187 seconds

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

[](#top)
