Skip to content

Instantly share code, notes, and snippets.

@tobidsn
Created October 15, 2016 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobidsn/bde8a52be6e63911c9da93cd884d5d03 to your computer and use it in GitHub Desktop.
Save tobidsn/bde8a52be6e63911c9da93cd884d5d03 to your computer and use it in GitHub Desktop.
<?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