Jump to content

Export products from order


Recommended Posts

Hit there.

In an older shop, A client used the following code to export the products in an order to a csv file.


$exfile = 'orderexport_'.$order->id.'.csv';

 if ($fd = @fopen('../upload/'.$exfile, 'w'))

   foreach ($products as $k => $product)




The code is then called later when they click a button.



The problem is that smarty 3 wont allow the use of php code in the template.


I thought I could more or less paste the code in AdminOrderControllers and have it generate a csv fil for all orders, but allas. It will not work.



Any suggestions will be received with the utmost thanks!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More