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

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #45 on: June 25, 2007, 19:50:10 pm »
Look like many people have problem with the language file. Probably I need to give up the original idea of keeping the text in one place. I will do an update pretty soon.
In the mean time, you can comment out all the duplicate declarations.
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.

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #46 on: June 26, 2007, 07:46:02 am »
File download updated with new version. Changes include
1. all duplicate declaration commented out.
2. minor adjustments in product.csv_upload.php so that default upload format is excel and use column headers as configuration is default.
The link again for easy access: http://www.expertcms.net/public_downloads/hack_Virtuemart_xls_upload.0.52.zip
This file is the same as the one on the first post though the filename is different just in case you need to track the version.

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.

erick monfredo

  • Beginner
  • *
  • Posts: 5
Re: Adding Excel File Upload option to product_csv module
« Reply #47 on: June 26, 2007, 09:17:15 am »
thanks ..thanks thanks

erick monfredo

  • Beginner
  • *
  • Posts: 5
Re: Adding Excel File Upload option to product_csv module
« Reply #48 on: June 26, 2007, 09:32:44 am »
yep yep....think now i have another problem :

Warning: main() [function.main]: open_basedir restriction in effect. File(/oleread.inc) is not within the allowed path(s): (/var/www/vhosts/xxxxxxxxxxxx.com/httpdocs:/tmp) in /var/www/vhosts/xxxxxxxxxxxx.com/httpdocs/site/administrator/components/com_virtuemart/classes/excel/reader.php on line 4

Warning: main(oleread.inc) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/xxxxxxxxxxxx.com/httpdocs/site/administrator/components/com_virtuemart/classes/excel/reader.php on line 4

As i'm a really newbie..can someone can explain me what is this problem?  a  temp/ path problem ?? ..becose now i cannot login to admin :(

Thanks

Erick

ok problem solved..i had to enter  the full path :)

lipmat

  • Beginner
  • *
  • Posts: 45
Re: Adding Excel File Upload option to product_csv module
« Reply #49 on: June 26, 2007, 09:41:22 am »
Hi! I've a little problem again. If I have such a nice xls, attached, and i try to import it in excel upload it puts everything into the first culumn

[attachment cleanup by admin]

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #50 on: June 26, 2007, 19:30:41 pm »
I have no problem uploading your file, though the text doesn't show properly maybe because of a different encoding.
Probably you are having problems of the charset. What encoding are you using?

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.

Shaun

  • Beginner
  • *
  • Posts: 2
Re: Adding Excel File Upload option to product_csv module
« Reply #51 on: June 27, 2007, 02:48:56 am »
Hi Joseph

When I try to upload an excel file, I'm getting the following error...

Quote
Fatal error: Cannot instantiate non-existent class: spreadsheet_excel_reader
in administrator/components/com_virtuemart/classes/ps_xls.php on line 62

I've been using portals for years, but only just recently decided to start to learn php. I've taken a look through the file, but it still means nothing to me.

Do you know what I could have done wrong? Thanks in advance for your help

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #52 on: June 27, 2007, 03:51:58 am »
That usually means you haven't include the required file excel/reader.php or it is not found. However, the file is designated as require already at the top of the file. If the file is not found, php should already give you an error. So I feel somewhat strange.

Anyway, check that the file excel/reader.php is there and that it contains the class spreadsheet_excel_reader. If not, you may have to copy it from the download file.

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.

Shaun

  • Beginner
  • *
  • Posts: 2
Re: Adding Excel File Upload option to product_csv module
« Reply #53 on: June 27, 2007, 17:00:18 pm »
Thanks Joseph

excel/reader.php was there in the structure, but didn't include the class. I downloaded speadsheet_excel_reader from (I think) sourceforge - which is attached to this post - and has now solved the problem.

The layout is now completely wrong (images covering the product name), but thats a post for a different section!! Thanks again

[attachment cleanup by admin]

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #54 on: June 27, 2007, 18:23:16 pm »
That's something strange. I've checked my download link. The reader file is there and it contains the class!
Anyway, if you update the product_full_image field, the image link of course will be wrong. By using CSV/XLS import, you have to do the image file upload manually.
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.

lipmat

  • Beginner
  • *
  • Posts: 45
Re: Adding Excel File Upload option to product_csv module
« Reply #55 on: June 29, 2007, 21:54:20 pm »
Function Not Registered. product_xls is not a valid MOS_com_phpShop function.
+
Invalid argument supplied for foreach() in ...administrator\components\com_virtuemart\html\product.mycsv.php on line 105
+
Invalid argument supplied for foreach() in ...administrator\components\com_virtuemart\html\product.mycsv.php on line 116


I've tried to upload an xls...
What does it mean?

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #56 on: June 29, 2007, 22:23:10 pm »
you need to add the function to the module list. see readme of the download.
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.

lipmat

  • Beginner
  • *
  • Posts: 45
Re: Adding Excel File Upload option to product_csv module
« Reply #57 on: July 01, 2007, 13:11:29 pm »
Could I export (and import) the content of jos_vm_product_type_1 table? When I chose from the possible fields non of them was this one. This table would be important because this contains the parameters of each product that can be found by the special search. So it would be really good if these values could be imported from the excel file with the products.
Now without this option when I import the xls I have to add product type for every single product and than every parameter of the product type has to be set manually from product to product. This would be much faster in excel.

Do you know any solution? Was I lame that I couldn't export these values?

thanks
lipmat

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #58 on: July 02, 2007, 00:43:26 am »
While I am not familiar with product type (I've never used it), it seems possible to upload product type, product type parameters and product type detail using the csv.
You may want to do some research/experiment with the these. The options can be set in CSV Import/Export Upload settings. Choose the appropriate upload in the select box.
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.

lipmat

  • Beginner
  • *
  • Posts: 45
Re: Adding Excel File Upload option to product_csv module
« Reply #59 on: July 02, 2007, 09:35:09 am »
I did so. But these options resulted empty columns (rather strange because sg should have been shown in these columns eg. the products' type or sg else...). That's why I think they're not the ones I need. Actually I think it's not so simple, because on exporting columns have to be automatically added to the pre-chosen ones because a php script has to find out in which product types is the product included (as far as i know more types can be selected for one product) and has to find out the number of options of each product type. This "number" columns will be added.

I'll try to do something about it...
(I'm a beginner at php programming so don't expect much... :) )