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

#   Backend manager see his self-made orders only

##

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

Less More

- Posts: 7
- Thank you received: 0
-
-

10 years 11 months ago [\#220836](#220836) by [ibrahim3d](/forum/user/37054-ibrahim3d "View ibrahim3d's Profile")  *[Backend manager see his self-made orders only](/forum/31-development/880506-backend-manager-see-his-self-made-orders-only#220836 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- Error-message(debug-mod must be tuned on) -- : Non  Hi,  I want to make staff to see/edit their own orders only, I use hikashop to manage orders which we create for customers via phone, So 1- I need to know which staff created this or that order. DONE 2- I want to make staff see and edit their own orders only. YET 3-I want to to edit any order to make it disappear from one staff to another. DONE - By Fabrik.  I made number one with no problem with this plugin + making No-List fields &quot;id = id of who created order&quot; &quot;staff = name of who created id&quot; through HikaCustomFields.  I tried to make number two but don't know where or how, I thought HikaDislplySomething should do but not sure, Also tried to find the file which select order listing from DB didn't find it, Really complex for me.  I think code should like this, But where should I put it, Help me with this please,  Thank you")* was created by *[ibrahim3d](/forum/user/37054-ibrahim3d "View ibrahim3d's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- Error-message(debug-mod must be tuned on) -- : Non

Hi,

I want to make staff to see/edit their own orders only,
I use hikashop to manage orders which we create for customers via phone, So
1- I need to know which staff created this or that order. DONE
2- I want to make staff see and edit their own orders only. YET
3-I want to to edit any order to make it disappear from one staff to another. DONE - By Fabrik.

I made number one with no problem with this plugin + making No-List fields "id = id of who created order" "staff = name of who created id" through HikaCustomFields. Code:

&lt;?php class plgHikashopstaff extends JPlugin { function plgHikashopName(&amp;$subject, $config){ parent::__construct($subject, $config); } function onAfterOrderCreate(&amp;$order,&amp;$send_email) { $user = JFactory::getUser(); $staff = new stdClass(); $staff-&gt;order_id = $order-&gt;order_id; $staff-&gt;staff = $user-&gt;name; $staff-&gt;id = $user-&gt;id; $result = JFactory::getDbo()-&gt;updateObject('#__hikashop_order', $staff, 'order_id'); } } ?&gt;

I tried to make number two but don't know where or how, I thought HikaDislplySomething should do but not sure,
Also tried to find the file which select order listing from DB didn't find it, Really complex for me.

I think code should like this, But where should I put it, Help me with this please, Code:

If (access group is SuperUser){ Select all }elseif (access group is Spical){ select where id =Joomla-Current-User-ID }

Thank you

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

10 years 11 months ago [\#220839](#220839) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Backend manager see his self-made orders only](/forum/31-development/880506-backend-manager-see-his-self-made-orders-only#220839 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- Error-message(debug-mod must be tuned on) -- : Non  Hi,  I want to make staff to see/edit their own orders only, I use hikashop to manage orders which we create for customers via phone, So 1- I need to know which staff created this or that order. DONE 2- I want to make staff see and edit their own orders only. YET 3-I want to to edit any order to make it disappear from one staff to another. DONE - By Fabrik.  I made number one with no problem with this plugin + making No-List fields &quot;id = id of who created order&quot; &quot;staff = name of who created id&quot; through HikaCustomFields.  I tried to make number two but don't know where or how, I thought HikaDislplySomething should do but not sure, Also tried to find the file which select order listing from DB didn't find it, Really complex for me.  I think code should like this, But where should I put it, Help me with this please,  Thank you")*

Hi,

You can use the trigger "onBeforeOrderListing" for modifying the filters of the order listing in the backend. Code:

function onBeforeOrderListing($paramBase, &amp;$extrafilters, &amp;$pageInfo, &amp;$filters, &amp;$tables, &amp;$searchMap) { }

Regards,

---

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

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

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

Time to create page: 0.126 seconds

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

[](#top)
