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

#   custom SQL query visualizacion in backend menu

##

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

Less More

- Posts: 2
- Thank you received: 0
-
-

14 years 5 months ago [\#50106](#50106) by [jorishikashop](/forum/user/7431-jorishikashop "View jorishikashop's Profile")  *[custom SQL query visualizacion in backend menu](/forum/4-how-to/50106-custom-sql-query-visualizacion-in-backend-menu#50106 "Hi,  1st of all, it works great, you made me happy so far.  2nd I would like to to add a custom report on SUMS of currently &quot;created&quot; and &quot;confirmed&quot; products to the backend menu for my client. So my client knows what to order in bulk to satisfy his open orders of his customers.  I can do a bit of coding and/or make an SQL query that does that but i would like to have one or two clues on how I am &quot;supposed&quot; to do this without making a mess.  Best of all, and thanks, Joris")* was created by *[jorishikashop](/forum/user/7431-jorishikashop "View jorishikashop's Profile")*

Hi,

1st of all, it works great, you made me happy so far.

2nd I would like to to add a custom report on SUMS of currently "created" and "confirmed" products to the backend menu for my client. So my client knows what to order in bulk to satisfy his open orders of his customers.

I can do a bit of coding and/or make an SQL query that does that but i would like to have one or two clues on how I am "supposed" to do this without making a mess.

Best of all, and thanks, Joris

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUwMTA2LWN1c3RvbS1zcWwtcXVlcnktdmlzdWFsaXphY2lvbi1pbi1iYWNrZW5kLW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

14 years 5 months ago [\#50162](#50162) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: custom SQL query visualizacion in backend menu](/forum/4-how-to/50106-custom-sql-query-visualizacion-in-backend-menu#50162 "Hi,  1st of all, it works great, you made me happy so far.  2nd I would like to to add a custom report on SUMS of currently &quot;created&quot; and &quot;confirmed&quot; products to the backend menu for my client. So my client knows what to order in bulk to satisfy his open orders of his customers.  I can do a bit of coding and/or make an SQL query that does that but i would like to have one or two clues on how I am &quot;supposed&quot; to do this without making a mess.  Best of all, and thanks, Joris")*

You will have to edit the file "listing" of the view "product" of the back end for your back end template via the menu Display-&gt;Views.
There, add a query to load the sum for each product and display it in the listing.

Doing it via the Display-&gt;Views will create an override and you won't loose your changes when you update HikaShop.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUwMTA2LWN1c3RvbS1zcWwtcXVlcnktdmlzdWFsaXphY2lvbi1pbi1iYWNrZW5kLW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 11 months ago [\#256081](#256081) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[custom SQL query visualizacion in backend menu](/forum/4-how-to/50106-custom-sql-query-visualizacion-in-backend-menu#256081 "Hi,  1st of all, it works great, you made me happy so far.  2nd I would like to to add a custom report on SUMS of currently &quot;created&quot; and &quot;confirmed&quot; products to the backend menu for my client. So my client knows what to order in bulk to satisfy his open orders of his customers.  I can do a bit of coding and/or make an SQL query that does that but i would like to have one or two clues on how I am &quot;supposed&quot; to do this without making a mess.  Best of all, and thanks, Joris")*

I will appreciate if you share the solution! I need the same thing. Thanks a lot in advance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUwMTA2LWN1c3RvbS1zcWwtcXVlcnktdmlzdWFsaXphY2lvbi1pbi1iYWNrZW5kLW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

9 years 11 months ago [\#256090](#256090) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom SQL query visualizacion in backend menu](/forum/4-how-to/50106-custom-sql-query-visualizacion-in-backend-menu#256090 "Hi,  1st of all, it works great, you made me happy so far.  2nd I would like to to add a custom report on SUMS of currently &quot;created&quot; and &quot;confirmed&quot; products to the backend menu for my client. So my client knows what to order in bulk to satisfy his open orders of his customers.  I can do a bit of coding and/or make an SQL query that does that but i would like to have one or two clues on how I am &quot;supposed&quot; to do this without making a mess.  Best of all, and thanks, Joris")*

Hi,

If you want a listing of the products with their sales count, you can do that now with either a report (menu Orders-&gt;Reports) or with a mass action (menu System&gt;Mass actions).
With mass actions, you can simply have an action "display the results" with the columns product_name and product_sales selected and click on "process".
With reports, you can go further with filtering for only a period of time, only some categories, etc.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUwMTA2LWN1c3RvbS1zcWwtcXVlcnktdmlzdWFsaXphY2lvbi1pbi1iYWNrZW5kLW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 46
- Thank you received: 3
-
-

9 years 11 months ago [\#256116](#256116) by [montemama](/forum/user/43131-montemama "View montemama's Profile")  Replied by *[montemama](/forum/user/43131-montemama "View montemama's Profile")* on topic *[custom SQL query visualizacion in backend menu](/forum/4-how-to/50106-custom-sql-query-visualizacion-in-backend-menu#256116 "Hi,  1st of all, it works great, you made me happy so far.  2nd I would like to to add a custom report on SUMS of currently &quot;created&quot; and &quot;confirmed&quot; products to the backend menu for my client. So my client knows what to order in bulk to satisfy his open orders of his customers.  I can do a bit of coding and/or make an SQL query that does that but i would like to have one or two clues on how I am &quot;supposed&quot; to do this without making a mess.  Best of all, and thanks, Joris")*

Thank you, Nicolas.
Is there a way to find out who ordered products? So not to display only sales (quantities), but add another column with list of order numbers?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUwMTA2LWN1c3RvbS1zcWwtcXVlcnktdmlzdWFsaXphY2lvbi1pbi1iYWNrZW5kLW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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 11 months ago [\#256139](#256139) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[custom SQL query visualizacion in backend menu](/forum/4-how-to/50106-custom-sql-query-visualizacion-in-backend-menu#256139 "Hi,  1st of all, it works great, you made me happy so far.  2nd I would like to to add a custom report on SUMS of currently &quot;created&quot; and &quot;confirmed&quot; products to the backend menu for my client. So my client knows what to order in bulk to satisfy his open orders of his customers.  I can do a bit of coding and/or make an SQL query that does that but i would like to have one or two clues on how I am &quot;supposed&quot; to do this without making a mess.  Best of all, and thanks, Joris")*

Hi,

Within a mass action it will be difficult to link the "product" with the "orders" though the "order products".
In that case it will be easier to have a custom plugin for your specific SQL query.

And with HikaShop 3, the new dashboard system allow to create reports via plugins.
That system is more flexible than the current Report system in HikaShop 2.x (and we will be able to create a bridge to also provide a nice easy interface to create simple reports) ; it gives you a possibility to write your own SQL to retrieve the data you want (and to perform the table link you need).

Now with your current request, you have to be careful on the fact that the number of column is dynamic.
More orders you will have for a products, more column it will display.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzUwMTA2LWN1c3RvbS1zcWwtcXVlcnktdmlzdWFsaXphY2lvbi1pbi1iYWNrZW5kLW1lbnU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.061 seconds

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