peterlyberth Posted July 26, 2013 Share Posted July 26, 2013 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) { fwrite($fd,"$product[product_quantity]\n"); } fclose($fd); } 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! Link to comment Share on other sites More sharing options...
peterlyberth Posted July 26, 2013 Author Share Posted July 26, 2013 I fixed it. Let me know if anyone needs something similar. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now