Skip to content

Instantly share code, notes, and snippets.

View chrismarkpd's full-sized avatar

Chris Mark chrismarkpd

View GitHub Profile
@metaxy
metaxy / export.php
Created February 22, 2018 09:29
Export all Magento Invoices as PDF
<?php
// this file should be copied to root
require_once('app/Mage.php');
Mage::app();
$maxOrderId = 24346;
for($orderId = 1; $orderId < $maxOrderId; $orderId++) {
$orderObject = Mage::getModel('sales/order')->load($orderId);
echo "$orderId of $maxOrderId\n";
$invoiceCollection = $orderObject->getInvoiceCollection();