- Posts: 78
- Thank you received: 5
Stupid question on product alias
- brentwilliams2
-
Topic Author
- Offline
Less
More
13 years 10 months ago #82860
by brentwilliams2
Stupid question on product alias was created by brentwilliams2
I apologize in advance, because I'm sure it's easy, but I just can't find the answer...
How do you set the alias for the product? It seems to be dynamically set by the title, but our processes change the name of our products after a set period of time (We sell event registrations, so the title changes after the event has initially run). But when I do that, the alias changes. Any help?
Thanks!
How do you set the alias for the product? It seems to be dynamically set by the title, but our processes change the name of our products after a set period of time (We sell event registrations, so the title changes after the event has initially run). But when I do that, the alias changes. Any help?
Thanks!
Please Log in or Create an account to join the conversation.
13 years 10 months ago #82974
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Stupid question on product alias
Hi,
What do you called "product alias" ?
Products have a product code which is automatically generated by HikaShop is empty but it could be change in the product editing page.
In the left column, you would see the option "Code" (just before "tax category", "brand"... quantity, etc).
Regards,
What do you called "product alias" ?
Products have a product code which is automatically generated by HikaShop is empty but it could be change in the product editing page.
In the left column, you would see the option "Code" (just before "tax category", "brand"... quantity, etc).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- brentwilliams2
-
Topic Author
- Offline
Less
More
- Posts: 78
- Thank you received: 5
13 years 10 months ago #82986
by brentwilliams2
Replied by brentwilliams2 on topic Stupid question on product alias
I see the product code, but as far as I can tell, it does not change the main URL of the product. In other words, when I'm clicking through my shop, the URL that is used for the products does not seem to be derived from the "Code" field - they are still using the URL structure from the product title.
I want to find out if Hikashop uses an alias like the core joomla articles does.
Does that make sense?
I want to find out if Hikashop uses an alias like the core joomla articles does.
Does that make sense?
Please Log in or Create an account to join the conversation.
13 years 10 months ago #83015
by nicolas
Replied by nicolas on topic Stupid question on product alias
Products don't have an alias for the URL like articles. The text in the URL directly comes from the product name.
It's not easy to change. You would have to create a custom field of the table "product" in order to enter the alias for each product and then change the code:
stringURLSafe(strip_tags($element->product_name))
in the different files of HikaShop and replace product_name by the column name of your custom product field.
The main file where to change that is components/com_hikashop/views/product/view.html.php but it is at several places, including other files, and not always with the same $element variable name...
It's not easy to change. You would have to create a custom field of the table "product" in order to enter the alias for each product and then change the code:
stringURLSafe(strip_tags($element->product_name))
in the different files of HikaShop and replace product_name by the column name of your custom product field.
The main file where to change that is components/com_hikashop/views/product/view.html.php but it is at several places, including other files, and not always with the same $element variable name...
Please Log in or Create an account to join the conversation.
- brentwilliams2
-
Topic Author
- Offline
Less
More
- Posts: 78
- Thank you received: 5
13 years 10 months ago #83057
by brentwilliams2
Replied by brentwilliams2 on topic Stupid question on product alias
Thanks for the update, Nicolas. Would love to see this feature in a later version.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #83328
by mtense
Replied by mtense on topic Stupid question on product alias
This isn't a stupid question. And this is certainly an important feature for SEO and should be a high priority.
I have been very careful to craft my product codes into meaningful aliases and am very surprised and disappointed there is not an option to use them in the url.
Please consider some sort of alias support as a feature in the near future.
Thanks!
I have been very careful to craft my product codes into meaningful aliases and am very surprised and disappointed there is not an option to use them in the url.
Please consider some sort of alias support as a feature in the near future.
Thanks!
Please Log in or Create an account to join the conversation.
13 years 10 months ago #83634
by nicolas
Replied by nicolas on topic Stupid question on product alias
It's in the TODO list.
Usually, product names should be perfect for SEO...
Usually, product names should be perfect for SEO...
Please Log in or Create an account to join the conversation.
13 years 10 months ago #83756
by mtense
Replied by mtense on topic Stupid question on product alias
Glad to hear this will be officially supported soon.
In some quick testing, it appears that everything after the product id in the url is ignored. Therefore, I should be able to make changes to URL with very little danger of breaking anything. Is this true?
I have attached a grep of the locations where the alias is computed from the product_name. Is it safe to simply change all these locations to use product_code instead of name? Changes in the cart and plugins concern me a little.
Sure will be nice once this alias code is consolidated some place
Thanks for all your help!
In some quick testing, it appears that everything after the product id in the url is ignored. Therefore, I should be able to make changes to URL with very little danger of breaking anything. Is this true?
I have attached a grep of the locations where the alias is computed from the product_name. Is it safe to simply change all these locations to use product_code instead of name? Changes in the cart and plugins concern me a little.
Sure will be nice once this alias code is consolidated some place
Thanks for all your help!
Please Log in or Create an account to join the conversation.
13 years 10 months ago #84562
by mtense
Replied by mtense on topic Stupid question on product alias
Hello? Can I get some help here? I can figure out the changes, but want to make sure something unexpected isn't going to bite me.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #85193
by nicolas
Replied by nicolas on topic Stupid question on product alias
Hi,
Indeed, the places that you found in your grep is where you should change the product_name to the product_code if you want the code instead of the name of the product in the URL.
There shouldn't be any surprise if you change the product_name by product_code there.
Indeed, the places that you found in your grep is where you should change the product_name to the product_code if you want the code instead of the name of the product in the URL.
There shouldn't be any surprise if you change the product_name by product_code there.
Please Log in or Create an account to join the conversation.
Time to create page: 0.073 seconds