-
Orders Exporter Module
Orders Exporter allows you to download orders from your Zen Cart to a flexible tab delimited text file, which can be edited (printed, saved) in MS Excel, OpenOffice and other applications for bookkeeping and such.
Download Orders - tab-delimited .txt file
all orders full export
all orders full export WITHOUT DELIVERED ORDERS
all ordered products WITHOUT DELIVERED ORDERS (attributes excluded)
ordered products with attributes (only) WITHOUT DELIVERED ORDERS
Save Orders in directory on the server - tab-delimited .txt file
all orders full export
all orders full export WITHOUT DELIVERED ORDERS
all ordered products WITHOUT DELIVERED ORDERS (attributes excluded)
ordered products with attributes (only) WITHOUT DELIVERED ORDERS
-
Re: Orders Exporter Module
When I attempt to unzip the module, I get an error message for most of the folders that they require a password to be extracted for both versions.
I've never had this happen to any addon module in the past.
-
Re: Orders Exporter Module
Quote:
Originally Posted by
RixStix
When I attempt to unzip the module, I get an error message for most of the folders that they require a password to be extracted for both versions.
I've never had this happen to any addon module in the past.
Sorry you are having difficulty, but I suspect you will need to check with a tech person with regard to your computer.
I downloaded this, unzipped it just fine and accessed all files.
Perhaps just a reboot to start is a good idea.
~Melanie
-
Re: Orders Exporter Module
TNX Melanie,
It was something in this computer. I had downloaded and extracted several files earlier today. This download must have had a hiccup and I had a brainfart and didn't think to re-download it.
All was fine once I went to the laptop instead.
Sorry to trouble you but TNX for jumpstarting my thinking process.
-
Re: Orders Exporter Module
www.irishshopper.com ZenCart 1.3.9b
I want to get it to output details for ALL ORDERS including delivered orders but it DOES NOT include any order totals (prices). How can I get it to do this ?
-
Re: Orders Exporter Module
I didn't write this, only upgraded it for 1.5.0. I think you will have to contact the original source author. Sorry
-
Re: Orders Exporter Module
Hi, I run 1.5.0 and just installed the package as instructed (from folder: orders_exporter_installation_for_zen_cart_1.5.0). Logged off and on again, refreshed my browser but Inventory Report doesn't show up in the Report menu. Any insight of what may have gone wrong?
-
Re: Orders Exporter Module
orders_exporter_installation_for_zen_cart_1.5.0 is not inventory report
-
Re: Orders Exporter Module
Thank you for your reply. Sorry, I took "Inventory Report" from the readme file in your installation folder. In fact, I am interested in exporting orders as mentioned in your module description. But I didn't find any new menu item after installation. Am I missing something? How does your module work?
-
Re: Orders Exporter Module
Zen Cart version?
You renamed to your own admin directory name?
You have privileges, superuser?
-
Re: Orders Exporter Module
Zen Cart version: v1.5.0
Superuser with all privileges.
I changed my admin directory name when I installed Zen Cart. I renamed the admin directory name in the Orders Exporter Module package and dropped (merged) the two first directories (oexport and renamed admin) in my Zen Cart directory. As far as I can tell, all your file/folders have been installed in their corresponding locations in my Zen Cart directory. The paths for each have been maintained.
-
Re: Orders Exporter Module
Not sure what then, this one is so straightforward.
~Melanie
-
Re: Orders Exporter Module
Quote:
Originally Posted by
mprough
Not sure what then, this one is so straightforward.
~Melanie
Feel sorry to hear that. I really need to export orders in csv format. Thank you very much for your input.
-
Re: Orders Exporter Module
Mystery solved! I had been confused by what the readme document says: You will find your new report in your administration interface under the reports menu called "Inventory Report".
In fact, the menu item is called "Orders Export" and is found in the Tools menu. Thank you!
-
Re: Orders Exporter Module
Works great except that all data related to money (such as price, total, etc.) is not added to the csv file. Is there a way to get this data as well?
-
Re: Orders Exporter Module
Hi,
Is it possible to have this work with Amazon Fulfillment? I'm looking to have a mod where you select check boxes or something like that and click export and it exports orders in a format that can be uploaded to Amazon (without needing any extra tweaking) as they will be fulfilling my orders.
Basically download and upload to amazon exactly in the format that Amazon will accept.
Thanks in advance!
-
Re: Orders Exporter Module
Quote:
Originally Posted by
boum
Works great except that all data related to money (such as price, total, etc.) is not added to the csv file. Is there a way to get this data as well?
I need this same feature. Is there a way to ADD the quantity into the full report? That's a pretty important piece to be missing.
-
Re: Orders Exporter Module
Can someone email me a sample of the export file? We are working with a vendor that wants to read this file into their ordering system and they are asking for a sample of the output file. My email is ContactingMark at Gmail ... thank you.
-
Re: Orders Exporter Module
Hello,
I need to export orders only to get delivery name and address info for importing into my UPS software. The files downloaded have multiple, lines of duplicate customer info for customers who order more than one item in their order. I'm thinking it is cuased by this portion of the querry:
products_model as v_products_model,
products_name as v_products_name,
products_options as v_products_options,
products_options_values as v_products_options_values
Customers who order only one item, have only one line of data.
I have tried remming these lines out with "--" but when I do that the file comes back entirely empty, with only the column headers.
What can I do to not have duplicate customer data? For each order, I want ONE line, containing name, address, email, etc.
BTW I've discovered I need to pull delivery_XXXXX instead of customer_XXXXX for each of those fields and have fixed the code to pull that info I need for shipping address labels.
Thanks very much,
Greg
-
Re: Orders Exporter Module
I am also looking to download pricing with the orders (total with and without shipping). Has anyone figured this out yet or know of another module that does both?
Thanks in advanced!
-
Re: Orders Exporter Module
I seem to be having brain fart. I have uploaded the files to my uniquely named admin folder. I am not able to see the "Orders Export" option in my Tools dropdown. And I am out of ideas...can someone give me a hint? (P.S. I am a superuser; the only admin for this shopping cart)
-
Re: Orders Exporter Module
Quote:
Originally Posted by
juniper
I seem to be having brain fart. I have uploaded the files to my uniquely named admin folder. I am not able to see the "Orders Export" option in my Tools dropdown. And I am out of ideas...can someone give me a hint? (P.S. I am a superuser; the only admin for this shopping cart)
Clear your browser cache =)
-
Re: Orders Exporter Module
Quote:
Originally Posted by
mprough
Clear your browser cache =)
Thanks. I tried that and in several browsers. I am wondering is there anywhere in the Admin CP that I need to re-direct to my uniquely named admin folder? (It seems to know this anyway since the site is working). Perhaps tied to the webhost going down last night; will see what tomorrow brings.
-
Re: Orders Exporter Module
Quote:
Originally Posted by
FlyingChangeWebs
I need this same feature. Is there a way to ADD the quantity into the full report? That's a pretty important piece to be missing.
I need this as well. Without Quantity, the export file is pretty useless. Is there any way to add this?
-
Re: Orders Exporter Module
If you go into the ordersExport.php file in the admin directory you will see the code below
you can apparently add or delete the database fields to you want displayed in the exported files
and specify the order. You need to replicate it for each form type and you need to add the data field call to each section (line 54):
//all columns:
'v_date_purchased' => $iii++,
'v_orders_status_name' => $iii++,
'v_orders_id' => $iii++,
'v_customers_id' => $iii++,
'v_customers_name' => $iii++,
'v_customers_company' => $iii++,
'v_customers_street_address' => $iii++,
//'v_customers_suburb' => $iii++,
//'v_customers_city' => $iii++,
//'v_customers_postcode' => $iii++,
//'v_customers_state' => $iii++,
'v_customers_country' => $iii++,
'v_customers_telephone' => $iii++,
'v_customers_email_address' => $iii++,
'v_products_model' => $iii++,
'v_products_quantity' => $iii++,
'v_products_name' => $iii++,
//'v_products_options' => $iii++,
//'v_products_options_values' => $iii++,
);
$filelayout_sql = "SELECT
zo.orders_id as v_orders_id,
customers_id as v_customers_id,
customers_name as v_customers_name,
customers_company as v_customers_company,
customers_street_address as v_customers_street_address,
customers_suburb as v_customers_suburb,
customers_city as v_customers_city,
customers_postcode as v_customers_postcode,
customers_country as v_customers_country,
customers_telephone as v_customers_telephone,
customers_email_address as v_customers_email_address,
date_purchased as v_date_purchased,
orders_status_name as v_orders_status_name,
products_model as v_products_model,
products_name as v_products_name,
products_quantity as v_products_quantity,
products_options as v_products_options,
products_options_values as v_products_options_values
FROM ".TABLE_ORDERS_PRODUCTS." zop LEFT JOIN ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." opa
ON(zop.orders_products_id = opa.orders_products_id), ".TABLE_ORDERS." zo, ".TABLE_ORDERS_STATUS." zos
WHERE zo.orders_id = zop.orders_id
AND zo.orders_status = zos.orders_status_id
hope that helps..
Dont forget to backup your work
-
Re: Orders Exporter Module
I suspect if someone was decent at PHP coding (Which I am not) they could add a piece of code to this that would allow presorting of the data or specific data exported.
i.e all the orders on/or after a certain date.. or a certain product name..
-
Re: Orders Exporter Module
I am working on a comprehensive overhaul of this mod, including adding the ability to specify a date range (in days before present), and output all orders of a given status. I will look into the price total aspect as it has been requested repeatedly. I am only planning on supporting v1.5.x in this.
The "noAttribs" option already includes a line for order total cost, so it will probably be easy to add that to the rest of the options. Anyone who is careful and observant should be able to fix this for themselves.
-
Re: Orders Exporter Module
There are some useful code snippets in this old thread which are still relevant:
http://www.zen-cart.com/showthread.p...s-Exporter-0-1
Quote:
add a piece of code to this that would allow presorting of the data or specific data exported.
I have long-range plans for a total rewrite of the mod that will allow choosing the elements to be output and their order, as well as more ways to limit output by specific criteria. For now, I will give it the date range, order status and a few more fields.
-
Re: Orders Exporter Module
I am having difficulty understanding the installation instructions. I am 1.3.9, so I have located the proper orders_Exporter folder to upload, but it doesn't make since to upload into my admin folder. Is that what I am supposed to do? The "orders_Exporter" folder is supposed to go exactly as is in my admin folder? Also, my admin folder was renamed years ago, so I don't understand why the instructions are asking me to rename it. Very confusing the way it is written, even a tech at bluehost could not understand the instructions. Thank you for your help.
-
Re: Orders Exporter Module
There are two levels of /orders_Export/ folders under the /orders_exporter_installation_for_zen_cart_1.3.X/ folder (I don't know why), and then the /admin/ and /oexport/ folders. Rename the mod /admin/ folder to match your renamed admin, then upload the admin and oexport folders to the root of your site.
-
Re: Orders Exporter Module
The /oexport/ folder is just a place for downloaded files to be saved to by the export page.
-
Re: Orders Exporter Module
Do you have a timetable for the revamped mod? The current one and a similar one (Export Shipping Information) do some good things, but not everything I need and the date function would make this one perfect.
Thanks for all your contributions!
-
Re: Orders Exporter Module
I got the changes partly functional, but time ran out for me on the urgent application, and I have been busy with other things since June. When I get time to concentrate, I do want to finish debugging and making the modest upgrade work, and make it available. Getting that base functional should make it easier to do the major overhaul.
-
Re: Orders Exporter Module
My big obstacle with dates, oddly enough, has been making the "between" function of MySQL operate. The manual indicates that it should work exactly as I used it, but it gives no output. If I knew SQL debugging tools I might be able to figure out what it doesn't like. Alternately I could use a more verbose but maybe more reliable ">" and "<" set of filters.
-
Re: Orders Exporter Module
Wish I could help. The other mod, Export Shipping Information, does date ranges.
-
Re: Orders Exporter Module
Update: I have completed the major rewrite of this mod and have it functioning perfectly in my local test site. I next need to transfer it to my live site and ensure that it works there, do some more overhaul of the readme, and then it will be ready for release. I can package it soon for anyone who would like to test it and give feedback before official release. It works on v1.5.0 and v1.5.1, and I know of no reason it should not work on v1.5.3 (I will test this before release).
The new version has all new code except for the actual download/save functionality, and allows you to select a range of days ago, from/to dates, or from/to order ids, and then the original choice of download styles, plus the ability to download all of any one order status within the specified range. You can set in the defines the fields to export and their order in the file. The tab-delimited file will have customizable field titles, and basic info like customer name, date, etc. only appears once for orders with multiple products or attributes. Total cost and order comments can be included in the output, and other fields can be added by following the format of existing ones.
-
Re: Orders Exporter Module
TNX Glenn,
I am testing v1.5.3 in my sandbox and am expecting to go live early next week. We use orders exporter on a daily basis, so I have the time to give it a workout in v1.53.
153bugs(at)chainweavers.com if you need an email address
-
1 Attachment(s)
Re: Orders Exporter Module
Here is a zip of RC1 for testing. Please let me know of any issues, and what environments you have tested on.
I still need to figure out an uninstall SQL for this; the file included is a stub from another mod. Any examples for uninstalling from the Tools menu would be appreciated.
-
1 Attachment(s)
Re: Orders Exporter Module
This shows the options on the admin page:
-
Re: Orders Exporter Module
My schedule for tonight was just redirected to a different priority, so I'll look more tomorrwo.
First run. Minor issue, browser title
Attachment 14288
First couple of reports run included the contents of the "Keep alive session" file above the expected data.
Below that keep-alive code was the expected data for orders in the processing status.
You certainly have expanded the options.
zen v1.5.3 installed one folder inside server root.
Quote:
<!-- BOF: Keepalive for Session --> |
|
|
|
|
|
|
|
<!-- timeout warning alert --> |
|
|
|
|
|
|
|
|
<div id="keepalivetimer" title="Your session is about to expire!" style="display: none"> |
|
|
<p class="ui-state-error-text"> |
|
|
|
|
|
|
|
<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span> |
|
|
You will be logged off in <span id="keepalivetimer-countdown" style="font-weight:bold"></span> minutes. |
</p> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p>Do you want to continue your session?</p> |
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css" type="text/css" rel="stylesheet" /> |
<script type="text/javascript"> |
|
|
|
|
|
|
|
if (typeof jQuery == "undefined") {//no jquery yet |
|
|
|
|
|
|
document.write('<scr'+'ipt type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">'); |
document.write('</scr' + 'ipt>'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
if (!jQuery.ui) { |
|
|
|
|
|
|
|
|
|
document.write('<scr'+'ipt type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js">'); |
document.write('</scr' + 'ipt>'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
<script src="includes/javascript/jquery.idletimer.js?t=1405472253" type="text/javascript"></script> |
|
<script src="includes/javascript/jquery.idletimeout.js?t=1405472253" type="text/javascript"></script> |
|
<style type="text/css"> |
|
|
|
|
|
|
|
|
a.ui-dialog-titlebar-close {display:none;} |
|
|
|
|
|
|
.ui-widget-overlay { background: green; opacity: .40;filter:Alpha(Opacity=40); } |
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
//setup the dialog |
|
|
|
|
|
|
|
|
|
$("#keepalivetimer").dialog({ |
|
|
|
|
|
|
|
|
autoOpen: false, |
|
|
|
|
|
|
|
|
|
modal: true, |
|
|
|
|
|
|
|
|
|
width: 430, |
|
|
|
|
|
|
|
|
|
height: 250, |
|
|
|
|
|
|
|
|
|
closeOnEscape: false, |
|
|
|
|
|
|
|
|
draggable: false, |
|
|
|
|
|
|
|
|
|
resizable: false, |
|
|
|
|
|
|
|
|
|
position: "top", |
|
|
|
|
|
|
|
|
|
buttons: { |
|
|
|
|
|
|
|
|
|
'Yes, Keep Working': function(){ |
|
|
|
|
|
|
|
$(this).dialog('close'); |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
'No, Logoff': function(){ |
|
|
|
|
|
|
|
|
$.idleTimeout.options.onLogoffClick.call(this); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// start the idle timer monitor |
|
|
|
|
|
|
|
|
var $countdown = $("#keepalivetimer-countdown"); |
|
|
|
|
|
$.idleTimeout('#keepalivetimer', 'div.ui-dialog-buttonpane button:first', { |
|
|
|
idleAfter: 600, // 600 user is considered idle after 10 minutes of no movement in this browser window/tab |
warningLength: 250, // 250 countdown timer starts at this many seconds (250sec=4:50min) |
|
|
pollingInterval: 60, //60 check for server connection every minute; if it fails or user is logged out, keepalive scripts will abort |
keepAliveURL: 'keepalive.php', serverResponseEquals: 'OK', |
|
|
|
|
|
titleMessage: 'Warning: %s seconds until log out | ', |
|
|
|
|
|
onTimeout: function(){ |
|
|
|
|
|
|
|
|
document.title = '!!Expired Session'; |
|
|
|
|
|
|
|
$(this).html('<p class="ui-state-error-text"><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span>Sorry, you have been logged out due to inactivity.</p><p>Any unsaved work was lost. If you were composing content which you wish to save, click Close and copy that content to your clipboard. Then refresh the page to login again.</p><p>To continue, please login again.</p>'); |
$(this).dialog("option", "title", 'Your session has expired'); |
|
|
|
|
|
$(this).dialog("option", "minWidth", "450"); |
|
|
|
|
|
|
$(this).dialog("option", "buttons", {'Close': function(){$(this).dialog('close');},'Login': function(){window.location.reload();}}); |
//$(this).dialog("option", "buttons", {'Login': function(){window.location.reload();} }); |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
onAbort: function(){ |
|
|
|
|
|
|
|
|
// TODO: another modal dialog would be more friendly |
|
|
|
|
|
alert('We are unable to connect to the server. Your work may be lost. Please review your work and perhaps copy information to your clipboard if you had any work in progress which you do not wish to lose.'); |
}, |
|
|
|
|
|
|
|
|
|
|
onIdle: function(){ |
|
|
|
|
|
|
|
|
|
$(this).dialog("open"); |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
onLogoffClick: function(){ |
|
|
|
|
|
|
|
|
window.location = "logoff.php"; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
onCountdown: function(counter){ |
|
|
|
|
|
|
|
var sec = counter % 60; |
|
|
|
|
|
|
|
|
var min = Math.floor(counter/60); |
|
|
|
|
|
|
|
if (sec < 0) { |
|
|
|
|
|
|
|
|
|
sec = 59; |
|
|
|
|
|
|
|
|
|
min = min - 1; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
if (sec<=9) { sec = "0" + sec; } |
|
|
|
|
|
|
|
|
var time = (min<=9 ? "0" + min : min) + ":" + sec; |
|
|
|
|
|
|
$countdown.html(time); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
<!-- EOF: Keepalive for Session --> |
|
|
|
|
|
|
|
Status |
OID |
Date purchased |
Name |
E-mail |
Product name |
Qty |
Options |
Values |
Comments |
ENDOFROW |
Processing |
EDITED |
######## |
EDITED |
Bronze |
0.5 |
Wire |
Square |
|
ENDOFROW |
|
|
|
|
|
0.5 |
Mandrel |
3.50 |
|
ENDOFROW |
|
|
|
|
|
-
Re: Orders Exporter Module
Hmm yes, I got the <?php echo bit too, didn't think about it much. I will have to see what is missing from the HTML for this page (first created in 2008 or maybe even 2005) compared to a modern ZC admin page.
I don't have the keepalive timer so have not seen that behavior. I presume something about the way the file is created allows that to become part of the output. Again, the whole file creation section is untouched from the original... but you are using the old version without incident, right? Thanks for digging up these issues before wider release.
-
Re: Orders Exporter Module
Quote:
Originally Posted by
gjh42
I don't have the keepalive timer so have not seen that behavior. I presume something about the way the file is created allows that to become part of the output. Again, the whole file creation section is untouched from the original... but you are using the old version without incident, right? Thanks for digging up these issues before wider release.
Yes, I am using the version compatible with v1.39.h daily.
I'll check it in my v1.5.1 sandbox tomorrow.
-
Re: Orders Exporter Module
I just checked the 1.5.1 sandbox. I had already installed the current orders export code.
It is functional but the keepalive code is at the beginning of the orders data when making the following selection
...ordered products with attributes (only) WITHOUT DELIVERED ORDERS.
-
Re: Orders Exporter Module
The < ?php echo... was from a debug tweak made necessary by the orders_export.php file structure, which I forgot to reverse after debugging was complete. Just find at the start of the HTML page code
PHP Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=< ?php echo CHARSET; ?>">
<title>< ?php echo TITLE; ?></title>
and close up the space between < and ?php.
You say the keepalive code appears when you select the onlyAttribs link; does it appear for other selections? I wouldn't think that would make a difference, as apparently the keepalive code/script is being prepended to whatever file is generated. Does it happen for downloads or saved files, or both? The v1.5.1 example is with the v1.6 Orders Exporter, right?
-
Re: Orders Exporter Module
OE1.6 was used in the ZC1.5.1 test
OE2.0_rc1 was used in the ZC1.5.3 test
Orders downloaded have the keepalive code prepended
Orders saved to the OExport folder on the server do not have the keepalive code prepended.
I made the mistake of clicking "All orders - full export" without changing any default filtering and timed it out, both download and save to server. I'm assuming that there was just too much data involved.
Same results in the top 8 list choices.
Debug tweak removed: TNX
I did not take the time to do any further tests on the OE1.6 installation. Not a problem if it will help.
-
Re: Orders Exporter Module
Thanks for clarifications. So now the question is, whether there is something peculiar about the way OEX performs downloads that allows the keepalive script to sneak in, or something about the keepalive code that injects itself into downloads in general. How many people use the keepalive script who also have something that downloads from admin? I haven't seen any such complaints, but it should be simple enough to test.
-
Re: Orders Exporter Module
Re: timeout, there is a line from the original version of orders_export.php which attempts to set a 5 minute timeout limit. Either that is not being allowed by your server, or even that was not enough.
PHP Code:
@set_time_limit(300); // if possible, let's try for 5 minutes before timeouts
The settable ranges in v2.0 should allow even huge dbs to be split into appropriate-sized chunks for download.
-
Re: Orders Exporter Module
Quote:
Originally Posted by
gjh42
Thanks for clarifications. So now the question is, whether there is something peculiar about the way OEX performs downloads that allows the keepalive script to sneak in, or something about the keepalive code that injects itself into downloads in general. How many people use the keepalive script who also have something that downloads from admin? I haven't seen any such complaints, but it should be simple enough to test.
That's way above my pay grade.
-
Re: Orders Exporter Module
It's above mine too. Going to refer this to the experts.
-
Re: Orders Exporter Module
DrByte says that there is nothing in Keepalive Timer that could cause this, unless header.php was being called (that is the only thing that runs Keepalive). He also reports installing both on a test site and having them function correctly and independently. So maybe there is something unique about your setup? I will have to try it myself, but time is short for me, in last-minute preparations for a major business trip next week.
-
Re: Orders Exporter Module
I'll compare my installed files against the installer zip. I know there were issues as installed in the first instance. It acted differently than expected and AJEH fixed it for me while she was peeking around the site for other issues.
When I installed on the 2nd site, it acted up the same way. AJEH had labeled the file she changed and when I replaced that file, all functioned as expected.
Ditto here on a trip next week. Unexpected family emergency, so things will wait.
File compare tomorrow. It is possible that I missed something in another plugin file compare.
-
Re: Orders Exporter Module
More digging needed on my part.
\admin\includes\header.php is unmodified from zen1.5.3 distribution set
-
Re: Orders Exporter Module
Hello Glenn,
I have to leave town on a family emergency for a week.
I just installed a vanilla v1.5.3 with OE2.0_RC1 and works fine.
Install keepalive and OE no longer functions as intended. V1.5.3 login becomes squirrelly too.
Upload the keepalive file that AJEH edited and V1.5.3 admin login at least begins to function better.
I cannot install v1.5.3 in my other sandbox because the shared server settings do not like v1.5.3 at all.
I will perform more tests when I return the following week and have time to concentrate.
-
Re: Orders Exporter Module
I installed Keepalive on my v1.5.1 local site and found that admin login became squirrelly. OEX downloads still gave the correct output, but displayed onscreen instead of downloading.
In unrelated news, when I tried RC1 on my live site (where payments actually happen) I discovered that the order comments were not working correctly, doubling or tripling every line of the output. In the absence of a SQL wizard who can construct a reliable query to get the desired results (if that is even possible), I will have to pull the comments query into a separate stream and merge the resulting arrays. This is irrelevant to anyone who does not need to output the order comments, as it does function perfectly without them in the query.
-
Re: Orders Exporter Module
Quote:
Originally Posted by
gjh42
I installed Keepalive on my v1.5.1 local site and found that admin login became squirrelly.
See if the Attached copy of the file edited by AJEH makes any difference if I zipped it correctly. I don't know the difference because I cannot see any in WinMerge. I did get some message saying something to the effect that the "Carriage Return format" was different but it was a really quick flicker, never to appear again.
admin/includes/keepalive_module.php
Attachment 14311
-
Re: Orders Exporter Module
Hi Glenn,
I removed the latest version of the KeepAlive plugin (by Numinix) and installed the original version by DrByte.
The garbage that was prepended to the file is no longer there on the first file download so it is looking good.
-
Re: Orders Exporter Module
Hi Glenn,
When you get around to it....
Now, after running the export on our live site, all data appears twice in the export.
...ordered products with attributes (only) WITHOUT SHIPPED ORDERS
Results are the same for downloaded file or file saved to OExport folder
-
Re: Orders Exporter Module
Just got back from 2 1/2 weeks offline. Will have to try DrByte's original Keepalive as I think I installed the latest (numinix) version before. I will see if I can duplicate your doubled results. I did run into an issue with order comments causing doubled or tripled lines in my live site where payments are made, and that may be what you are seeing. Do you have comments turned on in the exporter? I rewrote the SQL code to look up comments separately if enabled and fold them into the output, but haven't gotten to testing it yet.
-
Re: Orders Exporter Module
No keepalive related issues since using DrByte's original version instead of the Numinix version.
I didn't see an option for enable/disable comments, so not sure about that being enabled or disabled.
I am seeing things that don't make sense because I had edited the installation of the 1.3.9 version so that only datafields that I needed were exported.
Those same datafields are in the RC you sent instead of everything. I am still looking for what is causing that. Could be the change in filenaming between the versions and an older file carrying over instead of being overwritten by the new. Latest inserts an underscore orders_export instead of ordersexport
That issue is also affecting exported file column labels.
One nagging issue is that once an export file is generated, it doesn't seem to change upon subsequent exports. ie: new order arrives a few minutes after generating an export file. Generate a new export file and there is no change. Since filenames do not change except hourly, even after waiting until the next hour rolls over, the file is the same. The only way I found to see the new data added is to use the Order ID range and include the latest order numbers.
-
Re: Orders Exporter Module
Just noticed today when we had a list of 3 dozen plus line items, that there appears to be a change in sorting of the output file product names/options which puts them in a very different order that listed on the printed invoice.
As mentioned earlier, once a file is generated for a day, none of the subsequent changes are included with the export file if regenerated with a different default timestamp.
This is definitely above my paygrade to troubleshoot but am willing to do whatever is needed to help.
-
Re: Orders Exporter Module
I had a DUH moment today. I didn't realize that I needed to edit the sort orders in the /admin/includes/language/english/orders_export.php file to align the proper datafields. I found the 'v_orders_comment' setting that you mentioned, changed to 0 and the duplicates disappeared.
Now to figure out how to prevent sorting so that the order attributes appear in the download file in the same order they appear on the printed invoice.
Looking good now. Knowing where and how to edit will make this very useful for almost anyone.
-
Re: Orders Exporter Module
I will make the editing instructions a bit more explicit in the readme, to help people understand how to customize their reports. The attributes are output in the same order that the SQL query retrieves them, which probably has nothing to do with the way they are sorted for display in product pages or official invoices. It may be possible to add to the query to sort by attribute sort order where relevant... not something I had planned on doing, but I will keep it in mind as a future enhancement.
-
Re: Orders Exporter Module
No problems. I thought that might be the case for sorting and must be a difference between the different ZC versions. There is no logic that I can see to the order.
Thank you for taking the time to make this valuable pluging compatable with the latest version and provide the options for easy customization.
-
Re: Orders Exporter Module
It just occurred to me that your issue with the output not changing even when the source changes within a day may be due to some kind of query caching. If the system thinks the SQL query has already been run and is still good, it may fetch a cached copy instead of searching again. There was a reset button at the bottom of the page from the earliest version of the mod, and it might be useful for flushing the cache and forcing a new search... don't know enough about it to be sure.
-
Re: Orders Exporter Module
I have the order comments output rebuilt and working correctly on my test site, and the readme brought fully up to date. I want to test it on my live site before submitting to Plugins just to make sure. There is one nagging item, which does not cause any problems I can see, but ought not to be happening. When selecting an export range, two odd elements are added to the URL in the address bar. They vary seemingly at random in the numbers, but always look like ...&x=23&y=9.
For example:
Code:
http://localhost/zc151/my_admin/orders_export.php?from_oid=1&to_oid=99&x=38&y=6
I don't know what in the form submission would insert that, and would like to eliminate it.
PHP Code:
<div class="oidSetting"> <!-- Order ID setting inputs -->
<h2><?php echo ORDERSEXPORT_PAGE_HEADING_OID; ?></h2>
<?php echo zen_draw_form('oid_range', FILENAME_ORDERSEXPORT, '', 'get');
echo '<div class="oidInput">' . OEX_FROM_OID_PRE . zen_draw_input_field('from_oid', $limits['orders_id'][0], 'size="10"') . '</div>';
echo '<div class="oidInput">' . OEX_TO_OID_PRE . zen_draw_input_field('to_oid', $limits['orders_id'][1], 'size="10"') . '</div>';
echo '<div class="oidSubmit">' . zen_image_submit('button_save.gif', IMAGE_SAVE) . '</div>';//form submit
echo '</form>';?>
</div>
-
Re: Orders Exporter Module
This may be something above both our paygrades.
Not sure where the logic gets its order but the data in the csv is not in the same order as the databaseID or invoice. At first I thought it was the attributes but just looked and see that the products are not in the same order as the invoice.
I cannot find any consistency to the order. Sometimes A-Z, sometimes Z-A, sometimes neither by product name.
In our case, it makes things very difficult when using the CSV data and it is not in the same order as the invoice. Since we jumped from ZC1.3.9h to ZC1.5.3, I have no way of knowing if it is due to changes in DB structure or changes in how the file gets generated from the data.
We use the CSV to generate product labels and it can be a nightmare when the labels do not match the invoices.
-
Re: Orders Exporter Module
The construction of the SQL query, aside from range limitations, has not changed since its original version. Did you have or notice this issue before?
I don't know how mySQL decides to order its results in the absence of specific "order by" commands... that needs someone with expert knowledge. Is there actually a definite order, or does it depend on some random access effects from efficient searching techniques? It might be possible to add an "order by products_id" clause in the right sequence so the overall results keep orders together. I would have to research the sequence of operation of multiple items in the "order by".
Are you wanting the CSV product output to match the invoice order? Does the invoice order match the db stored order, and does that match the order in which the customer actually added the products to the cart?
-
Re: Orders Exporter Module
I appreciate everything you've done and realize sometimes there are limitations.
Quote:
Originally Posted by
gjh42
The construction of the SQL query, aside from range limitations, has not changed since its original version. Did you have or notice this issue before?
It may be differences caused by database upgrades.
CSV generated from within ZC v1.3.9h was always in the same order as invoices
Previous version also included customer and order info on a line by line basis. Now it seems to be only associated with the first line of an order.
Quote:
Originally Posted by
gjh42
I don't know how mySQL decides to order its results in the absence of specific "order by" commands... that needs someone with expert knowledge. Is there actually a definite order, or does it depend on some random access effects from efficient searching techniques? It might be possible to add an "order by products_id" clause in the right sequence so the overall results keep orders together. I would have to research the sequence of operation of multiple items in the "order by".
I'll have to do a bit more detailed looks but from what I can tell, the csv now appears to be in alpha-numerical order by product name.
I made a lame attempt at using the orders_products_id which I believe to be associated with specific attribute order that matches the invoice order.
Quote:
Originally Posted by
gjh42
Are you wanting the CSV product output to match the invoice order? Does the invoice order match the db stored order, and does that match the order in which the customer actually added the products to the cart?
Yes, the CSV output matched invoice order before now. The invoice order matches the db as best I have been able to tell.
-
Re: Orders Exporter Module
I checked my files to see if I had added any ordering by product, and I had not. So I don't know why it should now be doing that. I used a natsort() on the query fields, but that is before the query is run, so it can't affect the returned results.
-
Re: Orders Exporter Module
I did add processing to strip the redundant order and customer info from rows after the first in each order. This should make it easier to read the output and understand which products are in the same order. Is there some reason this causes a problem for you, or was it just an observation?
-
Re: Orders Exporter Module
Quote:
Originally Posted by
gjh42
I did add processing to strip the redundant order and customer info from rows after the first in each order. This should make it easier to read the output and understand which products are in the same order. Is there some reason this causes a problem for you, or was it just an observation?
Just an observation.
-
Re: Orders Exporter Module
Is this module compatible with v 1.5.1?
-
Re: Orders Exporter Module
I don't know but it looks like it doesn't work with 1.5.4. Can anyone suggest an alternative?
-
Re: Orders Exporter Module
Quote:
Originally Posted by
delia
I don't know but it looks like it doesn't work with 1.5.4. Can anyone suggest an alternative?
Go back to around post #38 and see if that zip helps. There are a few edits afterwards also. Looks like Glenn might have gotten busy and didn't upload an official update.
It has been working for me in v1.5.3 and looks OK in my 1.5.4 sandbox.
-
Re: Orders Exporter Module
-
Re: Orders Exporter Module
Well, I don't have this working completely. I got to the point of removing the order comments because of the doubling of the items. But changing the language with 0 for comments removed the comments and now I have varying duplications - up to 7 of each line. There's obviously an error in the code somewhere.
My client asked me why this kind of thing isn't part of zen cart and I told him that is it right and proper that the zen cart core team work on the core code and that our wonderful developers who frequently work for free are the one's that create these mods.
But something as basic as grabbing the orders from the database? I'm horrified that we don't have a good working version of this. I'm actually thinking it would be easier for me to write something from scratch than deal with this thing.
Any suggestions?
-
Re: Orders Exporter Module
Quote:
Originally Posted by
delia
Well, I don't have this working completely. I got to the point of removing the order comments because of the doubling of the items. But changing the language with 0 for comments removed the comments and now I have varying duplications - up to 7 of each line. There's obviously an error in the code somewhere.
My client asked me why this kind of thing isn't part of zen cart and I told him that is it right and proper that the zen cart core team work on the core code and that our wonderful developers who frequently work for free are the one's that create these mods.
But something as basic as grabbing the orders from the database? I'm horrified that we don't have a good working version of this. I'm actually thinking it would be easier for me to write something from scratch than deal with this thing.
Any suggestions?
My guess is that grabbing orders from the database is not the major problems. It's probably all the attributes that is generating the additional line items.
Since I only use a very small subset of the available data (OID, Name, Product name, Qty and Values) and commented out the data not needed, that might be why I have learned to live with the inconveniences.
IIRC, there were several 'switches' added within the code to enable/disable various options. I did upgrade from ZC1.5.3 to ZC1.5.4 over the weekend and have not seen any difference in functionality of the data we use to generate product labels.
-
Re: Orders Exporter Module
I went back to the old code to see if I could update it. There's very little to update to msqli. I got it partly done but just don't know enough to finish it. This is the best way to take care of this mod for the moment. Anyone able to help out a bit?
I replaced $row = mysql_fetch_array($result); with $row = $result -> fetch_assoc(); in two places in ordersExport.php and changed the mysql to mysqli in the extra functions file but more is needed in that file.
This what I have
PHP Code:
function mat_query($query) {
// global $mat_debug_logging, $mat_debug_logging_all, $mat_stack_sql_error;
global $mat_sql_errors_msgs, $mat_stack_sql_error;
$result = mysqli_query($query);
if (mysqli_errno()) {
$mat_stack_sql_error = true;
$mat_sql_errors_msgs .= "<br />".mysqli_errno() . ": " . mysqli_error() . "\n";
}
return $result;
}
errors returned are
PHP Code:
[14-Jul-2015 07:42:37 America/New_York] PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/admin/includes/functions/extra_functions/ordersExport_functions.php on line 29
[14-Jul-2015 07:42:37 America/New_York] PHP Warning: mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/admin/includes/functions/extra_functions/ordersExport_functions.php on line 30
[14-Jul-2015 07:42:37 America/New_York] PHP Fatal error: Call to a member function fetch_assoc() on a non-object in /home/domain/public_html/admin/ordersExport.php on line 264
So is the problem in the main file or the functions file?
-
Re: Orders Exporter Module
A better way to handle this update is to modify the plugin to use the built-in Zen Cart database object ($db) to perform those database manipulations. That way, a single version of the plugin will operate on all versions of Zen Cart. The path you're heading down will result in a plugin that will work properly only on Zen Cart v1.5.2 (where the mysql->mysqli change was first implemented) and later.
-
Re: Orders Exporter Module
okay, so I'm simply not able to do this. That's what I suspected. I'm talking with mc12345678 about incorporating this in easy populate.
-
Re: Orders Exporter Module
Quote:
Originally Posted by
delia
okay, so I'm simply not able to do this. That's what I suspected. I'm talking with mc12345678 about incorporating this in easy populate.
That will make it a both or nothing plugin. EP doesn't do attributes that I have been able to find. EP doesn't play nice with MS Excel. EP documentation is really sparse. I really, really hope that I am missing something in my interpretation of how EP is intended to function.
Some things are better as 'stand-alone' but that is just my simpleton, non-coder opinion.
-
Re: Orders Exporter Module
well, I need a solution, I don't care how it happens or who does it. This thing has never had options but it has sufficed for the clients who needed this. If someone will get this working, I'll be glad to package it up etc. I don't mind working on this stuff but my php skills have never been strong and transitioning to mysqli and php 5.4+ is just beyond my skill level.
-
Re: Orders Exporter Module
Don't mean to pick at a sore wound but what is it doing or not doing?
Can't say I can help and maybe my needs are too simple because what I am receiving in the daily csv is exactly what I want/need to print product labels. I did use the editing/commenting features to remove unnecessary fields from the download. AND I can use MS Excel.
I have no coding skills other than trial/error in duplicating lines to achieve similar results for similar data.
-
Re: Orders Exporter Module
At this point the attributes are in there 8 times. It was only twice at first.
-
Re: Orders Exporter Module
Maybe it is just a simple setting (or two). It has been a year since I looked at the details but I think Glenn built in a few switches.
Our daily csv does not duplicate any specific attribute line. We do get 2 lines per product but each line is for a different attribute. We have half handful of products that have 3 attributes, so those show up in 2 lines.
8 identical lines or 8 lines of different product attributes?
It works for me. It doesn't work for you. Maybe our needs are different. Maybe it is just a setting switch. Can't say without having something to compare.
Just throwing that out as a possible option or opinion.
-
Re: Orders Exporter Module
identical lines inside the order.
-
1 Attachment(s)
Re: Orders Exporter Module
Here's the orders_export.php file that I am currently using if you want to compare for differences. I am trying to grasp how we are seeing such drastic differences.
Would I have it do things differently? Yes.
Am I capable of making it do things differently? No
So I modified my daily tasks to adapt but realize that is not always an option for some.
-
Re: Orders Exporter Module
I adapt - my clients don't always work with me like that. That is what I have. Are you on php 5.4?
-
Re: Orders Exporter Module
surface RT or its version of IE doesn't play nice with forum.
php 5.4.42
I expected to see some differences in the file unless I grabbed the wrong file where I customized the datafields to be included in the csv.
-
Re: Orders Exporter Module
nope correct file - then maybe the language file which I did edit. I'll play with it.
-
Re: Orders Exporter Module
I'm going out on a limb and guessing that if you look around line 156 - 182, you might need to comment out a few lines per the first comment line in that grouping. I'll dig a bit more to see what I changed or switched on/off.
Admin\includes\languages\english\orders_export.php
Code:
//list of fields to not duplicate in multiple rows of an order
define('OEX_BASE_ORDER_FIELDS', serialize(array(
'v_date_purchased',
'v_orders_status_name',
//'v_orders_id',
//'v_customers_id',
//'v_customers_name',
'v_customers_company',
'v_customers_street_address',
'v_customers_suburb',
-
Re: Orders Exporter Module
Okay, I missed that instruction but that's not it.
It is working in that the fields like order_id and such are not duplicating.
The only things that are duplicating are the product id, product model, product names, option names and option values and I'm getting 8 sets. I added those fields in that language file and it had no effect.
8 sets I'm getting. It's looks like two at first because of the way it prints out but it's actually 8 sets.
In this thread it said something about the comments having something to do with the repetitions?
-
Re: Orders Exporter Module
Quote:
Originally Posted by
delia
I adapt - my clients don't always work with me like that. That is what I have. Are you on php 5.4?
Since I am my own client, I have the luxury of telling the client to like it or stuff it. :smile:
OOPS. Brainfart yesterday. Current PHP version is 5.5.25 but used 5.4.xx for 6-8 months until a PCI issue forced an update.
Just went back to make sure that I attached the correct file.
IF your copy of that file is identical to the one that I attached, I would be very surprised. The file attached has several dozen of the original lines commented out because I do not want/need the datafields included within the csv.
Just a suggestion to comment out a few selected lines and see if the duplicates are reduced.
Are you using the download csv or Save to server oexport directory? Not that there should be any difference, I think that I remember a difference somewhere. It's been a year since I fiddled with my customizations, so things are rusty.
-
Re: Orders Exporter Module
I have been away from programming for the past six months or so, immersed in other facets of life which actually give tangible rewards, and just popped back in to the forum to look around. I don't think I posted the latest version of OEX with the comments output functioning correctly - I will look into doing that. I need to do it for my live site anyway.
The website I need OEX for is only active in May and June, and when it wants the exporter tweaked I am always up to my eyeballs in outdoor projects... I hope this year I can get to updating the site from v1.5.0 in the off season and properly test the latest OEX on a live v1.5.4 site. I'm glad to hear that at least someone is using it on a current ZC version successfully.
My reworking of the original OEX code included moving from explicit mysql functions to the ZC $db functions.
-
Re: Orders Exporter Module
I knew you were alive! Thanks so much. This mod has been in my arsenal forever and though I don't have many clients that ask for it, when someone needs it, they really need it.
-
Re: Orders Exporter Module
gjh42, can I help you get that packaged up?
-
Re: Orders Exporter Module
At this point, I think I can definitely say this does not work with attributes. I went back every bit of this from scratch and the same thing is happening. The cart is a 1.5.4 cart running on php 5.5.24. I haven't tried it on anything else but I don't see how the problems I'm seeing can be tied the versions.
1) if I ask for orders without attributes, it does not exclude the orders with attributes.
2) Every product line and attribute line is being repeated 3 times.
As this is the only existing mod that exports the orders with attributes, this is the most important part and what I have to have. There are other ways to export the orders.
So when you were saying the comments line was repeating and causing the problems - I turned off comments. still happening.
I definitely don't see what's happening. I don't actually even understand how this is supposed to work. Mainly because I see no way for filtering for those options of with or without attributes. In the old mod there was different sql queries that were tagged with the noAttribs and onlyAttribs filter. Now I see no mention anywhere of those filters except as define statements in the language file. So I don't see how it can filter the report. If I've missed something, that's okay. I just need to know what I'm missing in this!
-
Re: Orders Exporter Module
While something like this is almost entirely in EP4 (other priorities got in the way of completion), did discover the need to add distinct into the query to eliminate such duplicate results.
-
Re: Orders Exporter Module
No, that doesn't help. I gather if you have no attributes the resulting report is correct. When you add in the attributes, everything starts multiplying. Nice thought though. I've sent a pm to gjh42 as well. But if his code is good otherwise, it makes sense to fix this rather than you do a whole new section for easy populate. If you want to go ahead with that though, I would not be adverse. Relying on only one mod for this has really created problems in this case.
-
Re: Orders Exporter Module
Quote:
Originally Posted by
delia
At this point, I think I can definitely say this does not work with attributes.
I can say that it definitely does work (for me) with attributes. zc1.5.3 and after upgrade to zc1.5.4
Quote:
Originally Posted by
delia
1) if I ask for orders without attributes, it does not exclude the orders with attributes.
You are correct but that was not an issue for me since all I care about is orders with attributes. I had not even tested that option until this morning.
Quote:
Originally Posted by
delia
2) Every product line and attribute line is being repeated 3 times.
In my case, I receive a separate line for each option name with its option value. If for some reason, the option value is not included with the csv, I can see that each line would appear to be repeated identical times.
Quote:
Originally Posted by
delia
I definitely don't see what's happening. I don't actually even understand how this is supposed to work. Mainly because I see no way for filtering for those options of with or without attributes. In the old mod there was different sql queries that were tagged with the noAttribs and onlyAttribs filter. Now I see no mention anywhere of those filters except as define statements in the language file. So I don't see how it can filter the report. If I've missed something, that's okay. I just need to know what I'm missing in this!
Have you set the sort orders for data fields which are included in the csv?
Have you set the data fields to include (or exclude) from the csv?
Have you edited the
Quote:
//list of fields to not duplicate in multiple rows of an order
in /admin/includes/languages/english/orders_export.php
granted..... documentation is somewhat lacking.
Is there any merit to comparing what my csv download for orders containing products with attributes contains with one of your csv for orders containing products with attributes to see where they differ which may help figuring out the why?