- Posts: 13
- Thank you received: 0
Don't show the Canonical URL in shopping cart
- netandsoftware
-
Topic Author
- Offline
-- 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!
Please Log in or Create an account to join the conversation.
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".
Please Log in or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
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 or Create an account to join the conversation.
Please check that for the option "Force canonical URLs on listings" you have another value than "No, generates the urls" selected.
Configuration > Features > Sef url options.
Please Log in or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
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 or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
I created a new exact product (except characteristic)s and this product works
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?
Please Log in or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
There is this error with any product with characteristics. I checked it.
Please Log in or Create an account to join the conversation.
Ok, try to add the code:
Please Log in or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
Delete this code:
and replaced by:
and works fine!
Nicolas, thank you very much!!!!
Please Log in or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
Joomla! 3.4.2
The code is replaced, but now doesn't work.
Can you help me again?
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
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:
So, I don't think that this is the problem.
I have the same problem that www.hikashop.com/forum/install-update/87...-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 or Create an account to join the conversation.
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
and then activate the option so that HikaShop will regenerate valid canonical URLs.
Please Log in or Create an account to join the conversation.
- netandsoftware
-
Topic Author
- Offline
- Posts: 13
- Thank you received: 0
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
and then activate the option so that HikaShop will regenerate valid canonical URLs.
Yes, this was the solution.
Thanks
Please Log in or Create an account to join the conversation.