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

#   Restrict user (groups) to certain vendors

##

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

Less More

- Posts: 48
- Thank you received: 0
-
-

13 years 9 months ago [\#88995](#88995) by [theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile")  *[Restrict user (groups) to certain vendors](/forum/23-market-how-to/78129-restrict-user-groups-to-certain-vendors#88995 "Hi,  1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.  2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).  Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.  What would be the best way to configure this?  Thanks a lot.")* was created by *[theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile")*

Hi,

1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.

2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).

Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.

What would be the best way to configure this?

Thanks a lot.

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

13 years 9 months ago [\#89122](#89122) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Restrict user (groups) to certain vendors](/forum/23-market-how-to/78129-restrict-user-groups-to-certain-vendors#89122 "Hi,  1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.  2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).  Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.  What would be the best way to configure this?  Thanks a lot.")*

Hi,

It would be complicated to specify a zip code on a user group because a user group is a joomla user group. It's something which we could not extend.
You can create custom fields on vendors, so you can create this new "ZIP-codes" option. And you can create custom fields on users, so you can set the "zip-code" per user (but not per group of users).

Finally, it is possible to create a filter custom plugin which would add some filters rules on product listing and product page.
With the plugin, you can insert new SQL rules in order to check the match between the user zip-code and the vendor zip-codes.

This is the best configure I see for your requirement.

Regards,

---

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

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

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

Less More

- Posts: 48
- Thank you received: 0
-
-

13 years 9 months ago [\#89134](#89134) by [theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile")  Replied by *[theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile")* on topic *[Restrict user (groups) to certain vendors](/forum/23-market-how-to/78129-restrict-user-groups-to-certain-vendors#89134 "Hi,  1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.  2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).  Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.  What would be the best way to configure this?  Thanks a lot.")*

OK I see, which is a pity. Hoped, it could be made easier.

I think a geographic restriction of vendors to certain users or user groups would be an extremly valuable feature also for many other HikaMarket users. Maybe another solution could be find?

For my solution: I think making custom fields for the user and the vendor, I will find out easily, how to do.

What about the filter custom plugin? Is this something to "configure", or do I need to make that in PHP and database SQL changes? Not clear yet for me... ![:(](/media/kunena/emoticons/22.png ":(")

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

13 years 9 months ago -  13 years 9 months ago [\#89139](#89139) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Restrict user (groups) to certain vendors](/forum/23-market-how-to/78129-restrict-user-groups-to-certain-vendors#89139 "Hi,  1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.  2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).  Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.  What would be the best way to configure this?  Thanks a lot.")*

Hi,

You can take a look on the trigger "onBeforeProductListingLoad" and on the "HikaShop market" plugin (plugins/com_hikashop/market/market.php).
This plugin uses a lot of trigger and you would find the trigger which could give you some examples. Code:

/** * * @param array $filters * @param string $order * @param object $view * @param string $select * @param string $select2 * @param string $ON_a * @param string $ON_B * @param string $ON_c */ public function onBeforeProductListingLoad(&amp;$filters, &amp;$order, &amp;$view, &amp;$select, &amp;$select2, &amp;$ON_a, &amp;$ON_b, &amp;$ON_c)

We are updating the developer documentation in order to give more details on this trigger and his possibilities.
The trigger allow you to modify the SQL request which would be done for the product listing. You can add a "filter" in the $filters array which would be use in the "WHERE" clause.
$order is for the ordering
$view if the view object so you can access to his parameters
The $select are for extra queries and the $ON_ are for the table links.

Regards,

---

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

Last edit: 13 years 9 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

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

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

Less More

- Posts: 48
- Thank you received: 0
-
-

13 years 9 months ago -  13 years 9 months ago [\#89169](#89169) by [theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile")  Replied by *[theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile")* on topic *[Restrict user (groups) to certain vendors](/forum/23-market-how-to/78129-restrict-user-groups-to-certain-vendors#89169 "Hi,  1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.  2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).  Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.  What would be the best way to configure this?  Thanks a lot.")*

Thanks Jerome,
at the moment, this exceeds by far my knowledge in PHP, although I am planning to dig more into it. At the moment, I can only "copy, paste &amp; adapt" PHP, but I dont really understand it yet.

I think a possible solution for me is to wait until the [ SEBLOD](http://www.seblod.com/) plugin for HIKASHOP is ready, with which I should be able to build a filtered product list - at least I hope so...

Alex

Last edit: 13 years 9 months ago by [theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile").

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

13 years 9 months ago [\#89270](#89270) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Restrict user (groups) to certain vendors](/forum/23-market-how-to/78129-restrict-user-groups-to-certain-vendors#89270 "Hi,  1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.  2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).  Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.  What would be the best way to configure this?  Thanks a lot.")*

Hi,

If you want, we could see together by email what would be possible to do with a custom plugin.
I don't know what the SEBLOD team have planned for their integration with HikaShop, I guess that we would be able to talk with them during the next Joomla Day.

Regards,

---

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

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

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

Less More

- Posts: 48
- Thank you received: 0
-
-

13 years 9 months ago [\#89312](#89312) by [theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile")  Replied by *[theweasel68](/forum/user/13135-theweasel68 "View theweasel68's Profile")* on topic *[Restrict user (groups) to certain vendors](/forum/23-market-how-to/78129-restrict-user-groups-to-certain-vendors#89312 "Hi,  1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.  2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).  Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.  What would be the best way to configure this?  Thanks a lot.")*

Hi Jerome,
yes that would be fantastic - I think that feature would also give a significant value to other customers of HikaMarket - I would see it as one of the central elements of every shop, where someone wants to combine online transactions with regionally restricted vendors...

Shall I PM my eMail to you?

Alex

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

13 years 9 months ago [\#89425](#89425) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Restrict user (groups) to certain vendors](/forum/23-market-how-to/78129-restrict-user-groups-to-certain-vendors#89425 "Hi,  1) I want to put users to user groups together. To each user group, one ZIP-code is assigned.  2) For each vendor, I would like to assign one or several ZIP-codes (= the delivery area).  Now - each user of the certain user group sees only the products of the vendors, where the ZIP-codes match.  What would be the best way to configure this?  Thanks a lot.")*

Hi,

I send you an email using the email address of your Joomla account in our website.

Regards,

---

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

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

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