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

#   Assign a category to a specifc vendor?

##

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

Less More

- Posts: 324
- Thank you received: 4
-
-

3 years 5 months ago -  3 years 5 months ago [\#352039](#352039) by [DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")  *[Assign a category to a specifc vendor?](/forum/19-hikamarket/906465-assign-a-category-to-a-specifc-vendor#352039 "Hi there,  I am using Calcbuilder on my site to generate a price for a list of items. This can be added to the Hikashop cart and paid for as a custom product.  The problem is, I have many different branches that are set up as vendors, and they have different bank accounts and payment processors, so I need to assign the custom product to a specific vendor, so that it will use their payment processor on checkout.  There is some custom code that does this:  I can designate the product to a specific category, but I need to be able to link that category to a specific vendor. How do I do this?  Thanks.")* was created by *[DogPeople](/forum/user/57755-dogpeople "View DogPeople's Profile")*

Hi there,

I am using Calcbuilder on my site to generate a price for a list of items. This can be added to the Hikashop cart and paid for as a custom product.

The problem is, I have many different branches that are set up as vendors, and they have different bank accounts and payment processors, so I need to assign the custom product to a specific vendor, so that it will use their payment processor on checkout.

There is some custom code that does this: Code:

$hk_quantity=1; $hk_product_name='Black chain link fence, standard'; $hk_product_description='Based on the information provided, you will require these parts for your fence project. Note that this price does not include gates. Please add any gate units separately.'; $hk_product_description.='&lt;br&gt;'.$_layoutsolutionp; $hk_product_code='COD'; $hk_pricehikaproduct=str_replace("$","",$myprice); $hk_pricehikaproduct=str_replace(",","",$hk_pricehikaproduct); //Attach new product to category 37 (custom products) $hk_productfields=array(); $hk_productfields['id_category']=37;

I can designate the product to a specific category, but I need to be able to link that category to a specific vendor. How do I do this?

Thanks.

Last edit: 3 years 5 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

Less More

- Posts: 86363
- Thank you received: 14297
-
-

3 years 5 months ago [\#352046](#352046) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Assign a category to a specifc vendor?](/forum/19-hikamarket/906465-assign-a-category-to-a-specifc-vendor#352046 "Hi there,  I am using Calcbuilder on my site to generate a price for a list of items. This can be added to the Hikashop cart and paid for as a custom product.  The problem is, I have many different branches that are set up as vendors, and they have different bank accounts and payment processors, so I need to assign the custom product to a specific vendor, so that it will use their payment processor on checkout.  There is some custom code that does this:  I can designate the product to a specific category, but I need to be able to link that category to a specific vendor. How do I do this?  Thanks.")*

Hi,

Supposing you're creating a real custom product, you must probably have a $product object you're saving with class.product as explained with the last code example here:
[ www.hikashop.com/support/documentation/6...umentation.html#code](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#code)
so in that case, assigning a vendor to that new product can be done easily by adding such line of code: Code:

$product-&gt;product_vendor_id = xxx;

where xxx is the id of the vendor.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvOTA2NDY1LWFzc2lnbi1hLWNhdGVnb3J5LXRvLWEtc3BlY2lmYy12ZW5kb3I/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?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.046 seconds

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