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

#   export order information

##

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

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 3 months ago -  12 years 3 months ago [\#165948](#165948) by [jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile")  *[export order information](/forum/36-reports-statistics/870084-export-order-information#165948 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")* was created by *[jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile")*

I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only export the information I need, instead of all the information.

[ ![&#91;IMG](http://i58.tinypic.com/307xffk.jpg) ](http://i58.tinypic.com/307xffk.jpg "&#91;IMG")

Im having a hard time trying to modify the code in

C:\xampp\apps\joomla\htdocs\administrator\components\com_hikashop\views\order\tmpl\export.php

I end up getting order number, customer, date, order status, and total to work, but still missing order_product_name and order_product_quantity

[ ![&#91;IMG](http://i58.tinypic.com/14dzhww.png) ](http://i58.tinypic.com/14dzhww.png "&#91;IMG")

This is what I have as of now
Code:

$new_row = array(); foreach ($row as $key =&gt; $value) { if(in_array($key,array('order_number','name','order_created','order_full_price','order_product_name'))) $new_row[$key] = $value; } if($maxProd &amp;&amp; !empty($productFields)){ for($i=1;$i&lt;=$maxProd;$i++) { $prod =&amp; $row-&gt;products[$i-1]; foreach($productFields as $field) { if(in_array($field,array('order_product_quantity','order_product_name'))) $n = 'item_'.$i.'_'.$field; $new_row-&gt;$n = @$prod-&gt;$field; } } } $export-&gt;writeLine($new_row);

please give me some hint so I can finish it.
Thank you

Last edit: 12 years 3 months ago by [jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile").

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 3 months ago [\#165950](#165950) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#165950 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

What about the mass actions ?
Via System &gt; Mass action you will be able to export only the desired fields in the csv file ![:)](/media/kunena/emoticons/3.png ":)")
[ hikashop.com/support/support/documentati...massaction-form.html](https://hikashop.com/support/support/documentation/167-massaction-form.html)

The following user(s) said Thank You: [jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile")

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

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

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 3 months ago -  12 years 3 months ago [\#166323](#166323) by [jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile")  Replied by *[jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#166323 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Thanks, that works too.

but the export button under the order tab is easier to use, just one click.

I end up fixing the code myself heres what I have : Code:

foreach($this-&gt;orders as $row) { //format date if(!empty($row-&gt;user_created)) $row-&gt;user_created = hikashop_getDate($row-&gt;user_created,'%Y-%m-%d %H:%M:%S'); if(!empty($row-&gt;order_created)) $row-&gt;order_created = hikashop_getDate($row-&gt;order_created,'%Y-%m-%d %H:%M:%S'); if(!empty($row-&gt;order_modified)) $row-&gt;order_modified = hikashop_getDate($row-&gt;order_modified,'%Y-%m-%d %H:%M:%S'); //info $new_row = array(); foreach ($row as $key =&gt; $value) { if(in_array($key,array('order_number','name','order_created','order_full_price','order_product_name'))) $new_row[$key] = $value; } //info for item if($maxProd &amp;&amp; !empty($productFields)) { for($i=1;$i&lt;=$maxProd;$i++) { $prod =&amp; $row-&gt;products[$i-1]; foreach($productFields as $field) { if(in_array($field,array('order_product_quantity','order_product_name'))) { $new_row[] = @$prod-&gt;$field; } } } } $export-&gt;writeLine($new_row);

[ ![&#91;IMG](http://i61.tinypic.com/2jfyvz9.png) ](http://i61.tinypic.com/2jfyvz9.png "&#91;IMG")

but, is it possible to format the file so that instead of one columns for each product: item1_order_product_name, item2_order_product_name, item3_order_product_name......

I want item_order_product_name and item_order_product_quantity to list all the item in different row like this so its more excel friendly :  [ ![&#91;IMG](http://i58.tinypic.com/307xffk.jpg) ](http://i58.tinypic.com/307xffk.jpg "&#91;IMG")

Thanks again

Last edit: 12 years 3 months ago by [jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84NzAwODQtZXhwb3J0LW9yZGVyLWluZm9ybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

12 years 3 months ago [\#166349](#166349) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#166349 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

Nothing is impossible. However, it will require to completely change the algorithm of the export view file so that the foreach of the products encompass the whole line of the order. If you only know a bit of PHP, it's gonna be quite hard, but if you're a skilled PHP developer that shouldn't be a problem.

We've developed a CSV export override plugin for QuickBooks which actually generates a CSV with one product per order per line: [ www.hikashop.com/forum/2-general-talk-ab...tegration.html#93276](http://www.hikashop.com/forum/2-general-talk-about-hikashop/78984-quickbooks-integration.html#93276)
So maybe you want to inspire yourself from it, or even use the plugin and customize it to you needs instead of the export view file.

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

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

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 3 months ago [\#166432](#166432) by [jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile")  Replied by *[jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#166432 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi, I tried using the plugin you gave me.

but theres a glitch.

No matter what I changed there will always be a title "product" on row 1 column 1.

[ ![&#91;IMG](http://i60.tinypic.com/291z191.png) ](http://i60.tinypic.com/291z191.png "&#91;IMG")

This is throwing my format off.

Heres the code for the plug in I been using
Code:

&lt;?php /** * @package HikaShop Vendor Zip Filter * @version 1.0.0 * @author Obsidev S.A.R.L. * @copyright (C) 2012-2013 OBSIDEV. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php class plgHikaShopQuickbooksexport extends JPlugin { /** * */ function __construct(&amp;$subject, $config) { parent::__construct($subject, $config); } /** * */ function onBeforeOrderExport(&amp;$rows, &amp;$obj) { // Load options // $activated = false; $pluginsClass = hikashop_get('class.plugins'); $plugin = $pluginsClass-&gt;getByName('hikashop','quickbooksexport'); if(!empty($plugin) ) { if(!empty($plugin-&gt;params['opt_activated'])) { $activated = ($plugin-&gt;params['opt_activated'] == '1'); } } if(!$activated) return; // Do export // $this-&gt;exportOrders($rows, $obj); } /** * */ function onOrderExportList(&amp;$exports) { $exports[] = 'quickbooksexport'; } /** * */ function exportOrders(&amp;$rows, &amp;$obj) { $fields = array( 'order_full_price', 'order_number', 'name', 'item_order_product_quantity', 'item_order_product_name', 'order_created' ); $stripFields = array( 'order_full_price', 'order_number', 'name', 'item_order_product_quantity', 'item_order_product_name', 'order_created' ); $newRows = array(); foreach($rows as $k =&gt; $order) { $data = new stdClass(); $data-&gt;products = array(); if(empty($order)) continue; foreach($order as $k =&gt; $v) { if(in_array($k, $fields)) { $data-&gt;$k = $v; } } if(!empty($order-&gt;products)) { foreach($order-&gt;products as $product) { foreach($product as $k =&gt; $v) { $ik = 'item_'.$k; if(in_array($ik, $fields)) { $data-&gt;$ik = $v; } if(in_array($ik, $stripFields)) { $data-&gt;$ik = strip_tags($data-&gt;$ik); } } $newRows[] = (PHP_VERSION &lt; 5) ? $data : clone($data); } } else { $newRows[] = $data; } unset($order); $rows[$k] = null; } $rows = $newRows; } }

please help me with it.

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84NzAwODQtZXhwb3J0LW9yZGVyLWluZm9ybWF0aW9uP3RtcGw9bWFya2Rvd24=) 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: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#166465](#166465) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#166465 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

Please re-download the plugin ( [ www.hikashop.com/en/component/updateme/c...uickbooksexport.html](http://www.hikashop.com/en/component/updateme/ctrl-download/plugin-quickbooksexport.html) ) which has been updated.

Regards,

---

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

The following user(s) said Thank You: [jonathan.lee](/forum/user/33479-jonathan-lee "View jonathan.lee's Profile")

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

11 years 1 week ago [\#218823](#218823) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#218823 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hikashop 2.5.0
Joomla 3.4.4
Latest exportplugin version

The export function works fine.
But I have one problem.
I have customers that have only ordered one time.
But some order get listed multiple times after one another, and some only one time.
Even tough they have only created one order.

se image:
[ ![tester.jpg](/forum/attachment/27345) ](/forum/attachment/27345 "tester.jpg")

You can see the order number gets repeated.
I have not done any modification to the file.

Any solution ?

- [ ![tester.jpg](/forum/attachment/27345) ](/forum/attachment/27345 "tester.jpg") [ ](/forum/attachment/27345?download=1 "tester.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84NzAwODQtZXhwb3J0LW9yZGVyLWluZm9ybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

11 years 1 week ago [\#218828](#218828) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#218828 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

If you're using the QuickBooks export plugin, that's normal.
The format of QuickBooks is that you get one row per product. So if you have an order with 3 products, you'll get 3 rows in your exported file.

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

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

Less More

- Posts: 165
- Thank you received: 3
-
-

10 years 6 months ago -  10 years 6 months ago [\#237884](#237884) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#237884 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi I am having the same issue as above I am using this plugin and it is adding a "products column" in the first column of the csv which is throwing the formatting off so everything is off one column to the left because of this.

Last edit: 10 years 6 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

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

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

Less More

- Posts: 165
- Thank you received: 3
-
-

10 years 6 months ago -  10 years 6 months ago [\#237892](#237892) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#237892 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

It would be really good for this to be fixed with first column not being "products" because I need this extension to be working by Monday. I have a presentation with a client to show them how to export orders and without this working I cannot do this.

Last edit: 10 years 6 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84NzAwODQtZXhwb3J0LW9yZGVyLWluZm9ybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

10 years 6 months ago [\#237914](#237914) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#237914 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

Thank you for your feedback.
We've added a modification to fix that. Please redownload the plugin through the same link:
[ www.hikashop.com/en/component/updateme/c...uickbooksexport.html](http://www.hikashop.com/en/component/updateme/ctrl-download/plugin-quickbooksexport.html)
and install it on your website. It will add the fix for that.

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

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

Less More

- Posts: 165
- Thank you received: 3
-
-

10 years 6 months ago [\#238137](#238137) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#238137 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi, thank you so much that fixed it. However, I have another issue. It appears that when using this override for the products it does not show custom fields that are attached to the product which is a problem. How do I get it to export the custom fields to this?

Thanks,

Josh

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

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

Less More

- Posts: 165
- Thank you received: 3
-
-

10 years 6 months ago [\#238138](#238138) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#238138 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

I forgot to mention when you use the normal export this is not an issue, however when you use the quickbooks override the custom fields do not show.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84NzAwODQtZXhwb3J0LW9yZGVyLWluZm9ybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

10 years 6 months ago [\#238146](#238146) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#238146 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

What kind of custom fields are you talking about ?
Could you provide a screenshot of how you configured them ?

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

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

Less More

- Posts: 165
- Thank you received: 3
-
-

10 years 6 months ago -  10 years 6 months ago [\#238613](#238613) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#238613 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi, I figured it out now, but I have another question. I attached my plugin files which are working fine.. I added to the plugin pretty substantially based off the clients needs.

I basically have 3 options, a shipping export, order export and export individual columns.

if ( $plugin-&gt;params == '1' &#124;&#124; $plugin-&gt;params == '2'){

However, when I select if $plugin-&gt;params == '0' I would like it to remove duplicate rows with the same order id. The problem is the customer has a sheet that they export that only has shipping information and because of that they only want the following exported which works fine with my code. However, it still shows multiple rows with the same order id. They do not want multiple rows because they are updated the tracking information and status. Is there a way to strip the duplicate rows before the file export with the same order id and inforatmion when the person selects the parameter if $plugin-&gt;params == '0'
$order_id
$order_status
$tracking_number
$shipping_address_firstname
$shipping_address_lastname
$shipping_address_street
$shipping_address_post_code
$shipping_address_city
$shipping_address_telephone
$shipping_address_state
$shipping_address_country

Thanks,

Josh

Last edit: 10 years 6 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile"). Reason: added extra code by accident

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84NzAwODQtZXhwb3J0LW9yZGVyLWluZm9ybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

10 years 6 months ago [\#238616](#238616) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#238616 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

Turn off the plugin and you'll get one row per order.
And if you want to choose which fields to included or not, I would recommend to actually use a mass action with an action "CSV export" on the order data. It will also allow you to export a CSV of the orders with one row per order and to choose which columns to export.

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

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

Less More

- Posts: 165
- Thank you received: 3
-
-

10 years 6 months ago -  10 years 6 months ago [\#238728](#238728) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#238728 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

> nicolas wrote: Hi,
>
> Turn off the plugin and you'll get one row per order.
> And if you want to choose which fields to included or not, I would recommend to actually use a mass action with an action "CSV export" on the order data. It will also allow you to export a CSV of the orders with one row per order and to choose which columns to export.

Hi thank you for the response. However, that solution is not going to work. I am aware that the normal export does 1 row per order. That is essentially what I am asking. With the 3rd option of the parameter set to zero it can turn the plugin code off or ignore this code. Then, how would I modify the existing code in the main export sheet inside orders&gt;&gt;export to only select with columns to use above or how can i add the export code to the quickbooks plugin i attached to do this?

I cannot use mass actions because I do not want the clients to have access to this section. There are too many people processing orders on this site and it leaves to much room for error or messing up the site if I give them access to the mass actions section. Also, you cannot select a date range with the date picker like you can when exporting orders in the order section. In the mass action section there is no date range selectors for exporting csv's for orders which is a requirement for this client.

The solution has to be an all in one solution that does as I wanted above that is why i was asking how to do it all in the plugin alone and that way i do not have to override core files. Also, all the parameters for the export have to be in 1 spot like they are now in the plugin. I have everything working correctly with the files I attached previously other than exporting the shipping fields with 1 row per order which I listed above. I get that the quickbook plugin overrides and causes the 1 product per row, but there has to be a way to add the code into the plugin when I select the shipping options which is option 0 in my parameters to look at the non quickbooks code and then have the ability for it to only export the fields I listed above with 1 row per order.

Again this is a very large client and they were very specific on how they needed it to work and export. Can you give me any guidance on how I would go about this based off of my current code? Thanks for the help.

Last edit: 10 years 6 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84NzAwODQtZXhwb3J0LW9yZGVyLWluZm9ybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

10 years 6 months ago [\#238758](#238758) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#238758 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

It's this code in the plugin which generates the extra rows: Code:

if(!empty($order-&gt;products)) { foreach($order-&gt;products as $product) { foreach($product as $k =&gt; $v) { $ik = 'item_'.$k; if(in_array($ik, $fields)) { $data-&gt;$ik = $v; } if(in_array($ik, $stripFields)) { $data-&gt;$ik = strip_tags($data-&gt;$ik); } } // Special support // $data-&gt;item_tax_code = 'S4'; if(empty($data-&gt;item_order_product_tax)) $data-&gt;item_tax_code = 'Z'; $newRows[] = (!HIKASHOP_PHP5) ? $data : clone($data); } } else {

so simply change the first if to check on your new setting and it will do what you want.

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

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

Less More

- Posts: 45
- Thank you received: 0
-
-

10 years 6 months ago [\#239696](#239696) by [Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")  Replied by *[Squashtoppertje](/forum/user/39506-squashtoppertje "View Squashtoppertje's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#239696 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

I believe the Quickbooksexport plugin would just do what I need. Only I do not want to manually start the export. Is there a way to combine this with the mass actions? Or maybe by using cron-function?

Problem with the mass actions is that in the export of the orders, the order-rows are displayed in columns and I need it in rows like the Quickbooksexport.

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy84NzAwODQtZXhwb3J0LW9yZGVyLWluZm9ybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

10 years 6 months ago [\#239707](#239707) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export order information](/forum/36-reports-statistics/870084-export-order-information#239707 "I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only...")*

Hi,

There is no option to do that automatically for now. We have on our todo list the feature of exporting as order-rows like in that plugin but we didn't had time yet to work on it.
So for now, the simplest would be to modify the quickbooks export plugin to implement the onHikashopCronTrigger trigger:
[ www.hikashop.com/support/documentation/6...nHikashopCronTrigger](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onHikashopCronTrigger)
and in it, load the orders you want and call and do the generation of the CSV yourself.
If you need a developer to work on that four you, you can contact our partners:
[ www.hikashop.com/home/our-partners.html](https://www.hikashop.com/home/our-partners.html)

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

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.108 seconds

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