- Posts: 239
- Thank you received: 8
Hikashop Cart Module bug
8 years 3 weeks ago #297535
by Bender
Hikashop Cart Module bug was created by Bender
-- 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
-- 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 or Create an account to join the conversation.
8 years 3 weeks ago #297561
by nicolas
Replied by nicolas on topic Hikashop Cart Module bug
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.
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 or Create an account to join the conversation.
8 years 3 weeks ago #297570
by Bender
Replied by Bender on topic Hikashop Cart Module bug
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 ?
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 or Create an account to join the conversation.
8 years 3 weeks ago #297574
by nicolas
Replied by nicolas on topic Hikashop Cart Module bug
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:
to:
and that should use the canonical URL on the cart module even with the "force canonical URLs on listings" setting turned off.
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:
?><a href="<?php echo hikashop_contentLink('product&task=show&cid='.$product->product_id.'&name='.$product->alias.$this->url_itemid, $product);?>"><?php
Code:
?><a href="<?php echo hikashop_cleanURL($product->product_canonical, false, true);?>"><?php
Please Log in or Create an account to join the conversation.
Time to create page: 0.249 seconds