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

#   Alias automatic filling is not working

##

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

Less More

- Posts: 23
- Thank you received: 0
-
-

11 years 8 months ago [\#193434](#193434) by [ifenix](/forum/user/34556-ifenix "View ifenix's Profile")  *[Alias automatic filling is not working](/forum/26-product-category-display/875450-alias-automatic-filling-is-not-working#193434 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.0  Hi. Help me please. What I do wrong? After import of products field alias - blank. If Alias automatic filling - yes field must be filled from the product title?  I Remove products and categories id in URLs and Force canonical URLs on listings - Use canonical URL and generate it if missing  Products are available in the list of products,. they have canonical URLs. But I get a &quot;product not found&quot; on the product card. If I to save product in the backend - alias is created. and the product is available in product card. This is for a single product, but they are many...")* was created by *[ifenix](/forum/user/34556-ifenix "View ifenix's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.0

Hi.
Help me please. What I do wrong?
After import of products field alias - blank.
If Alias automatic filling - yes field must be filled from the product title?
[ ![11111.jpg](/forum/attachment/22863) ](/forum/attachment/22863 "11111.jpg")

I Remove products and categories id in URLs and Force canonical URLs on listings - Use canonical URL and generate it if missing
[ ![1&#95;2015-03-06.jpg](/forum/attachment/22862) ](/forum/attachment/22862 "1&#95;2015-03-06.jpg")

Products are available in the list of products,. they have canonical URLs. But I get a "product not found" on the product card. If I to save product in the backend - alias is created. and the product is available in product card. This is for a single product, but they are many...

- [ ![1&#95;2015-03-06.jpg](/forum/attachment/22862) ](/forum/attachment/22862 "1&#95;2015-03-06.jpg") [ ](/forum/attachment/22862?download=1 "1&#95;2015-03-06.jpg")
- [ ![11111.jpg](/forum/attachment/22863) ](/forum/attachment/22863 "11111.jpg") [ ](/forum/attachment/22863?download=1 "11111.jpg")

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

Less More

- Posts: 86564
- Thank you received: 14311
-
-

11 years 8 months ago [\#193573](#193573) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Alias automatic filling is not working](/forum/26-product-category-display/875450-alias-automatic-filling-is-not-working#193573 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.0  Hi. Help me please. What I do wrong? After import of products field alias - blank. If Alias automatic filling - yes field must be filled from the product title?  I Remove products and categories id in URLs and Force canonical URLs on listings - Use canonical URL and generate it if missing  Products are available in the list of products,. they have canonical URLs. But I get a &quot;product not found&quot; on the product card. If I to save product in the backend - alias is created. and the product is available in product card. This is for a single product, but they are many...")*

Hi,

The auto filling of aliases is done at the saving of the product. So that's normal that they are not filled until you save the products.
One possibility is to have a product_alias column in your CSV and import the CSV with the alias prefilled for all your products.

It's normal that you get the error with you turn on the remove ids from URLs and the Force canonical URLs.
Your canonical URLs don't have the id in them, so the only thing the system can rely on when you click on the link is the text of the product in the URL. If you don't have the aliases filled, the text in the URL will come from the product name and if that text is different from the name, it won't be able to find the product as it doesn't have any valid identification mean.

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

11 years 8 months ago -  11 years 8 months ago [\#193620](#193620) by [ifenix](/forum/user/34556-ifenix "View ifenix's Profile")  Replied by *[ifenix](/forum/user/34556-ifenix "View ifenix's Profile")* on topic *[Alias automatic filling is not working](/forum/26-product-category-display/875450-alias-automatic-filling-is-not-working#193620 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.0  Hi. Help me please. What I do wrong? After import of products field alias - blank. If Alias automatic filling - yes field must be filled from the product title?  I Remove products and categories id in URLs and Force canonical URLs on listings - Use canonical URL and generate it if missing  Products are available in the list of products,. they have canonical URLs. But I get a &quot;product not found&quot; on the product card. If I to save product in the backend - alias is created. and the product is available in product card. This is for a single product, but they are many...")*

Thanks for the answer.
The problem is that in my CSV file no field product_alias. But I added option to auto filling alias when importing CSV.
Added code to the function _insertOneTypeOfProducts (administrator/components/com_hikashop/helpers/import.php) on line 1792 Code:

$config =&amp; hikashop_config(); if($config-&gt;get('alias_auto_fill',1) &amp;&amp; $field=='product_alias' &amp;&amp; empty($product-&gt;product_alias)){ $product-&gt;product_alias = strip_tags(preg_replace('#&lt;span class="hikashop_product_variant_subname"&gt;.*&lt;/span&gt;#isU','',$product-&gt;product_name)); } if($config-&gt;get('sef_remove_id',0)){ $int_at_the_beginning = (int)$product-&gt;product_alias; if($int_at_the_beginning){ $product-&gt;product_alias = $config-&gt;get('alias_prefix','p').$product-&gt;product_alias; } } $config = JFactory::getConfig(); if(!$config-&gt;get('unicodeslugs')){ $lang = JFactory::getLanguage(); $product-&gt;product_alias = $lang-&gt;transliterate($product-&gt;product_alias); } $app = JFactory::getApplication(); if(method_exists($app,'stringURLSafe')){ $product-&gt;product_alias = $app-&gt;stringURLSafe($product-&gt;product_alias); }else{ $product-&gt;product_alias = JFilterOutput::stringURLSafe($product-&gt;product_alias); }

Automatic creates an alias if:

- field alias - blank
- Alias automatic filling - yes
- CSV file haven't a product\_alias column

This code works. But I do not know Is this right...

Last edit: 11 years 8 months ago by [ifenix](/forum/user/34556-ifenix "View ifenix's Profile").

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

Less More

- Posts: 86564
- Thank you received: 14311
-
-

11 years 8 months ago [\#193645](#193645) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Alias automatic filling is not working](/forum/26-product-category-display/875450-alias-automatic-filling-is-not-working#193645 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.0  Hi. Help me please. What I do wrong? After import of products field alias - blank. If Alias automatic filling - yes field must be filled from the product title?  I Remove products and categories id in URLs and Force canonical URLs on listings - Use canonical URL and generate it if missing  Products are available in the list of products,. they have canonical URLs. But I get a &quot;product not found&quot; on the product card. If I to save product in the backend - alias is created. and the product is available in product card. This is for a single product, but they are many...")*

Hi,

That's indeed a possibility yes. The code looks ok.

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

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

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