I want to create a pdf in magento of the product list in the backend/admin. i don't know how to do it and the things i find on the internet are not that helpfull. Hope somebody can help me.
gr
edit
class Wouterkamphuisdotcom_Web_Adminhtml_WebController extends Mage_Adminhtml_Controller_action {
protected function _initAction() {
$this->loadLayout()
->_setActiveMenu('web/items')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
return $this;
}
public function exportPdfAction(){
$fileName = 'customers.pdf';
$content = $this->getLayout()->createBlock('Web/Web_Grid')->getPdfFile();
$this->_prepareDownloadResponse($fileName, $content);
}
this is my controller
Please note:
I will guide you adding PDF Export feature to customers (by default there is CSV and Excel)
Edit app/code/core/Mage/Adminhtml/Block/Widget/Grid.php, add the following function
Edit app/code/core/Mage/Adminhtml/controllers/CustomerController.php, add the following function
Edit app/code/core/Mage/Adminhtml/Block/Customer/Grid.php, locate
Add the PDF Export
Now refresh the admin, you can export customers as PDF.