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

#   Custom Report of Product Sales

##

- **[dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")**
- [![dustinjc's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31466.jpg)](/forum/user/31466-dustinjc "View dustinjc's Profile") Topic Author
- [ Offline](/forum/user/31466-dustinjc)

Less More

- Posts: 176
- Thank you received: 5
-
-

3 years 5 months ago [\#351819](#351819) by [dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")  *[Custom Report of Product Sales](/forum/36-reports-statistics/906415-custom-report-of-product-sales#351819 "What would be the best way to go about creating a report with the following?  A list of all products/variants with the following fields:  Product ID, Product Name, Product Category, Total Sales, Quantity on Hand, Published Status  Where Total Sales is the total number of individual products sold of that product.  I need to be able to export this data as a csv.  Seems like getting this data out of an Ecommerce solution should be easy. For the life of me, I can't seem to get this to work. Am I missing something?")* was created by *[dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")*

What would be the best way to go about creating a report with the following?

A list of all products/variants with the following fields:

Product ID, Product Name, Product Category, Total Sales, Quantity on Hand, Published Status

Where Total Sales is the total number of individual products sold of that product.

I need to be able to export this data as a csv.

Seems like getting this data out of an Ecommerce solution should be easy. For the life of me, I can't seem to get this to work. Am I missing something?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3JlcG9ydHMtc3RhdGlzdGljcy85MDY0MTUtY3VzdG9tLXJlcG9ydC1vZi1wcm9kdWN0LXNhbGVzP3RtcGw9bWFya2Rvd24=) 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: 86321
- Thank you received: 14279
-
-

3 years 5 months ago [\#351823](#351823) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom Report of Product Sales](/forum/36-reports-statistics/906415-custom-report-of-product-sales#351823 "What would be the best way to go about creating a report with the following?  A list of all products/variants with the following fields:  Product ID, Product Name, Product Category, Total Sales, Quantity on Hand, Published Status  Where Total Sales is the total number of individual products sold of that product.  I need to be able to export this data as a csv.  Seems like getting this data out of an Ecommerce solution should be easy. For the life of me, I can't seem to get this to work. Am I missing something?")*

Hi,

With a mass action, in System&gt;Massactions, you can use an action "export CSV file" on the product data with the columns product_id, product_name, category_name, product_sales, product_quantity and product_published and you'll get what you want. Note however that in that case, you can't select the period for the sales data, nor the order statuses to take into account, so the product_sales value might not be what you want.
In fact, you can get this data with the press of a button with the "export" button on the products listing, so it seems pretty easy to me.

Now, if you want something accurate for the sales, you can go in the Orders&gt;Reports menu. There, you should have a "top sales" report already precreated. That report will display the columns: product_name, sales and product_id
The data you'll get can be tweaked to take into account a certain period of time, and you can also select the order statuses to take into account with the settings of the report. Also, you can change the "limit" setting to increase the number of results to output (if you have a lot of entries, it can lead to a long processing time since everything is calculated dynamically).
Finally, if you change the "Displayed Information" setting to "orders", you'll also get the quantity sold, which will be accurate as it will be dynamically calculated based on the time period selected, the order statuses selected, etc.
It's a bit more complex than a mass action, and it doesn't have all the columns you want but it is accurate and more customizable regarding the filtering of the data. Now, if you want extra columns to be generated by the report, it should be possible with a view override and a bit of PHP coding.

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

- **[dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")**
- [![dustinjc's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31466.jpg)](/forum/user/31466-dustinjc "View dustinjc's Profile") Topic Author
- [ Offline](/forum/user/31466-dustinjc)

Less More

- Posts: 176
- Thank you received: 5
-
-

3 years 5 months ago [\#351844](#351844) by [dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")  Replied by *[dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")* on topic *[Custom Report of Product Sales](/forum/36-reports-statistics/906415-custom-report-of-product-sales#351844 "What would be the best way to go about creating a report with the following?  A list of all products/variants with the following fields:  Product ID, Product Name, Product Category, Total Sales, Quantity on Hand, Published Status  Where Total Sales is the total number of individual products sold of that product.  I need to be able to export this data as a csv.  Seems like getting this data out of an Ecommerce solution should be easy. For the life of me, I can't seem to get this to work. Am I missing something?")*

Thank you for this explanation.

On the 'export' button on the product listing. Are there any server settings you suggest? Every time we run this the server times out and generates a 500 server error.

We have about 1000 products in the database. Some with 5-10 variants.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3JlcG9ydHMtc3RhdGlzdGljcy85MDY0MTUtY3VzdG9tLXJlcG9ydC1vZi1wcm9kdWN0LXNhbGVzP3RtcGw9bWFya2Rvd24=) 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: 86321
- Thank you received: 14279
-
-

3 years 5 months ago [\#351849](#351849) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom Report of Product Sales](/forum/36-reports-statistics/906415-custom-report-of-product-sales#351849 "What would be the best way to go about creating a report with the following?  A list of all products/variants with the following fields:  Product ID, Product Name, Product Category, Total Sales, Quantity on Hand, Published Status  Where Total Sales is the total number of individual products sold of that product.  I need to be able to export this data as a csv.  Seems like getting this data out of an Ecommerce solution should be easy. For the life of me, I can't seem to get this to work. Am I missing something?")*

Hi,

Well, if you click on the export without selecting any products, it will export all the products and variants. So it first needs to load everything from the database in the PHP memory and then generate the CSV from the data.
The server settings to recommend will depend on the total number of products / variants and the capacity of your server ( RAM and CPU ), how it is configured, etc.
So it's difficult to recommend anything precise like that. If you get a 500 timeout error, it's likely that the "max_execution_time" of your php.ini is too low. When it's a memory limitation, it's normally another error and in that case it's the "memory_limit" you need to increase in the php.ini

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

- **[dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")**
- [![dustinjc's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31466.jpg)](/forum/user/31466-dustinjc "View dustinjc's Profile") Topic Author
- [ Offline](/forum/user/31466-dustinjc)

Less More

- Posts: 176
- Thank you received: 5
-
-

3 years 5 months ago [\#351888](#351888) by [dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")  Replied by *[dustinjc](/forum/user/31466-dustinjc "View dustinjc's Profile")* on topic *[Custom Report of Product Sales](/forum/36-reports-statistics/906415-custom-report-of-product-sales#351888 "What would be the best way to go about creating a report with the following?  A list of all products/variants with the following fields:  Product ID, Product Name, Product Category, Total Sales, Quantity on Hand, Published Status  Where Total Sales is the total number of individual products sold of that product.  I need to be able to export this data as a csv.  Seems like getting this data out of an Ecommerce solution should be easy. For the life of me, I can't seem to get this to work. Am I missing something?")*

Thank you. The issue was a 180 second timeout on the firewall we have on the website. We are working around it.

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

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

[](#top)
