Understanding the Export Feature

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
11 years 3 months ago #86200

Hello,
I apologize for not "getting it", but could you help explain to me how to export order data based upon certain parameters? For example, I would like to export all the orders for the purchase of a given product. Can one do that with the Business edition through the reports section? It looks like I can create a report for a specific product and set the "Display" to "Listing".

Is that the proper procedure?

Thanks!

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #86327

Hi,

Yes it's the proper procedure, you have to create your custom report, and then click on "export" in the toolbar.

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
11 years 3 months ago #88267

Thanks, Xavier. I just upgraded and exported successfully. How do I customize the columns on that report? I need to see a few more details about the particular customer, such as their ZIP code.

Thanks!

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

  • Posts: 81598
  • Thank you received: 13082
  • MODERATOR
11 years 3 months ago #88454

Hi,

I'm afraid that it will require a modification of the code as there is currently no option for that.
Could you do a screenshot of the options of your report ?

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
11 years 3 months ago #88481

Thanks, Nicolas. I've attached the screenshot - is that what you meant?

Attachments:

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

  • Posts: 81598
  • Thank you received: 13082
  • MODERATOR
11 years 2 months ago #88658

Ok. You can add the code:

if($csv && ($widget->widget_params->content=='orders' || $widget->widget_params->content=='sales')){
					$leftjoin[]=' LEFT JOIN #__hikashop_address AS address1 ON a.order_billing_address_id=address1.address_id';
					$select.=',address1.*';
				}
after the code
if(!empty($widget->widget_params->limit) && !$csv){
						$limit.=' LIMIT '.(int)$widget->widget_params->limit;
					}

					$select.='a.*';
				}
in the file administrator/components/com_hikashop/classes/widget.php
That will add all the billing information in your CSV.

The following user(s) said Thank You: brentwilliams2

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
11 years 2 months ago #89248

Thanks!!

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
9 years 5 months ago #182190

Hi Nicolas,
I just realized something about your fix that is creating a strange situation. I have a address_company field, and that field doesn't always show on the report. The report is exactly the same, with the same type of product, but when I export one product, that column will be included, but when I export another product it is missing. When I look at the database, that field is filled in correctly, so it isn't a case where there simply isn't information provided. Instead, the report just lacks that column.

Any suggestions?

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

  • Posts: 81598
  • Thank you received: 13082
  • MODERATOR
9 years 5 months ago #182193

Hi,

I don't see why that would happen since the modification selects all the columns of the addresses from the database.
However, we know have a mass actions feature in HikaShop which allows to do such things without any code change.
I would recommend to try with a mass action with an action CSV export where you can select the fields you want and the filters you want for the export.

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
9 years 4 months ago #184374

Are there instructions somewhere about this new feature? I have upgraded to the new version and need to check this out to see if it resolves my issue.

Thanks.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 months ago #184618

Hi,

Here is documentation about mass actions:
www.hikashop.com/support/support/documen...massaction-form.html

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
9 years 4 months ago #184678

Thanks! Can you clarify two things for me on that?

1) If I want to export all the orders for one product, what filter setting should I use? I tried "Order Product Columns" > "order_product_id", but that only resulted in one result.

2) For the export CSV feature, do I use a relative link as my export path?

Thanks.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 months ago #184725

Hi,

1. You have to use "Order Product Columns" > "product_id". The order_product_id is a unique id attached to the order.

2. An absolute link is required, something like "var/www/mywebsite/folder" for example.

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

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
9 years 4 months ago #184771

Thanks!! I couldn't get the link to work right, but it doesn't matter - it is easier to simply copy/paste the page results.

I appreciate your time.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum