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?