Author Topic: Adding Excel File Upload option to product_csv module  (Read 321848 times)

matthieu

  • Beginner
  • *
  • Posts: 48
Re: Adding Excel File Upload option to product_csv
« Reply #60 on: July 04, 2007, 01:57:46 am »
I tried the first version of the file. It works but I have two problems:
 - On excel, product_desc contain accent (like é or à,...) and when I Upload the excel file, the first accentuated letter and the next ones are not uploaded in the data base.
 - The problem you spoke joseph on your last post on the image : On excel, i put the name of the picture. I put this one on the folder (com_virtuemart/shop_image/product) and it does not work, have you a solution?

Thanks

My excel file http://esnips.com/web/joomla-temp


Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #61 on: July 04, 2007, 02:10:21 am »
For non-ASCII characters, make sure you database and your pages are in correct encoding.
For images, I'm not sure about your question. But from your excel file, you didn't specify the values for product_full_image which is the primary file. You need to have both the full image and thumb_image to have the image system works.
Joseph
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

matthieu

  • Beginner
  • *
  • Posts: 48
Re: Adding Excel File Upload option to product_csv
« Reply #62 on: July 04, 2007, 08:50:36 am »
thanks for your answer. Concerning the non ASCII characters, when i manualy add a product with accent on product_desc, it works : every characters are in the database and on the website.

http://grimaud.celeonet.fr/component/page,shop.product_details/flypage,shop.flypage/product_id,14/category_id,6/manufacturer_id,0/option,com_virtuemart/Itemid,1/

matthieu

  • Beginner
  • *
  • Posts: 48
Re: Adding Excel File Upload option to product_csv module
« Reply #63 on: July 04, 2007, 14:06:06 pm »
you are right : some of accentuated characters of my excel file pose a problem although i did a copy paste of excel by only keeping the values(special paste).
How can i modify the excel encoding?

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #64 on: July 04, 2007, 18:43:33 pm »
I uploaded your file to my test site and found all (or at least some) of the accentuated cahracters are there. So I'm quite sure that is an encoding problem.
I guess recent Excel versions all use unicode. So, maybe you can try setting your database to utf-8 and page encoding to utf-8 to see if it works.
Joseph
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

matthieu

  • Beginner
  • *
  • Posts: 48
Re: Adding Excel File Upload option to product_csv module
« Reply #65 on: July 06, 2007, 15:37:37 pm »
thanks for your help joseph, I did not succeed to resolve my problem, so I gave the CSV method and it is okay now.

Thank you to gave time to answer my responses, your application is very nice!!

Paul Humberstone

  • Beginner
  • *
  • Posts: 5
Re: Adding Excel File Upload option to product_csv module
« Reply #66 on: July 10, 2007, 05:23:17 am »
Hi Joseph,

I’m new to VirtueMart, PHP etc and I’m having difficulty with my csv/xls upload. I’ve installed your hack and was wondering if you might be able to help?

The file I ultimately want to upload daily is http://www.itproducts.net.au/HelpMe/PC070710.txt

For my initial test data I downloaded the sample data test file that came with VirtueMart
http://www.itproducts.net.au/HelpMe/CSV_Export_10-07-2007_12.33.csv

Saved it as an xls file
http://www.itproducts.net.au/HelpMe/CSV_Export_10-07-2007_12.33.xls

and tried to import it using these settings
http://www.itproducts.net.au/HelpMe/xls_upload_settings.bmp

I got these results
http://www.itproducts.net.au/HelpMe/xls_upload_results.bmp

I then tried with the below test data
http://www.itproducts.net.au/HelpMe/Test.xls

and got this message

Notice: Undefined offset: 2 in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 2478

Notice: Undefined offset: 21 in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 2478

Notice: Undefined offset: 23 in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 2478

Notice: Undefined offset: 22 in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 2478

Notice: Undefined offset: 24 in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 2478

Notice: Undefined offset: 17 in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 2478

Notice: Undefined offset: 15 in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 2478

Any help would be greatly appreciated,

Cheers,

Humbie.

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #67 on: July 10, 2007, 06:45:59 am »
Paul,
The first excel file contains extra characters ~ (which is the separator for CSV download). You have to clean it up first (just make a global replace) before using it for upload.
The second excel file contains some blank cells and so caused php notices. PHP notice doesn't cause problems and can be ignored. (they should be turned off by default but your php setting happens to thave that on). Your upload of the second excel file should be OK.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

jcaan

  • Beginner
  • *
  • Posts: 38
Re: Adding Excel File Upload option to product_csv module
« Reply #68 on: July 10, 2007, 17:30:09 pm »
Hi. I am trying very hard to understand and configure my products with child items. I have setup an excel file with the following headers:

product_sku
product_s_desc   
product_desc   
product_in_stock   
product_available_date   
product_name   
product_price   
product_thumb_image   
product_full_image   
product_weight   
product_length   
product_width   
product_height   
category_path   
manufacturer_id   
product_tax_id
product_parent_sku
attribute
attributes   
attribute_values
product_availability   
product_special
product_publish
product_discount
product_discount_date_start
product_discount_date_end

As an example, For parent products I have specified 0 price and for child items I have specified it as metal::32|plastic::10 in the attribute_values column (in excel). The atrributes column has metal::1|plastic::2

I have product_sku column as B12 (My SKU Value) and for parent_product_sku I have B12.

When I upload I dont see any attributes for the parent product save for a 0 price. What I am doing wrong? Can someone please send me an example excel file with how the column configuration should be. Please help.



Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #69 on: July 11, 2007, 06:59:08 am »
In order to help first-time user, I've included a sample.xls in the download. For those just need the sample.xls, the file is attached.

[attachment cleanup by admin]
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

jcaan

  • Beginner
  • *
  • Posts: 38
Re: Adding Excel File Upload option to product_csv module
« Reply #70 on: July 11, 2007, 10:32:46 am »
Thanks JK. Good stuff.

Paul Humberstone

  • Beginner
  • *
  • Posts: 5
Re: Adding Excel File Upload option to product_csv module
« Reply #71 on: July 12, 2007, 05:26:47 am »
Hi Joseph, thanks for your help but I'm still having problems uploading even using the sample.xls you provided.

Warning: fgetcsv() [function.fgetcsv]: enclosure must be a character in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 314

Warning: Invalid argument supplied for foreach() in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 258

Warning: fgetcsv() [function.fgetcsv]: enclosure must be a character in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 314

Warning: fgetcsv() [function.fgetcsv]: enclosure must be a character in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 314

Warning: fgetcsv() [function.fgetcsv]: enclosure must be a character in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 314

Warning: fgetcsv() [function.fgetcsv]: enclosure must be a character in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 314

Warning: fgetcsv() [function.fgetcsv]: enclosure must be a character in /clientdata/clients/i/t/itproducts.net.au/www/administrator/components/com_virtuemart/classes/ps_csv.php on line 314

What settings should I be using here? http://www.itproducts.net.au/HelpMe/settings.bmp

Cheers,

Paul.

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #72 on: July 12, 2007, 05:32:43 am »
Look like you are not using excel upload. Check Excel for the file format. Check Use Column Header as Configuration.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

Paul Humberstone

  • Beginner
  • *
  • Posts: 5
Re: Adding Excel File Upload option to product_csv
« Reply #73 on: July 12, 2007, 06:18:29 am »
Sorry Joseph but where do I check Excel for the file format? I can't seem to find that as an option?

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #74 on: July 12, 2007, 06:22:44 am »
I'm sorry I didn't recognize that earlier. Did you install the hack which you can find in the first post on page 1?
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.