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

#   Changing Default Category upon Adding a Product

##

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

Less More

- Posts: 2
- Thank you received: 0
-
-

10 years 8 months ago -  10 years 8 months ago [\#231267](#231267) by [dougwoody](/forum/user/36039-dougwoody "View dougwoody's Profile")  *[Changing Default Category upon Adding a Product](/forum/25-install-update/882609-changing-default-category-upon-adding-a-product#231267 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- Error-message(debug-mod must be tuned on) -- : No error message, just a quick question  Hey Hikashop Mods,  Big fan of Hikashop, thank you for making and maintaining support for it. I just had a quick question. Is there any way to change the default category that is listed upon adding a product?  I did search around for this question in other threads, but I don't think this has been asked yet. If so, I apologize, please give me the link to that thread and close out this one.  Thank you for your time! And I did not mean to put this in &quot;Install &amp; Update&quot;.")* was created by *[dougwoody](/forum/user/36039-dougwoody "View dougwoody's Profile")*

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- Error-message(debug-mod must be tuned on) -- : No error message, just a quick question

Hey Hikashop Mods,

Big fan of Hikashop, thank you for making and maintaining support for it.
I just had a quick question. Is there any way to change the default category that is listed upon adding a product?

I did search around for this question in other threads, but I don't think this has been asked yet. If so, I apologize, please give me the link to that thread and close out this one.

Thank you for your time!
And I did not mean to put this in "Install &amp; Update".

Last edit: 10 years 8 months ago by [dougwoody](/forum/user/36039-dougwoody "View dougwoody's Profile").

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

Less More

- Posts: 86290
- Thank you received: 14268
-
-

10 years 8 months ago [\#231275](#231275) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Changing Default Category upon Adding a Product](/forum/25-install-update/882609-changing-default-category-upon-adding-a-product#231275 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- Error-message(debug-mod must be tuned on) -- : No error message, just a quick question  Hey Hikashop Mods,  Big fan of Hikashop, thank you for making and maintaining support for it. I just had a quick question. Is there any way to change the default category that is listed upon adding a product?  I did search around for this question in other threads, but I don't think this has been asked yet. If so, I apologize, please give me the link to that thread and close out this one.  Thank you for your time! And I did not mean to put this in &quot;Install &amp; Update&quot;.")*

Hi,

There is no option for that.
You can add such code: Code:

$categoryClass = hikashop_get('class.category'); $category = $categoryClass-&gt;get(XXX); $product-&gt;categories = array($category-&gt;category_id =&gt; $category);

where XXX is the id of the category, after the line:
$product-&gt;product_tax_id = $db-&gt;loadResult();
of the file administrator/components/com_hikashop/views/product/view.html.php

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

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

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

Less More

- Posts: 2
- Thank you received: 0
-
-

10 years 7 months ago [\#231607](#231607) by [dougwoody](/forum/user/36039-dougwoody "View dougwoody's Profile")  Replied by *[dougwoody](/forum/user/36039-dougwoody "View dougwoody's Profile")* on topic *[Changing Default Category upon Adding a Product](/forum/25-install-update/882609-changing-default-category-upon-adding-a-product#231607 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- Error-message(debug-mod must be tuned on) -- : No error message, just a quick question  Hey Hikashop Mods,  Big fan of Hikashop, thank you for making and maintaining support for it. I just had a quick question. Is there any way to change the default category that is listed upon adding a product?  I did search around for this question in other threads, but I don't think this has been asked yet. If so, I apologize, please give me the link to that thread and close out this one.  Thank you for your time! And I did not mean to put this in &quot;Install &amp; Update&quot;.")*

Hey Nicholas,

Thank you for your quick response.
I now have the desired category as my default category upon adding products.

Thank you for your time.

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

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

[](#top)
