Jump to content
Sign in to follow this  
scottybwoy

Easy csv

Recommended Posts

I am currently using easy csv to import over 3000 products and it works great. But my problem is that i upload all the products into a category called unassigned then put them in there proper categories (why do i do this? because i receive a feed from my supplier which i then change to suit the format for easy csv import).

 

Now my main problem is once i have move them into their proper categories and i go to update the next day, it deletes the products from there proper category and puts them back into the Unassigned category.

 

Is there away to tell the script "if the product exists don't update the category (theoretically leaving it in the the correct category) else import to Unassigned".

 

I've tried leaving the category field blank and it puts it into a blank category.

I've also tried having 2 of the same producted one in Unassigned and one in its proper category, either duplicate(which then the import doesnt update that one product) or if i link them it deletes the one in the proper category.

 

Any ideas/help would be much appreciated.

 

Thanks in advance

Share this post


Link to post
Share on other sites
I am currently using easy csv to import over 3000 products and it works great. But my problem is that i upload all the products into a category called unassigned then put them in there proper categories (why do i do this? because i receive a feed from my supplier which i then change to suit the format for easy csv import).

 

Now my main problem is once i have move them into their proper categories and i go to update the next day, it deletes the products from there proper category and puts them back into the Unassigned category.

 

Is there away to tell the script "if the product exists don't update the category (theoretically leaving it in the the correct category) else import to Unassigned".

 

I've tried leaving the category field blank and it puts it into a blank category.

I've also tried having 2 of the same producted one in Unassigned and one in its proper category, either duplicate(which then the import doesnt update that one product) or if i link them it deletes the one in the proper category.

 

Any ideas/help would be much appreciated.

 

Thanks in advance

 

I started working on a kind of "smart" updating, this should be useful for your case. Meanwhile, in your csv_import.ini, you should comment out 'categories_id' item inside [categories] section using ';' (semicolon) when updating.

 

I hope having been useful.

Edited by eugeniobonifacio

Share this post


Link to post
Share on other sites

Can seem to edit my post.

 

Unfortunately commenting that line out didnt help, the files were deleted from there proper categories and placed in a blank category. :(

 

Thanks

Share this post


Link to post
Share on other sites

I try to add the products_url field for two languages, en and gr.

Here is my .ini:

 

 

 

 

[settings]

 

debug = "0"

csv_upload_folder = "csv"

correct_fields_count = "1"

correct_fields_radius = "5"

products_default_status = "0"

default_category_id = "278"

auto_add_categories = "0"

import_images_urls = "1"

image_name_delimiter = "|"

allow_empty_db = "0"

decimal_point = ","

thousands_sep = "."

 

[csv]

 

delimiter = ";"

enclosure = "@"

columns_headers = "category, farm_id, name_gr, name_en, quantity, image, price, weight, description_gr, description_en, tax class, manufacturer name,url_el,url_en"

columns_headers_delimiter = ","

categories_delimiter = "|"

categories_subcat_delimiter = "."

categories_language = ""

 

[products]

 

products_farm_id = "1"

products_image = "5"

products_price = "6"

products_quantity = "4"

products_weight = "7"

products_tax_class_id = "10"

 

[categories]

 

categories_id = "0"

 

[manufacturers]

 

manufacturers_id = "11"

 

[products_description]

 

products_name = "gr:2, en:3"

products_description = "gr:8, en:9"

products_url = "gr:12, en:13"

 

But no url fields are updated.

What should I do?

Share this post


Link to post
Share on other sites
I managed to make it work by adding the necessary code in csv_import.php...

 

 

Hi! I worked hard, 'cause had the same problem. :blink:

I changed in csv_import.ini

 

columns_headers = "category, model, name_hu, name_en, name_de, name_es, name_, name_, quantity, image, price, weight, description_hu, description_en, description_de, description_es, url_hu, season, tax class, manufacturer name"

 

add

[products_description]

 

products_url = "hu:16"

 

and add in csv_import.php

after

// descriptions decoding

$products_descriptions_codes = explode(',', $descriptions['products_description']);

foreach($products_descriptions_codes as $v) {

list($code, $col) = explode(':', $v);

$bindings['products_description'][trim($code)]['products_description'] = trim($col);

}

 

this

// URLs decoding

$products_urls_codes = explode(',', $descriptions['products_url']);

foreach($products_urls_codes as $v) {

list($code, $col) = explode(':', $v);

$bindings['products_description'][trim($code)]['products_url'] = trim($col);

}

 

and it works :D


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites
If someone encounters problems with my contribution and wants to contact me about it, it would be very useful if you tell me your PHP/MySQL versions.

 

Thank you

Hi i cannt work this out :(

http://1800shop.com.au

you can login in if you like e-mail me william at house dot id dot au

 

Thanks

Share this post


Link to post
Share on other sites

Hi eugeniobonifacio,

 

Thanks for this contribution, love to use it. I try to use image import in separate directory. First of all when the products table empty the image_url works fine. But the second case, when image_url exist in the table ever changes to base image directory. I suggest to change code

 

about in 573 row catalog/admin/csv_import.php

I switch off this:

 

// basename for images (catalog/images)	
//				$fields['products_image'] = basename($fields['products_image']);
// and basename

 

Is it good for me?

Edited by Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

For some reason the functionality of easy csv has changed, and I think it may be due to some server change along with your newest version I'm using php v4.3.11 with csv_import v2.1.3.

 

It seems to create new categories instead of putting them in the ones already there. I can get the first product to work by using static in front of $c_parent_id = 0; on line 245. But then it cocks up all the other categories. I also had to take out both of the

foreach($cId as $c_id) {

statements and replace $c_id with $c_parent_id in the insert query.

 

Why do you think this is? The original $c_parent_id is not holding the value in the foreach loop.

 

How is the $cId array meant to work?

 

Could there be a problem with the caching in this version of php?

 

Thanks.

Share this post


Link to post
Share on other sites
For some reason the functionality of easy csv has changed, and I think it may be due to some server change along with your newest version I'm using php v4.3.11 with csv_import v2.1.3.

 

scottybwoy was wrong in doing some customization, he misunderstood the meaning of categories_separator configuration param

Share this post


Link to post
Share on other sites

Hi Eugenio,

 

I have some trouble when importing to categories with quotes in it. Like camera's (this is how you write it in dutch) will give me errors. Is there some way to work around (except leaving the ' out of the word)?

 

Also found that when I add things for the second time I hoped it would update all, but the image I imported first batterijen/batterij.gif ended after the second import in batterij.gif (so the path is gone).

 

Further I think this tool is awesome!!! I realy like it above easypopulate!!!

 

Kind regards,

 

Maurice

Share this post


Link to post
Share on other sites

Another strange thing happened. I imported a file with 150 articles in a new category. Everything is nicely imported (says the admin side of the site) but when I try to enter the category on the site, I get an Internet Explorer cannot display the webpage. So I thought, maybe something is wrong with my data. I splitted the import file in 3 pieces and try to import it piece by piece.

 

After 2 pieces everything was fine but after the last piece it went wrong (the script says that it was imported correctly, and every article can be seen in the admin).

 

So I deleted al imported things and started again an changed the import and started with the third file. Strangely everything went well and I didn't have any problems on my side. So I imported the second file, nothing wrong either. And last I imported the first file. You can guess..... I couldn't enter the category on my site.

 

Now I'm very confused. What can be wrong??? and how does that parsing the data files work, can I check my data with that tool?

 

Kind regards,

 

Maurice

Share this post


Link to post
Share on other sites

Hello,

 

first, thanks for this contrib. Works really good for my needs.

 

One thing I woult like to implement, but dont´t know how to solve.

 

Is it possible to make a minimum price, for example all products in the csv which are 50€ ore more expensive will be imported, all other will be ignored?

 

Any hint is greatly appreciated ;)

Thanks

Share this post


Link to post
Share on other sites

Hello,

 

Thanks for this great and very usefull contribution.

 

I have approximately 6000 items to import in my shop, from a CSV file. Whem I'm importing this file using Easy CSV, I have approximately 1000 items missing in my shop, and few log files were created on the Excel/Calc Import page.

On the log files are the items who are not in the shop. When I try to clic on "Import" button of this CSV log files, I have the following error message: "Row 2: The count of fields is wrong".

For exemple, here is a line of the log csv file:

CATALOGUE COMPLET 1 "0205650060" "" "" "" "" "" "ECROU" "1" "" "0.2691" "0.2" "" "" "" "" "" "" "" "AIXAM"

 

I'm using OS Commerce version 2.2 RC1 FR W3C 3 and PHP Version 5.1.6

And here is the adress of the shop: http://www.garagedu12.com/boutique/catalog/index.php

 

Do you have any idea ? Is the problem on my CSV file ?

Thanks in advance for your help.

Share this post


Link to post
Share on other sites

how can i import product options with easy csv?

 

i have a csv with a option type colum with data like (size or color) and a colum with option value like (L or Green).

 

how can i import this into the database.

 

in csv_import.php i add this

 

$bindings['products_options'] = $config["products_options"];

 

and in the ini

 

[products_options]

variant_type = "13"

variant_waarde = "14"

 

Kind regards,

 

Epco

Share this post


Link to post
Share on other sites

Hello,

 

I use easy csv successfully. Unfortunately I can not change the code to add more photos. I use the contribution Additional Amages.

 

Could you help me solve this problem

 

Thanks in advance for your help.

 

Bartek

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×