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

#   Productcode in URL gives a 404

##

- **[Joomill](/forum/user/33738-joomill "View Joomill's Profile")**
- [![Joomill's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33738.jpg)](/forum/user/33738-joomill "View Joomill's Profile") Topic Author
- [ Offline](/forum/user/33738-joomill)

Less More

- Posts: 224
- Thank you received: 10
-
-
- [](http://www.joomill.nl)
-

8 years 10 months ago [\#284701](#284701) by [Joomill](/forum/user/33738-joomill "View Joomill's Profile")  *[Productcode in URL gives a 404](/forum/44-mass-actions/893228-productcode-in-url-gives-a-404#284701 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3  Hi,  I'm trying to get the productcode (not the product-id) in my URL but everything i do results in a 404.  /lego/fireman-60051 /lego/60051/fireman /lego/fireman-set60051  I also turned on and off the &quot;simple breadcrumbs&quot; and &quot;remove id&quot; in the SEF options but nothing works. Can you point me in the right direction?")* was created by *[Joomill](/forum/user/33738-joomill "View Joomill's Profile")*

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.3

Hi,

I'm trying to get the productcode (not the product-id) in my URL but everything i do results in a 404.

/lego/fireman-60051
/lego/60051/fireman
/lego/fireman-set60051

I also turned on and off the "simple breadcrumbs" and "remove id" in the SEF options but nothing works.
Can you point me in the right direction?

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

8 years 10 months ago [\#284703](#284703) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Productcode in URL gives a 404](/forum/44-mass-actions/893228-productcode-in-url-gives-a-404#284703 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3  Hi,  I'm trying to get the productcode (not the product-id) in my URL but everything i do results in a 404.  /lego/fireman-60051 /lego/60051/fireman /lego/fireman-set60051  I also turned on and off the &quot;simple breadcrumbs&quot; and &quot;remove id&quot; in the SEF options but nothing works. Can you point me in the right direction?")*

Hello,

CF : [ www.hikashop.com/support/documentation/5...ig.html#features\_sef](https://www.hikashop.com/support/documentation/54-hikashop-config.html#features_sef)

By default HikaShop use the ID in order to find the product.
When you remove the ID from the SEF URL, it will base its search on the "product alias" (and "product name" if it can't find an alias).
Thanks to the "alias auto fill" setting, the system would automatically generate the alias when finding the product (to speed up the process afterwards).

So if you want to base your URLs on the product code ; the best would be to copy the value in the product alias too.

But please note that an alias cannot start with a number since the Joomla router system will consider it as an ID. That's why HikaShop will add a "p" prefix in case of the product name start with a number.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[Joomill](/forum/user/33738-joomill "View Joomill's Profile")**
- [![Joomill's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33738.jpg)](/forum/user/33738-joomill "View Joomill's Profile") Topic Author
- [ Offline](/forum/user/33738-joomill)

Less More

- Posts: 224
- Thank you received: 10
-
-
- [](http://www.joomill.nl)
-

8 years 10 months ago [\#284769](#284769) by [Joomill](/forum/user/33738-joomill "View Joomill's Profile")  Replied by *[Joomill](/forum/user/33738-joomill "View Joomill's Profile")* on topic *[Productcode in URL gives a 404](/forum/44-mass-actions/893228-productcode-in-url-gives-a-404#284769 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3  Hi,  I'm trying to get the productcode (not the product-id) in my URL but everything i do results in a 404.  /lego/fireman-60051 /lego/60051/fireman /lego/fireman-set60051  I also turned on and off the &quot;simple breadcrumbs&quot; and &quot;remove id&quot; in the SEF options but nothing works. Can you point me in the right direction?")*

Thank you Jerome,
It seems to work when i change the alias.

Now we have 4000 products, so is there a way to add the product-code after the product-alias with a massaction or another fast way?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTMyMjgtcHJvZHVjdGNvZGUtaW4tdXJsLWdpdmVzLWEtNDA0P3RtcGw9bWFya2Rvd24=) 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: 86566
- Thank you received: 14313
-
-

8 years 10 months ago [\#284778](#284778) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Productcode in URL gives a 404](/forum/44-mass-actions/893228-productcode-in-url-gives-a-404#284778 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3  Hi,  I'm trying to get the productcode (not the product-id) in my URL but everything i do results in a 404.  /lego/fireman-60051 /lego/60051/fireman /lego/fireman-set60051  I also turned on and off the &quot;simple breadcrumbs&quot; and &quot;remove id&quot; in the SEF options but nothing works. Can you point me in the right direction?")*

Hi,

Yes, you can use mass actions for that.
You can have a "update the values" action on the product_alias column equal to product.product_code if you want to directly set the product code in the alias.
Or you could also append it with an operation like that: concat( product.product_alias, product.product_code )
I've never tried a concat with a mass action but it should work and if it doesn't, you could actually run the same query directly in your phpmyadmin:
update #__hikashop_product SET product_alias = concat( product_alias, product_code )

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

- **[Joomill](/forum/user/33738-joomill "View Joomill's Profile")**
- [![Joomill's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33738.jpg)](/forum/user/33738-joomill "View Joomill's Profile") Topic Author
- [ Offline](/forum/user/33738-joomill)

Less More

- Posts: 224
- Thank you received: 10
-
-
- [](http://www.joomill.nl)
-

8 years 10 months ago [\#284842](#284842) by [Joomill](/forum/user/33738-joomill "View Joomill's Profile")  Replied by *[Joomill](/forum/user/33738-joomill "View Joomill's Profile")* on topic *[Productcode in URL gives a 404](/forum/44-mass-actions/893228-productcode-in-url-gives-a-404#284842 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3  Hi,  I'm trying to get the productcode (not the product-id) in my URL but everything i do results in a 404.  /lego/fireman-60051 /lego/60051/fireman /lego/fireman-set60051  I also turned on and off the &quot;simple breadcrumbs&quot; and &quot;remove id&quot; in the SEF options but nothing works. Can you point me in the right direction?")*

Thanks Nicolas,

Because we imported all products the alias is empty.
Now i have enabled the autofill alias, but i have to open and save each product to get a alias.
Is this also possible with a massaction? So i can first create an alias and later concat it

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTMyMjgtcHJvZHVjdGNvZGUtaW4tdXJsLWdpdmVzLWEtNDA0P3RtcGw9bWFya2Rvd24=) 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: 86566
- Thank you received: 14313
-
-

8 years 10 months ago [\#284845](#284845) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Productcode in URL gives a 404](/forum/44-mass-actions/893228-productcode-in-url-gives-a-404#284845 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3  Hi,  I'm trying to get the productcode (not the product-id) in my URL but everything i do results in a 404.  /lego/fireman-60051 /lego/60051/fireman /lego/fireman-set60051  I also turned on and off the &quot;simple breadcrumbs&quot; and &quot;remove id&quot; in the SEF options but nothing works. Can you point me in the right direction?")*

Hi,

The alias auto fill will basically copy the product_name in the product_alias field.
You can do that with the mass action system. Just replace the product_code by "product_name".

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

- **[Joomill](/forum/user/33738-joomill "View Joomill's Profile")**
- [![Joomill's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33738.jpg)](/forum/user/33738-joomill "View Joomill's Profile") Topic Author
- [ Offline](/forum/user/33738-joomill)

Less More

- Posts: 224
- Thank you received: 10
-
-
- [](http://www.joomill.nl)
-

8 years 10 months ago [\#284898](#284898) by [Joomill](/forum/user/33738-joomill "View Joomill's Profile")  Replied by *[Joomill](/forum/user/33738-joomill "View Joomill's Profile")* on topic *[Productcode in URL gives a 404](/forum/44-mass-actions/893228-productcode-in-url-gives-a-404#284898 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3  Hi,  I'm trying to get the productcode (not the product-id) in my URL but everything i do results in a 404.  /lego/fireman-60051 /lego/60051/fireman /lego/fireman-set60051  I also turned on and off the &quot;simple breadcrumbs&quot; and &quot;remove id&quot; in the SEF options but nothing works. Can you point me in the right direction?")*

Thanks for helping me in the right direction.

I used
concat(product.product_name, "-", product_code)

to get what i need: url/productname-code

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

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

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