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

#   get category by name function?

##

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 5 months ago [\#242762](#242762) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  *[get category by name function?](/forum/31-development/885028-get-category-by-name-function#242762 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Is there an existing function that whenever a vendor create a product from the front end, the system add the vendor category to the category list in the product?  If I have to write a plugin for that, can you provide a sample code? because I can't file function like getting category object by category name. Thanks  Best Regards")* was created by *[twscott](/forum/user/43011-twscott "View twscott's Profile")*

-- HikaShop version -- : HikaShop Business 2.6.3
-- Joomla version -- : 3.5
-- PHP version -- : 5.5.12

Hi,
Is there an existing function that whenever a vendor create a product from the front end, the system add the vendor category to the category list in the product?

If I have to write a plugin for that, can you provide a sample code? because I can't file function like getting category object by category name.
Thanks

Best Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4NTAyOC1nZXQtY2F0ZWdvcnktYnktbmFtZS1mdW5jdGlvbj90bXBsPW1hcmtkb3du) 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: 4079
-
- [](http://obsi.dev)
-

10 years 5 months ago [\#242785](#242785) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[get category by name function?](/forum/31-development/885028-get-category-by-name-function#242785 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Is there an existing function that whenever a vendor create a product from the front end, the system add the vendor category to the category list in the product?  If I have to write a plugin for that, can you provide a sample code? because I can't file function like getting category object by category name. Thanks  Best Regards")*

Hi,

We will need more details to understand what you want to do.
But if you remove the edition of product category and activate the settings for the vendor root ; the default product category will be the vendor home category.

Regards,

---

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

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

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 5 months ago [\#242834](#242834) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  Replied by *[twscott](/forum/user/43011-twscott "View twscott's Profile")* on topic *[get category by name function?](/forum/31-development/885028-get-category-by-name-function#242834 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Is there an existing function that whenever a vendor create a product from the front end, the system add the vendor category to the category list in the product?  If I have to write a plugin for that, can you provide a sample code? because I can't file function like getting category object by category name. Thanks  Best Regards")*

Hi Jerome,
The requirement is every product created by vendors will automatically set to two categories, the product category and the vendor's category, so do I need to write a plug in for this?

Beside, I don't see the images column in product table, I need the get all the image files of a product, how do I get it?

Best Regards
Scott

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4NTAyOC1nZXQtY2F0ZWdvcnktYnktbmFtZS1mdW5jdGlvbj90bXBsPW1hcmtkb3du) 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: 4079
-
- [](http://obsi.dev)
-

10 years 5 months ago [\#242837](#242837) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[get category by name function?](/forum/31-development/885028-get-category-by-name-function#242837 "-- HikaShop version -- : HikaShop Business 2.6.3 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Is there an existing function that whenever a vendor create a product from the front end, the system add the vendor category to the category list in the product?  If I have to write a plugin for that, can you provide a sample code? because I can't file function like getting category object by category name. Thanks  Best Regards")*

Hi,

There is a plugin called "product force vendor category" which could help you.

Regards,

---

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

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

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