Skip to main content
2 of 3
formatted appearance
Rajeev K Tomy
  • 17.3k
  • 6
  • 63
  • 103

The first line in pdfinvoices is:

$orderIds = $this->getRequest()->getPost('order_ids');

Thus it is expecting an array list of order ids to work on.

Make sure your mass action variable is called order_ids. If you then forward to the pdfinvoice action, it will use the same order ids you just worked on.

If, for some reason you need to eliminate any ids from the list, (could not process shipping as an example), build a new array of allowed order ids.

Then just before you _forward, inject the order ids you want to process into the post variable.

 $this->getRequest()->setPost('order_ids',$orderIds);
ProxiBlue
  • 9.9k
  • 3
  • 34
  • 60