Export products sold

  • Posts: 317
  • Thank you received: 17
  • Hikashop Business
5 months 1 day ago #361644

-- HikaShop version -- : 5.0.4
-- Joomla version -- : 4

Im trying to export all products by name and id, sold in a year period, with number of sales.
Dont know where to start.

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
5 months 1 day ago #361646

Gi,

Go in the Orders>Reports menu.
There, create a new report like this:
i.imgur.com/BtBb9Od.png
As you can see, you can select the dates, restrict based on the order status, etc.
Note also the "limit" setting that you want to increase so that it can display all your products.
You also have an "export" button at the top of this screen to get a CSV file of the data.

Please Log in or Create an account to join the conversation.

  • Posts: 317
  • Thank you received: 17
  • Hikashop Business
4 months 1 week ago #361996

Close but not there yet.
I need id of product on csv export.

Last edit: 4 months 1 week ago by mojweb.

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
4 months 1 week ago #362008

Hi,

Indeed, the id of the products is not included. But I think it's a good starting point for what you want.
There is no option to add the id though. I think you would have to change the line:

$widget->exportFields=array('order_product_name', 'quantity');
to something like this:
$widget->exportFields=array('order_product_name', 'quantity', 'product_id');
in the file administrator/components/com_hikashop/classes/widget.php
Ideally, you would want to do a class override of that file and override the data function where that line of code is, in order to replace that line in the override function. That way, you would keep your change during updates of HikaShop.
You can read more about class override here:
www.hikashop.com/support/documentation/6...ntation.html#classes

The following user(s) said Thank You: mojweb

Please Log in or Create an account to join the conversation.

  • Posts: 317
  • Thank you received: 17
  • Hikashop Business
4 months 1 week ago #362011

Thank you.
I see that total values in admin listing is ok 3.000,00 €. But when opened with excel I get 300.000.000 €
Any settings to change?

Please Log in or Create an account to join the conversation.

  • Posts: 317
  • Thank you received: 17
  • Hikashop Business
4 months 1 week ago #362014

I managed to solve value with excel text import.

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
4 months 1 week ago #362012

Hi,

It's probably a problem with how you open the file in Excel. When you import the file, you can choose the separators and other options:
support.microsoft.com/en-us/office/text-...40-899f-f78bafe41857
If you just double click on the file to open it, then Excel won't provide the import interface and it will use its default settings, which may vary from one version of Excel to another and from one country to another.
So HikaShop also has CSV settings under the Files section of the HikaShop configuration so that you can adjust the format of the CSV files in order to better suit your version of Excel.

Please Log in or Create an account to join the conversation.

  • Posts: 317
  • Thank you received: 17
  • Hikashop Business
4 months 1 week ago #362073

That one was easy. Now I have this one:
Im trying to export all products by name and id, sold in a year period, with NO sales.

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
4 months 1 week ago #362077

Hi,

There is no option for that.
I would recommend exporting all your products with the "export" button of the products listing.

Then, you can merge both CSV files with some small programing like powershell, Excel / PowerQuery, or Python:
www.reddit.com/r/PowerShell/comments/13i...o_excel_csv_columns/
www.reddit.com/r/excel/comments/bjwenw/c...s_into_1_excel_file/
www.reddit.com/r/learnpython/comments/13...on_common_column_id/

More simply, you can use an online service like :
mightymerge.io/merge-csv-files/

Once you have a merged CSV, sort the rows based on their quantity column, and remove all the rows with a value in that column. That way, you'll be left with all the products without any sale in the CSV.

Please Log in or Create an account to join the conversation.

Time to create page: 0.042 seconds
Powered by Kunena Forum