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

#   How to see Vendor statistics from front-end?

##

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

Less More

- Posts: 19
- Thank you received: 0
-
-
-

9 years 10 months ago [\#257809](#257809) by [mhdlabs](/forum/user/46345-mhdlabs "View mhdlabs's Profile")  *[How to see Vendor statistics from front-end?](/forum/23-market-how-to/887963-how-to-see-vendor-statistics-from-front-end#257809 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.4  Hello,  I have Main Vendor, with multiple users (let's call them Sub-Main Vendors). 1- The shopper buy a product. 2- The order automatically assigned to the Main Vendor. 3- The Main Vendor (from-end) assigns the shopper's order product (sub-order) to a specific Sub-Main Vendor.  What I need is a way that allows the Main Vendor see the Sub-Main Vendors sub-orders.  So for example the view will see: Order Number | Order Status | Order Date | Order Vendor  Also I need something like a quick statistics, same as shown on the Front-End Order Listing view. That can show for each Sub-Main Vendor how many order are Delivered, how many are Cancelled, how many are Shipped... etc.  Hope this helps understand my need and guiding me, Kindest regards.")* was created by *[mhdlabs](/forum/user/46345-mhdlabs "View mhdlabs's Profile")*

-- HikaShop version -- : 2.6.4
-- HikaMarket version -- : 1.7.2
-- Joomla version -- : 3.6.4

Hello,

I have Main Vendor, with multiple users (let's call them Sub-Main Vendors).
1- The shopper buy a product.
2- The order automatically assigned to the Main Vendor.
3- The Main Vendor (from-end) assigns the shopper's order product (sub-order) to a specific Sub-Main Vendor.

What I need is a way that allows the Main Vendor see the Sub-Main Vendors sub-orders.

So for example the view will see:
**Order Number \| Order Status \| Order Date \| Order Vendor**

Also I need something like a quick statistics, same as shown on the Front-End Order Listing view.
That can show for each Sub-Main Vendor how many order are Delivered, how many are Cancelled, how many are Shipped... etc.

Hope this helps understand my need and guiding me,
Kindest regards.

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

9 years 10 months ago [\#257825](#257825) 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 see Vendor statistics from front-end?](/forum/23-market-how-to/887963-how-to-see-vendor-statistics-from-front-end#257825 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.4  Hello,  I have Main Vendor, with multiple users (let's call them Sub-Main Vendors). 1- The shopper buy a product. 2- The order automatically assigned to the Main Vendor. 3- The Main Vendor (from-end) assigns the shopper's order product (sub-order) to a specific Sub-Main Vendor.  What I need is a way that allows the Main Vendor see the Sub-Main Vendors sub-orders.  So for example the view will see: Order Number | Order Status | Order Date | Order Vendor  Also I need something like a quick statistics, same as shown on the Front-End Order Listing view. That can show for each Sub-Main Vendor how many order are Delivered, how many are Cancelled, how many are Shipped... etc.  Hope this helps understand my need and guiding me, Kindest regards.")*

Hi,

There is :
- The main vendor (and his users).
- The vendors (and their users).

An "order" is visible by the "main vendor".
A "sub order" is visible by the "vendors" ; they are created dynamically when the "order" is created and it contains some product assigned to some vendors.

When you display an "order", you can see the list of his "sub orders" ; and you can also click on these "sub orders" to see the details.

I don't know how you want to do these "sub-main vendor orders" ; how you're performing the association ; so I don't know how you can perform such kind of filter.

Regards,

---

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

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-
-

9 years 10 months ago [\#257835](#257835) by [mhdlabs](/forum/user/46345-mhdlabs "View mhdlabs's Profile")  Replied by *[mhdlabs](/forum/user/46345-mhdlabs "View mhdlabs's Profile")* on topic *[How to see Vendor statistics from front-end?](/forum/23-market-how-to/887963-how-to-see-vendor-statistics-from-front-end#257835 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.4  Hello,  I have Main Vendor, with multiple users (let's call them Sub-Main Vendors). 1- The shopper buy a product. 2- The order automatically assigned to the Main Vendor. 3- The Main Vendor (from-end) assigns the shopper's order product (sub-order) to a specific Sub-Main Vendor.  What I need is a way that allows the Main Vendor see the Sub-Main Vendors sub-orders.  So for example the view will see: Order Number | Order Status | Order Date | Order Vendor  Also I need something like a quick statistics, same as shown on the Front-End Order Listing view. That can show for each Sub-Main Vendor how many order are Delivered, how many are Cancelled, how many are Shipped... etc.  Hope this helps understand my need and guiding me, Kindest regards.")*

Hi Jerome,
Alright, let me explain it in another way.

I have 1 Main Vendor and 5 Vendors
I have Vendor selector on ordering process that makes any order assigned automatically to the Main Vendor

After order creation (and assignment to Main Vendor), the Main Vendor uses his front end cp and edit the order products and assign the products to one of the Vendors to handle it.

Since I previously knew from you that orders cannot be assigned to Vendor, but only Sub-Orders can; I now have many Sub-Orders with different statuses (created/shipped/delivered/cancelled) each assigned to a Vendor.

My question is about seeing statistics of these Vendors, for example:-
**1- How many Sub-Order Vendor 1 has?
2- How many are shipped?
3- How many are cancelled?**

Hope this explains my need and be able to help me,
Kind regards.

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

9 years 10 months ago [\#257862](#257862) 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 see Vendor statistics from front-end?](/forum/23-market-how-to/887963-how-to-see-vendor-statistics-from-front-end#257862 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.4  Hello,  I have Main Vendor, with multiple users (let's call them Sub-Main Vendors). 1- The shopper buy a product. 2- The order automatically assigned to the Main Vendor. 3- The Main Vendor (from-end) assigns the shopper's order product (sub-order) to a specific Sub-Main Vendor.  What I need is a way that allows the Main Vendor see the Sub-Main Vendors sub-orders.  So for example the view will see: Order Number | Order Status | Order Date | Order Vendor  Also I need something like a quick statistics, same as shown on the Front-End Order Listing view. That can show for each Sub-Main Vendor how many order are Delivered, how many are Cancelled, how many are Shipped... etc.  Hope this helps understand my need and guiding me, Kindest regards.")*

Hi,

That organization is a possibility I explained sometime to give an "order edition access" to the vendor before that the real feature is implemented.
But that possibility is not a full safe solution and it's not a long term solution too.

At the moment that an account is assign to the "main vendor", he will be able to access and edit any order (sub-orders are not editable).
The vendor access see their own statistics in their dashboard ; the main vendor will see the store statistics but he does not have an interface to manage vendors in the front-end ; that's why the vendor statistics are available in the backend for the administrators.

Thanks to some view override, you can add your own PHP code and display some statistics ; but you will need to know to which "vendor" the account is assigned.
Afterwards, some code from the statistics could be re-use so you will be able to perform the queries you want and display the results as "graphics".

I know that the "order edition for vendors" is taking a lot of time and I'm really sorry for that delay ; but with the work on HikaShop 3 ; I wasn't able to progress as I wanted to every projects in parallel.

Regards,

---

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

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-
-

9 years 10 months ago [\#257869](#257869) by [mhdlabs](/forum/user/46345-mhdlabs "View mhdlabs's Profile")  Replied by *[mhdlabs](/forum/user/46345-mhdlabs "View mhdlabs's Profile")* on topic *[How to see Vendor statistics from front-end?](/forum/23-market-how-to/887963-how-to-see-vendor-statistics-from-front-end#257869 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.4  Hello,  I have Main Vendor, with multiple users (let's call them Sub-Main Vendors). 1- The shopper buy a product. 2- The order automatically assigned to the Main Vendor. 3- The Main Vendor (from-end) assigns the shopper's order product (sub-order) to a specific Sub-Main Vendor.  What I need is a way that allows the Main Vendor see the Sub-Main Vendors sub-orders.  So for example the view will see: Order Number | Order Status | Order Date | Order Vendor  Also I need something like a quick statistics, same as shown on the Front-End Order Listing view. That can show for each Sub-Main Vendor how many order are Delivered, how many are Cancelled, how many are Shipped... etc.  Hope this helps understand my need and guiding me, Kindest regards.")*

Hi Jerome,
I appreciate your help and thank your patience.

Alright, I will tell you in details what I was trying to do and will answer your generous replies for all my topics; however, let me go directly to questions at the mean time just to finish my late project and focus afterwards on developing what is better for all of HikaShop fans.

Speaking about the front-end main vendor order listing view:-
In the database table hikashop\_order there's a column called "order\_vendor" (which I have created using the custom field feature).
**I want a string that for each hkorder.order\_id in the listed table, it fetches the corresponding value from the column order\_vendor , then it goes to the table hikamarket\_vendor and locate the fetched value in the vendor\_id column then finally print the corresponding value from vendor\_name column.**

*Is there a way to do that using, for example, HikaShop MVC?*

Your prompt and positive feedback is gratefully thanked,
Sincerest regards.

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

9 years 10 months ago [\#257876](#257876) 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 see Vendor statistics from front-end?](/forum/23-market-how-to/887963-how-to-see-vendor-statistics-from-front-end#257876 "-- HikaShop version -- : 2.6.4 -- HikaMarket version -- : 1.7.2 -- Joomla version -- : 3.6.4  Hello,  I have Main Vendor, with multiple users (let's call them Sub-Main Vendors). 1- The shopper buy a product. 2- The order automatically assigned to the Main Vendor. 3- The Main Vendor (from-end) assigns the shopper's order product (sub-order) to a specific Sub-Main Vendor.  What I need is a way that allows the Main Vendor see the Sub-Main Vendors sub-orders.  So for example the view will see: Order Number | Order Status | Order Date | Order Vendor  Also I need something like a quick statistics, same as shown on the Front-End Order Listing view. That can show for each Sub-Main Vendor how many order are Delivered, how many are Cancelled, how many are Shipped... etc.  Hope this helps understand my need and guiding me, Kindest regards.")*

Hi,

In the table "hikashop_order", you have some fields :
* order_type : sale / subsale
* order_vendor : 0 (when "sale") / the vendor id (when "subsale")

In the table "hikamarket_vendor", you have some fields :
* vendor_admin_id : the hikashop user id

In the table 'hikashop_user" you have some fields :
* user_vendor_id : the vendor_id to which the user is assigned (vendor users, not admin)
* user_vendor_access : the access that the user have for the vendor.

So a user can be assigned to just one vendor account.
But a user can be administrator of several vendors.

By linking the accounts to the main vendor, they have "1" in the field "user_vendor_id" but you can find their "user_id" in the column "vendor_admin_id" of the table vendor.

Now about the orders ; only the sub sales are linked to a vendor. A sale stay a sale ; it is created by HikaShop and is for the customer (and the backend). Elements related to HikaMarket are in the "subsale" types.
But you can use the "order_parent_id" to link a "subsale" with a "sale".

Regards,

---

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

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

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

[](#top)
