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

#   Order export layout

##

- **[arveni](/forum/user/33539-arveni "View arveni's Profile")**
- [![arveni's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/33539-arveni "View arveni's Profile") Topic Author
- [ Offline](/forum/user/33539-arveni)

Less More

- Posts: 79
- Thank you received: 0
-
-

10 years 9 months ago [\#228722](#228722) by [arveni](/forum/user/33539-arveni "View arveni's Profile")  *[Order export layout](/forum/37-import-export-csv-xls/882045-order-export-layout#228722 "-- HikaShop version -- : 2.6.1  Hi,  I use mass action to export product order in csv and next manage my stock in a excel file But I would like to know if it's possible to have one row for each ordered product by order. Right now there is one row by order and x columns for the product (order&#95;id,..., item&#95;1&#95;code,...item&#95;2&#95;code,...) and I would like something like - order&#95;id,...item&#95;1&#95;code,... - order&#95;id,,...item&#95;2&#95;code,... - ... You did the job on the mass action tool when you select &quot;show result&quot; and not export to csv (see pic)  Is there anything I can do ? Which file I should check and which modification I have to do?  Thank")* was created by *[arveni](/forum/user/33539-arveni "View arveni's Profile")*

-- HikaShop version -- : 2.6.1

Hi,

I use mass action to export product order in csv and next manage my stock in a excel file
But I would like to know if it's possible to have one row for each ordered product by order. Right now there is one row by order and x columns for the product (order_id,..., item_1_code,...item_2_code,...) and I would like something like
- order_id,...item_1_code,...
- order_id,,...item_2_code,...
- ...
You did the job on the mass action tool when you select "show result" and not export to csv (see pic)

Is there anything I can do ? Which file I should check and which modification I have to do?

Thank

- [ ![2016-02-03&#95;12h34&#95;12.jpg](/forum/attachment/29295) ](/forum/attachment/29295 "...3&#95;12h34&#95;12.jpg") [ ](/forum/attachment/29295?download=1 "...3&#95;12h34&#95;12.jpg")

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

10 years 9 months ago [\#228768](#228768) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Order export layout](/forum/37-import-export-csv-xls/882045-order-export-layout#228768 "-- HikaShop version -- : 2.6.1  Hi,  I use mass action to export product order in csv and next manage my stock in a excel file But I would like to know if it's possible to have one row for each ordered product by order. Right now there is one row by order and x columns for the product (order&#95;id,..., item&#95;1&#95;code,...item&#95;2&#95;code,...) and I would like something like - order&#95;id,...item&#95;1&#95;code,... - order&#95;id,,...item&#95;2&#95;code,... - ... You did the job on the mass action tool when you select &quot;show result&quot; and not export to csv (see pic)  Is there anything I can do ? Which file I should check and which modification I have to do?  Thank")*

Hi,

This will indeed require custom code for now as this has not been implemented. I add this on our todo list.

The best would be to create a new mass action plugin:

And use as main function the function "onProcessOrderMassActionexportCsv", the current function for the default "export csv file" is : Code:

function onProcessOrderMassActionexportCsv(&amp;$elements,&amp;$action,$k){ $formatExport = $action['formatExport']['format']; $email = $action['formatExport']['email']; $path = $action['formatExport']['path']; if(!empty($path)){ $url = $this-&gt;massaction-&gt;setExportPaths($path); }else{ $url = array('server'=&gt;'','web'=&gt;''); ob_get_clean(); } $app = JFactory::getApplication(); if($app-&gt;isAdmin() &#124;&#124; (!$app-&gt;isAdmin() &amp;&amp; !empty($path))){ $params = new stdClass(); $params-&gt;action['order']['order_id'] = 'order_id'; unset($action['formatExport']); $params = $this-&gt;massaction-&gt;_displayResults('order',$elements,$action,$k); $params-&gt;formatExport = $formatExport; $params-&gt;path = $url['server']; $params = $this-&gt;massaction-&gt;sortResult($params-&gt;table,$params); $this-&gt;massaction-&gt;_exportCSV($params); } if(!empty($email) &amp;&amp; !empty($path)){ $config = hikashop_config(); $mailClass = hikashop_get('class.mail'); $content = array('type' =&gt; 'csv_export'); $mail = $mailClass-&gt;get('massaction_notification',$content); $mail-&gt;subject = JText::_('MASS_CSV_EMAIL_SUBJECT'); $mail-&gt;html = '1'; $csv = new stdClass(); $csv-&gt;name = basename($path); $csv-&gt;filename = $url['server']; $csv-&gt;url = $url['web']; $mail-&gt;attachments = array($csv); $mail-&gt;dst_name = ''; $mail-&gt;dst_email = explode(',',$email); $mailClass-&gt;sendMail($mail); } }

As you can see we are calling functions from the mass action class, so you can handle the data instead of the call: Code:

$this-&gt;massaction-&gt;_exportCSV($params);

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

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