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

#   \[SOLVED\] How to Map "Vendor Edition" fields?

##

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

Less More

- Posts: 205
- Thank you received: 12
-
-

6 years 6 months ago -  6 years 6 months ago [\#318061](#318061) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  *[\[SOLVED\] How to Map "Vendor Edition" fields?](/forum/23-market-how-to/899660-solved-how-to-map-vendor-edition-fields#318061 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.0.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.30  Hello  We have bought your both excellent plugins, &quot;HikaShop Essential&quot; and &quot;HikaMarket Multi-vendor&quot;.  On our usecase, we have a website dedicated to a specific business industry and we use community builder for our registered companies accounts. Each registered user is a company. The site currently works as a communication platform between these companies, using almost all CB's plugins (timeline, CBSubs, messging etc).  We want to keep everything as is on this site, but also give the ability to our registered companies to sell their products through their vendor pages. Our problem is that we do not know the way to populate CB table values to the vendor's page.  For example...  When a user clicks on &quot;Vendor Edition&quot; he has to fill again the details for his company. Our users have already provided these info during registration.  Please tell us how to map...  Vendor name &#42; Contact email &#42; -&gt; (this one is already populated somehow) Vendor image Company Address&#42; City&#42;  to our desired community builder field values?")* was created by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")*

-- HikaShop version -- : 4.3.0
-- HikaMarket version -- : 3.0.3
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.2.30

Hello

We have bought your both excellent plugins, "HikaShop Essential" and "HikaMarket Multi-vendor".

On our usecase, we have a website dedicated to a specific business industry and we use community builder for our registered companies accounts. Each registered user is a company. The site currently works as a communication platform between these companies, using almost all CB's plugins (timeline, CBSubs, messging etc).

We want to keep everything as is on this site, but also give the ability to our registered companies to sell their products through their vendor pages. Our problem is that we do not know the way to populate CB table values to the vendor's page.

For example...

When a user clicks on "Vendor Edition" he has to fill again the details for his company. Our users have already provided these info during registration.

Please tell us how to map...

Vendor name *
Contact email * -&gt; (this one is already populated somehow)
Vendor image
Company
Address*
City*

to our desired community builder field values?

Last edit: 6 years 6 months ago by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile"). Reason: Marked post as solved

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

6 years 6 months ago [\#318063](#318063) 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 Map "Vendor Edition" fields?](/forum/23-market-how-to/899660-solved-how-to-map-vendor-edition-fields#318063 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.0.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.30  Hello  We have bought your both excellent plugins, &quot;HikaShop Essential&quot; and &quot;HikaMarket Multi-vendor&quot;.  On our usecase, we have a website dedicated to a specific business industry and we use community builder for our registered companies accounts. Each registered user is a company. The site currently works as a communication platform between these companies, using almost all CB's plugins (timeline, CBSubs, messging etc).  We want to keep everything as is on this site, but also give the ability to our registered companies to sell their products through their vendor pages. Our problem is that we do not know the way to populate CB table values to the vendor's page.  For example...  When a user clicks on &quot;Vendor Edition&quot; he has to fill again the details for his company. Our users have already provided these info during registration.  Please tell us how to map...  Vendor name &#42; Contact email &#42; -&gt; (this one is already populated somehow) Vendor image Company Address&#42; City&#42;  to our desired community builder field values?")*

Hello,

These values are stored in the HikaMarket vendor table ; when the vendor is created (depending your HikaMarket configure regarding the regsitration), HikaMarket use the user email for the contact email of the vendor, but the vendor name (or address) are not loaded to because we can't know them and we don't want to make public some private information.
The contact email is not shown and only use to redirect the notification emails, that's why we can use it from the user account.

Regards,

---

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

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

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

Less More

- Posts: 205
- Thank you received: 12
-
-

6 years 6 months ago -  6 years 6 months ago [\#318073](#318073) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  Replied by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")* on topic *[How to Map "Vendor Edition" fields?](/forum/23-market-how-to/899660-solved-how-to-map-vendor-edition-fields#318073 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.0.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.30  Hello  We have bought your both excellent plugins, &quot;HikaShop Essential&quot; and &quot;HikaMarket Multi-vendor&quot;.  On our usecase, we have a website dedicated to a specific business industry and we use community builder for our registered companies accounts. Each registered user is a company. The site currently works as a communication platform between these companies, using almost all CB's plugins (timeline, CBSubs, messging etc).  We want to keep everything as is on this site, but also give the ability to our registered companies to sell their products through their vendor pages. Our problem is that we do not know the way to populate CB table values to the vendor's page.  For example...  When a user clicks on &quot;Vendor Edition&quot; he has to fill again the details for his company. Our users have already provided these info during registration.  Please tell us how to map...  Vendor name &#42; Contact email &#42; -&gt; (this one is already populated somehow) Vendor image Company Address&#42; City&#42;  to our desired community builder field values?")*

Thank you for your reply.

I understand your point about privacy, but the question is a bit different. Probably i did not explain well!

The HikaMarket on our site is to be used by **already registered members**. If someone is registered with our site, then he can become a vendor.

So someone is registered with our site, he has already provided his details through Community builder (Company Name, company logo, Address, telephone, etc...) and these info **are not private information**! They show on his community builder profile.

What we ask is...

How to auto fill the following fields with the corresponding values from community builder...

**Page: Vendor Registration** (Attachment vendor_registration)

- Vendor name -&gt; Auto fill the field with the value "Company Name" from his community builder account table

**Page: Edit your vendor details**

- Vendor image -&gt; Auto fill the field with the value from his community builder profile (avatar) table
- Company -&gt; Auto fill the field with the value "Company Name" from his community builder account table
- Address -&gt; Auto fill the field with the value from "Address" column of the community builder account table
- City -&gt; Auto fill the field with the value from "City" column of the community builder account table
- State -&gt; Auto fill the field with the value from "State" column of the community builder account table
- Country -&gt; Auto fill the field with the value from "Country" column of the community builder account table
- Description -&gt; Auto fill the field with the value from "Description" column of the community builder account table

- [ ![vendor&#95;registration.png](/forum/attachment/49181) ](/forum/attachment/49181 "...gistration.png") [ ](/forum/attachment/49181?download=1 "...gistration.png")

Last edit: 6 years 6 months ago by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile").

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

6 years 6 months ago [\#318098](#318098) 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 Map "Vendor Edition" fields?](/forum/23-market-how-to/899660-solved-how-to-map-vendor-edition-fields#318098 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.0.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.30  Hello  We have bought your both excellent plugins, &quot;HikaShop Essential&quot; and &quot;HikaMarket Multi-vendor&quot;.  On our usecase, we have a website dedicated to a specific business industry and we use community builder for our registered companies accounts. Each registered user is a company. The site currently works as a communication platform between these companies, using almost all CB's plugins (timeline, CBSubs, messging etc).  We want to keep everything as is on this site, but also give the ability to our registered companies to sell their products through their vendor pages. Our problem is that we do not know the way to populate CB table values to the vendor's page.  For example...  When a user clicks on &quot;Vendor Edition&quot; he has to fill again the details for his company. Our users have already provided these info during registration.  Please tell us how to map...  Vendor name &#42; Contact email &#42; -&gt; (this one is already populated somehow) Vendor image Company Address&#42; City&#42;  to our desired community builder field values?")*

Hello,

You can use the trigger "onBeforeVendorCreate" in order to populate the vendor object thanks to the current user data.
[ www.hikashop.com/support/documentation/1...onBeforeVendorCreate](https://www.hikashop.com/support/documentation/163-hikamarket-developer.html#onBeforeVendorCreate)

And via the HikaMarket settings, you can remove most of the fields from the vendor registration page, which will let your plugin populate them at the vendor creation.

Regards,

---

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

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

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

Less More

- Posts: 205
- Thank you received: 12
-
-

6 years 6 months ago [\#318112](#318112) by [liaskas](/forum/user/59465-liaskas "View liaskas's Profile")  Replied by *[liaskas](/forum/user/59465-liaskas "View liaskas's Profile")* on topic *[How to Map "Vendor Edition" fields?](/forum/23-market-how-to/899660-solved-how-to-map-vendor-edition-fields#318112 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.0.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.30  Hello  We have bought your both excellent plugins, &quot;HikaShop Essential&quot; and &quot;HikaMarket Multi-vendor&quot;.  On our usecase, we have a website dedicated to a specific business industry and we use community builder for our registered companies accounts. Each registered user is a company. The site currently works as a communication platform between these companies, using almost all CB's plugins (timeline, CBSubs, messging etc).  We want to keep everything as is on this site, but also give the ability to our registered companies to sell their products through their vendor pages. Our problem is that we do not know the way to populate CB table values to the vendor's page.  For example...  When a user clicks on &quot;Vendor Edition&quot; he has to fill again the details for his company. Our users have already provided these info during registration.  Please tell us how to map...  Vendor name &#42; Contact email &#42; -&gt; (this one is already populated somehow) Vendor image Company Address&#42; City&#42;  to our desired community builder field values?")*

Thank you for your reply...

I really appreciate your willing to help. As we are completely new to HikaShop and HikaMarket, can you please guide us where the following php code has to be used?

public function onBeforeVendorCreate(&amp;$vendor, &amp;$do) {
}

Is there a tutorial page or an example page somewhere that will help us understand how it is used and on what files?

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

6 years 6 months ago [\#318139](#318139) 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 Map "Vendor Edition" fields?](/forum/23-market-how-to/899660-solved-how-to-map-vendor-edition-fields#318139 "-- HikaShop version -- : 4.3.0 -- HikaMarket version -- : 3.0.3 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.2.30  Hello  We have bought your both excellent plugins, &quot;HikaShop Essential&quot; and &quot;HikaMarket Multi-vendor&quot;.  On our usecase, we have a website dedicated to a specific business industry and we use community builder for our registered companies accounts. Each registered user is a company. The site currently works as a communication platform between these companies, using almost all CB's plugins (timeline, CBSubs, messging etc).  We want to keep everything as is on this site, but also give the ability to our registered companies to sell their products through their vendor pages. Our problem is that we do not know the way to populate CB table values to the vendor's page.  For example...  When a user clicks on &quot;Vendor Edition&quot; he has to fill again the details for his company. Our users have already provided these info during registration.  Please tell us how to map...  Vendor name &#42; Contact email &#42; -&gt; (this one is already populated somehow) Vendor image Company Address&#42; City&#42;  to our desired community builder field values?")*

Hello,

Since you wanted to populate the data from your Community Builder structure, one solution is to create a custom plugin and use the trigger that I gave you.
The trigger gives a direct access to the vendor object before the creation of the entry in the database.

If you do not have development skills to create a Joomla plugin ; you can also see to use a view override for the "vendormarket / registration".
There thanks to Code:

if( !isset($this-&gt;element-&gt;vendor_id) ) { }

You can add some PHP code to populate the "$this-&gt;element" with data coming from your CB.
The vendor_image will be the difficult field since it contains the relative path to the image from the HikaShop upload folder.

Regards,

---

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

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

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

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