The CSV version isn't compatible with data files from older versions.
Added some more details under "Upload Results".
Printable View
The CSV version isn't compatible with data files from older versions.
Added some more details under "Upload Results".
Nice work.
I have been looking at this code to get a froogle similar output and i almost got it.
Last thing i need is a check if a product_id allready exists in the array and if it does, do not add it again. (this is because i have some products copied over different categories and i only want those once in the output)
I think i need to do something around line 762 while($row=) but i am really at loss :)
any ideas?
phazei,
1) I imagine the EOREOR was a "simple" way to handle cross platform issues with reading end of line.
2) Concerning old mods: My philosophy is more aggressive concerning a re-write. (I don't even think Linda's header thing exits anymore... from like zen 1.2..???) There are so many mods out there that it would be better to have a stable non-beta version that works with a default 1.38 install. Once that's done, you can go back and add functionality. It will also make porting to zen 2.0 easier since there are significant changes coming.
3) I would like to suggest a NEW thread for you CSV version. There are still many people using 1.2.5.4 and this is where they go for support. You're CSV version will only add to the confusion with the OSC ports, advanced ver, working and non-working free versions!
4) To my knowledge no one has ever posted code that allows you to update quantity discounts with EP (not even the advanced paid version, though langer had talked about adding it), so quantity discounts is my baby (although it was a simple solution when I finally sat down to do it).
5) Fixing product attributes is more important than other mods, but fixing this once 2.0 may be a more constructive use of time.
Just putting my thoughts out there!
-cj
Okay, I don't understand what you mean. The CSV file that I'm using is the one that it creates when I download a full EP file from my existing site. Even if I remove all the products but one and change the remaining product code, it won't actually add the products, but it acts like it does.
Okay, nevermind. Somehow I saved it as a CSV and didn't realize that wasn't what it started as. LOL - shouldn't stay up so late. Have it working now. Thank you.
That should be really simple one liner.
Line 1071:
$filestring[] = $tempcsvrow;
Change that to:
$filestring[$row['v_products_model']] = $tempcsvrow;
or
$filestring[$row['v_products_id']] = $tempcsvrow;
If there is a duplicate model or id, it will overwrite the same key instead of adding a new item.
@ini_set('auto_detect_line_endings',true);
or to force it mac:
stream_get_line($fp, 4096, "\r");
I agree, a rewrite is a waste of time until 2.0 comes out, it's going to be significantly different. I only wanted to make changes to the one easypopulate file. A rewrite should split it up into multiple files, or make a class out of it.
2.0 is supposed to come with a db backup system built in, so it probably won't even need easy populate.
Someone might as well change the version number on EP to work with 1.38, there aren't any changes between 1.36 that I've seen that affect it at all.
You're probably right.
I haven't even looked at how ZC does quantity discounts. It's probably stored in a different table. Would need to add a link to a different type of file to download if it's more than one setting per product. If not, it could just be tacked onto the full file at the end like I did with the meta.
That's the file that stores like different color or size options for the products, right? What's broken with it?
I added a new thread:
http://www.zen-cart.com/forum/showthread.php?t=117204
Though it works the same, it's more of an update than a new contribution. But then again, this thread is getting unmanageably long anyway. But it is stickied, so that's nice.
And I uploaded it to the addons section. It would be better if they just tagged it on to the 1.2.5.5 one since it's basically the same. Maybe just make it 1.2.5.6
If it would still work with txt files and had an export to csv option added to it you would be right.
I am not sure why you want it in csv, but you may have your reasons, i personally have a need to keep it outputted in txt but that's because i mainly use the exports to prepare the datafeeds for various websites out there.
If they want different output in headers, i simply make a new case, define the headers, and never look at or open the txt file again when it is done, just upload it to their website.
I guess .csv is indeed easier if you just want to export/import the products. I had trouble in the past with the txt version as my shop is running utf-8 and character encoding is always a pain for me, when i have more time i may start looking again at the csv output, it may have gotten better?
Anyway, still great you are working on this and i will surely be checking the new thread out often. See you there...
Yeah, that will only work in my version. It might be a pain in the old version.
CSV files are basically text files, they just have certain rules that make things easier. The file it was using was some proprietary thing that the original creator made up instead of using a standard that took care of all the problems he had in the code. He wasn't a very experienced coder. He didn't even bother using PHPs built in time and date functions, he had 2 pages of code to manually parse them.
In the main easypopulate.php file in the configuration options, if you change the deliminator to "\t" (tab) and the encapsulate to " " space, then it will be just like it was, without the EOREOR.
If you need to remove linefeeds in boxes, it does that for the froogle options. It takes a line of code that can be added to the other options.
The main reason it's not compatible is because I added the columns on the end for the meta data. If you import an old file, the meta data won't be there, and if you have some already, it will be overwritten with NULL.