Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
include_once '../../app/Mage.php';
$ido = $_GET['ido'];
Mage::app('admin');
try {
$order = Mage::getModel('sales/order')->loadByIncrementId($ido);
$order = $order->debug();
foreach($order as $val) {
$data_order[] = array(
"customer_id" => $val->customer_id,
"shipping_description" => $val->shipping_description,
"total_qty_ordered" => $val->total_qty_ordered,
"subtotal" => $val->subtotal,
"customer_firstname" => $val->customer_firstname,
"customer_lastname" => $val->customer_lastname,
"shipping_amount" => $val->shipping_amount,
"grand_total" => $val->grand_total,
);
echo $val->customer_id;
}
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.