|
hey guys,
I think I did it!!
some FEATURES:
unlimited xml samples
export orders from last export
export selected orders (in the admin/sales/order) => easy to filter the orders (by name, date range etc..) to export
etc, etc…
STEP1:
app/design/adminhtml/default/default/template/widget/grid/massaction.phtml
between the first two line insert:
<?php include('export.php'); ?>
so now u’ve got:
<div id="<?php echo $this->getHtmlId() ?>"> <?php include('export.php'); ?> <table cellspacing="0" cellpadding="0" class="massaction">
STEP2:
copy the enclosed ‘samples.php’, ‘includes.php’, ‘export.php’ files to
app/design/adminhtml/default/default/template/widget/grid/
STEP3:
create a folder called ‘export’ in the root folder (of the server)
STEP4:
app/code/core/Mage/Core/functions.php
find (around: row 245):
throw new Exception($errorMessage);
and comment it out, otherwise u will get an error (I do not know why)
go to admin of your store, sales/orders and there is the magic…
(make a htaccess protection on the export folder...)
About customizing the xml files:
xml sample formats can be found in the samples.php
you can customize as u wish…
in my original file you can find 4 different samples (Default,Advanced,Simple,Custom)… add/remove/rename them as wanted
the text before the ‘:’ means the tagname that will shown in the xml.. you can modified as u wish
after the ‘:’ the text refer to the value (the value is located in the includes.php… function getValue...)
in my example there are only a few value from the orders, if you need more (e.g paymentmethod) then just addid yourself:
step 1:
in the getValue function add a new case like this:
case "getpaymentmethodexample": return $orderMag->getPayment()->getMethod();
step 2:
now in the samples.php now you can reach the value:
. . . shippingamount: getshippingamount, writehereyourtagname: getpaymentmethodexample, grandtotal: getgrandtotal . . .
ENJOY!
Szotyi
Image Attachments
Click thumbnail to see full-size image
File Attachments
|