1

I am creating own module for print order-pdf for the admin section of Magento. This is working fine. I'm able to print individual order pdf as well as multiple order pdf but problem is that When I print complete order pdf with "Print All" then order pdf not printing. Any Suggestion. The Function in below:-

    $this->getMassactionBlock()->addItem('pdfdocs_order', array(
         'label'=> Mage::helper('sales')->__('Print All'),
         'url'  => $this->getUrl('*/sales_order/pdfdocs'),
    ));
  • Whats happening when you click the button? Make sure you have module/controller/action for the button URL that you are trying to access. – Elamurugan Dec 15 '14 at 12:17
  • This is not printing only sales pdf – Jay Sharma Dec 16 '14 at 12:56
1

From you question I can gather the following information.

  1. When you print a single order it works,
  2. When you print say 4 orders it also works,
  3. If you just click the button with selecting orders it does not print anything,

If this is correct and you problem is that number 3 does not work then I have bad news for you as this is actually a "feature". If you look at the action that is called Mage_Adminhtml_Sales_OrderController::pdfdocsAction you will see that the first thing that is done is a check for order ids to print and if there are none in the request than nothing is printed.

I think what you will need to do is use the Magento grid select all option before selecting the button to print all and this should work, if it does not take too long.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.