Hi I am somewhat a noob when it comes to php and have stumbled on something I cannot see how to do.

I have a script which plugs into joomla and extracts orders from redshop using direct mysql access. This means that the source code is all mine on my app and has no joomla specific code other than a login script.

My script extracts all orders with a certain status and I can then generate invoices from each record that is returned using a template file individually.

Now the plan is to enable a print all button that will go through each record and generate a invoice using the template file so that the admin user can do batch prints of new orders.

I have tried looping the data through the template file and it works but the problem Is that when the loop finishes displaying one complete recordset I need it to begin the next recordset on a new a4 page as it needs to fit company paper. Some record sets will return invoice items that will take up more than 1 printed a4 page and this is my problem.

Can anyone point me in the direction of the best way to achieve my goal?

Thank you

Mark

Thanks it worked

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.