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

#   How to find duplicate Alias

##

- **[hielkio](/forum/user/42119-hielkio "View hielkio's Profile")**
- [![hielkio's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar42119.png)](/forum/user/42119-hielkio "View hielkio's Profile") Topic Author
- [ Offline](/forum/user/42119-hielkio)

Less More

- Posts: 44
- Thank you received: 2
-
-

7 years 11 months ago [\#300915](#300915) by [hielkio](/forum/user/42119-hielkio "View hielkio's Profile")  *[How to find duplicate Alias](/forum/26-product-category-display/896319-how-to-find-duplicate-alias#300915 "-- url of the page with the problem -- :   www.koffiematters.nl  -- HikaShop version -- : 4.0.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  Hi folks,  We're building up a Google Shopping feed and need Brand to be part of it. Sometimes I got hit with an error saying that an alias with the same name already exist. Of course I could change the alias of the brand, but I prefer to use the base-alias for the brands. I'd like to find the &quot;thing&quot; that uses the same alias somehow somewhere. What's the best way to find the duplicate alias- so I can change that instead of the brand alias?  I find it quite strange that the alias is already in use, because in my opinion everything should be separated (i.e. categories, products, brands etc. should have their own aliases) - there are no brands aliases that interfere with eachother ...  I hope anyone has an idea :) Thank you very much in advance")* was created by *[hielkio](/forum/user/42119-hielkio "View hielkio's Profile")*

-- url of the page with the problem -- : [ www.koffiematters.nl](https://www.koffiematters.nl)
-- HikaShop version -- : 4.0.0
-- Joomla version -- : 3.8.12
-- PHP version -- : 7.1

Hi folks,

We're building up a Google Shopping feed and need Brand to be part of it. Sometimes I got hit with an error saying that an alias with the same name already exist. Of course I could change the alias of the brand, but I prefer to use the base-alias for the brands. I'd like to find the "thing" that uses the same alias somehow somewhere. What's the best way to find the duplicate alias- so I can change that instead of the brand alias?

I find it quite strange that the alias is already in use, because in my opinion everything should be separated (i.e. categories, products, brands etc. should have their own aliases) - there are no brands aliases that interfere with eachother ...

I hope anyone has an idea ![:)](/media/kunena/emoticons/3.png ":)") Thank you very much in advance

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

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

Less More

- Posts: 4820
- Thank you received: 652
-
-

7 years 11 months ago -  7 years 11 months ago [\#300926](#300926) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[How to find duplicate Alias](/forum/26-product-category-display/896319-how-to-find-duplicate-alias#300926 "-- url of the page with the problem -- :   www.koffiematters.nl  -- HikaShop version -- : 4.0.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  Hi folks,  We're building up a Google Shopping feed and need Brand to be part of it. Sometimes I got hit with an error saying that an alias with the same name already exist. Of course I could change the alias of the brand, but I prefer to use the base-alias for the brands. I'd like to find the &quot;thing&quot; that uses the same alias somehow somewhere. What's the best way to find the duplicate alias- so I can change that instead of the brand alias?  I find it quite strange that the alias is already in use, because in my opinion everything should be separated (i.e. categories, products, brands etc. should have their own aliases) - there are no brands aliases that interfere with eachother ...  I hope anyone has an idea :) Thank you very much in advance")*

Hello,

For me, the most simple way is to have a look in your DataBase in order to see all your brand alias and better get what's going on.
Now, **I don't advice you to modify your Sql DataBase** because this can leads to many issue, for now just have a look, and if something seems strange for you, inform us to advice a little more to eventually help you.

In order to quickly have the short list of your brand, you can use this Sql request :
"**SELECT \* FROM &#96;YOUR\_SQL\_REF\_hikashop\_category&#96; WHERE &#96;category\_type&#96; = 'manufacturer**'"

Hope this will help you to move forward.
Regards

Last edit: 7 years 11 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

- **[hielkio](/forum/user/42119-hielkio "View hielkio's Profile")**
- [![hielkio's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar42119.png)](/forum/user/42119-hielkio "View hielkio's Profile") Topic Author
- [ Offline](/forum/user/42119-hielkio)

Less More

- Posts: 44
- Thank you received: 2
-
-

7 years 11 months ago [\#300974](#300974) by [hielkio](/forum/user/42119-hielkio "View hielkio's Profile")  Replied by *[hielkio](/forum/user/42119-hielkio "View hielkio's Profile")* on topic *[How to find duplicate Alias](/forum/26-product-category-display/896319-how-to-find-duplicate-alias#300974 "-- url of the page with the problem -- :   www.koffiematters.nl  -- HikaShop version -- : 4.0.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  Hi folks,  We're building up a Google Shopping feed and need Brand to be part of it. Sometimes I got hit with an error saying that an alias with the same name already exist. Of course I could change the alias of the brand, but I prefer to use the base-alias for the brands. I'd like to find the &quot;thing&quot; that uses the same alias somehow somewhere. What's the best way to find the duplicate alias- so I can change that instead of the brand alias?  I find it quite strange that the alias is already in use, because in my opinion everything should be separated (i.e. categories, products, brands etc. should have their own aliases) - there are no brands aliases that interfere with eachother ...  I hope anyone has an idea :) Thank you very much in advance")*

That's not what I'm looking for....
Because the alias doesn't exist in that table. We just started using the Brand field / table ...
That's the strangest thing and that's why I mentioned that I find it very odd that an alias is used multiple times somewhere.
Maybe it would help if you actually read a post in detail before giving an overall solution that doesn't cover the problem Philippe ![:-D](/bigsmile.gif ":-D")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTYzMTktaG93LXRvLWZpbmQtZHVwbGljYXRlLWFsaWFzP3RtcGw9bWFya2Rvd24=) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

7 years 11 months ago [\#300985](#300985) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to find duplicate Alias](/forum/26-product-category-display/896319-how-to-find-duplicate-alias#300985 "-- url of the page with the problem -- :   www.koffiematters.nl  -- HikaShop version -- : 4.0.0 -- Joomla version -- : 3.8.12 -- PHP version -- : 7.1  Hi folks,  We're building up a Google Shopping feed and need Brand to be part of it. Sometimes I got hit with an error saying that an alias with the same name already exist. Of course I could change the alias of the brand, but I prefer to use the base-alias for the brands. I'd like to find the &quot;thing&quot; that uses the same alias somehow somewhere. What's the best way to find the duplicate alias- so I can change that instead of the brand alias?  I find it quite strange that the alias is already in use, because in my opinion everything should be separated (i.e. categories, products, brands etc. should have their own aliases) - there are no brands aliases that interfere with eachother ...  I hope anyone has an idea :) Thank you very much in advance")*

Hello,

Brands and categories are stored in the same table in HikaShop ; they are handled by the same class (same code).
Within the function which check the alias, the algorithm do not use the category type (which allow to see the difference between a product category, a brand category and other category types) to filter its search.
So if you create a brand with the same alias than an existing product category ; you will have that message and the save will be interrupt.

Thus, in the HikaShop category class (administrator/components/com_hikashop/classes/category.php) you can replace the line Code:

$query = 'SELECT category_id FROM '.hikashop_table('category').' WHERE category_alias='.$this-&gt;database-&gt;Quote($element-&gt;category_alias);

By Code:

$query = 'SELECT category_id FROM '.hikashop_table('category').' WHERE category_alias='.$this-&gt;database-&gt;Quote($element-&gt;category_alias); if(!empty($element-&gt;category_type)) $query .= ' AND category_type = '.$this-&gt;database-&gt;Quote($element-&gt;category_type);

In order to take the category type into consideration for the duplicate alias check.
Another improvement could be to display the ID of the category which has the same alias than the one you're currently saving. It's a bit technical but I think that it could be useful in some cases.

Please let us know about the patch, so we can validate it for an integration in the next release.

Regards,

---

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

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

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