Re: EasyPopulate 4.0 Support Thread
HI, my first post here, so if this is covered already please say.
I have an export csv file from Litecommerce, it exposrts category setup separated with slashes, as one field.
in other words, I get one csv field with the categories separated by slashes
topcat1/subcat1/subcat2
rather than the separately delimited category names that easypopulate expects.
if its not already solved, can anyone direct me to the easypopulate code that reads the csv data category fields, so I could possibly
split the incoming litecommerce data format above, with the slashes, into [for instance] the 3 separate fields which easypopulate would expect
for the above example.
i can do php
thanks
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
hareslade
HI, my first post here, so if this is covered already please say.
I have an export csv file from Litecommerce, it exposrts category setup separated with slashes, as one field.
in other words, I get one csv field with the categories separated by slashes
topcat1/subcat1/subcat2
rather than the separately delimited category names that easypopulate expects.
if its not already solved, can anyone direct me to the easypopulate code that reads the csv data category fields, so I could possibly
split the incoming litecommerce data format above, with the slashes, into [for instance] the 3 separate fields which easypopulate would expect
for the above example.
i can do php
thanks
Don't know if addressed earlier, but the file in your admin directory ending with import processes the information obtained by the sql query in the functions file found in admin/functions/extra_functions.
May want to create a new file name prefix to process your osfiles and in parallel a new sql query section to handle the situation you have. This way won't break the existing code.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
hareslade
HI, my first post here, so if this is covered already please say.
I have an export csv file from Litecommerce, it exposrts category setup separated with slashes, as one field.
in other words, I get one csv field with the categories separated by slashes
topcat1/subcat1/subcat2
rather than the separately delimited category names that easypopulate expects.
if its not already solved, can anyone direct me to the easypopulate code that reads the csv data category fields, so I could possibly
split the incoming litecommerce data format above, with the slashes, into [for instance] the 3 separate fields which easypopulate would expect
for the above example.
i can do php
thanks
Actually, it would be much easier if you simply did a search/replace on "/" and replaced with "^"
NOTE: My version of EP uses ONE column for the category path. This is a large change from other versions. This was done to support multiple languages.
so: v_categories_name_1 refers to LANGUAGE 1, and v_categories_name_2 refers to LANGUAGE 2, not a subcategory.
Hope that helps.
-chadd
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
chadderuski
Actually, it would be much easier if you simply did a search/replace on "/" and replaced with "^"
NOTE: My version of EP uses ONE column for the category path.
-chadd
Thanks chadd and other... thats a relief i can use carets in the csv file then! nice one.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
hareslade
Thanks chadd and other... thats a relief i can use carets in the csv file then! nice one.
Though my contribution may. Have been significantly smaller, hopefully you realize that if you have more than the one file to worry about, that you could implement the swap of the / for ^ in the code on that one field using a new import section. Being partial to ZenCart, not only would that added functionality help others convert to ZenCart, but it would save you from having to remember or make note of what was done to bring the file(s)/filetype(s) into ZenCart. :)
Good luck!
Re: EasyPopulate 4.0 Support Thread
Hi chadd
I've got the ^ separator split now, ep4 imports category correctly, ......but the max length of the ep4 categories field is 32, can I manually make that field longer in the db without messing anything up?
And is there a limitation in your EP4 code otherwise, that limits that categories names total length to 32, before its split?
thanks
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
hareslade
Hi chadd
I've got the ^ separator split now, ep4 imports category correctly, ......but the max length of the ep4 categories field is 32, can I manually make that field longer in the db without messing anything up?
thanks
Only answering what I have an answer for: regarding the field length, it is not an EP4 setting, just something that has been made viewable to help the "admin". Regarding modifying the length check the following thread found by a google search:
http://www.zen-cart.com/showthread.p...ame-max-length
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
hareslade
And is there a limitation in your EP4 code otherwise, that limits that categories names total length to 32, before its split?
thanks
If I had my guess based on the flexibility that has been incorporated thus far into EP4, is that if the import programming cuts off data, it would be to the limit of the current database setting and not some arbitrary value, and would be such that each cat^subcat would be such, not the entire string length or it "waits" for the receiving database to perform the chop. Chadd probably can provide that type of info off the top of his head, while I'd have to look into the code to confirm or deny that, though in writing import functionality I don't recall coming across any such limiter.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
If I had my guess based on the flexibility that has been incorporated thus far into EP4, is that if the import programming cuts off data, it would be to the limit of the current database setting and not some arbitrary value, and would be such that each cat^subcat would be such, not the entire string length or it "waits" for the receiving database to perform the chop. Chadd probably can provide that type of info off the top of his head, while I'd have to look into the code to confirm or deny that, though in writing import functionality I don't recall coming across any such limiter.
Btw, I apologize that my response may seem curt or rude, I absolutely had no intention in it being so. I was rereading and thinking about it and could see how it might be interpreted as such.
Btw, congrats on getting the formatting to support the import formatting. That much closer to a totally zen experience. :)
Re: EasyPopulate 4.0 Support Thread
chadd and other !
I am exporting from litecommerce cart, get the csv category string with / instead of ^.
I've successfully modified the code around lines 685 of easypopulate_4_import.php
as
$categories_delimiter = "/"; // add this to configuration variables
// get all defined categories
foreach ($langcode as $key => $lang) {
// iso-8859-1
// $categories_names_array[$lang['id']] = explode($categories_delimiter,$items[$filelayout['v_categories_name_'.$lang['id']]]);
// utf-8 ^
//jph mod separator x2f is / in hex asc
$categories_names_array[$lang['id']] = mb_split('\x2f',$items[$filelayout['v_categories_name_'.$lang['id']]]);
This imports fine now, categories work, now can have the zencart experience with Litecommerce v2.1 data. Hope this helps someone else with an old litecommerce setup, because import into X-cart [their modern version] is a limited option. btw haven't imported more than one product at a time yet into zencart, but I don't foresee any probs. THansk so much for this EP4 version!