Post by JNeuhoff » Thu Apr 14, 2011 8:15 pm

SupraTwinTurbo wrote:Hi JNeuhoff,

Thanks for your awesome module. I installed and exported my store. Then, I added 2 more products, but when I imported the new XLS file, the product tags for all the products disappear. I double checked the file and the product tag column looks fine to me; it just does not seem to be working. I PMed you the XLS file I used to upload, I hope you can take a look for me.

Thank you,

SupraTT
Thank you for your feedback. I can confirm that the tags are indeed not imported to the DB, will fix this bug.

P.S. I have now fixed it, try the latest version for 1.4.9.x from http://www.mhccorp.com/opencart/export-import-tool

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by daledude » Fri Apr 15, 2011 7:31 am

I've made some slight modifications to the Export/Import tool, primarily because I wanted to add in five extra fields. I've done that successfully, and I can edit the fields in the Product area in the backend, and when I export the spreadsheet it contains my additional fields and their data. But when I re-upload the spreadsheet, I get this error:

Code: Select all

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''felina',0,'data/felina-parchment-500x500.jpg',1,0,'2011-04-05 20:46:41','2011-0' at line 1
Error No: 1064
INSERT INTO `product` (`product_id`,`quantity`,`sku`,`location`,`stock_status_id`,`model`,`manufacturer_id`,`image`,`shipping`,`price`,`date_added`,`date_modified`,`date_available`,`weight`,`weight_class_id`,`status`,`tax_class_id`,`viewed`,`length`,`width`,`height`,`length_class_id`,`cleaning_code`,`repeat_dir`,`xroll_dir`,`fabric_dir`,`roll_width`,`sort_order`,`subtract`,`minimum`,`cost`) VALUES (1,0,'','',,'felina',0,'data/felina-parchment-500x500.jpg',1,0,'2011-04-05 20:46:41','2011-04-05 20:46:41','2011-04-05',0,5,1,0,0,0,0,0,'3',0,0,0,0,0,'0','0','0',2,3);
The additional fields I added are cleaning_code, repeat_dir, xroll_dir, fabric_dir, and roll_width.

Is there anyone that can take a look and tell me what I'm missing? I'm assuming it's a comma or apostrophe or something that is either missing or not where it's supposed to be. I've attached my entire /admin/model/tool/export.php.

Thanks!

New member

Posts

Joined
Thu Dec 17, 2009 1:30 am

Post by SupraTwinTurbo » Fri Apr 15, 2011 4:00 pm

JNeuhoff wrote: Thank you for your feedback. I can confirm that the tags are indeed not imported to the DB, will fix this bug.

P.S. I have now fixed it, try the latest version for 1.4.9.x from http://www.mhccorp.com/opencart/export-import-tool
You are welcome JNeuhoff. I just tested the new version and it works now. Thank you!

User avatar
New member

Posts

Joined
Thu Mar 24, 2011 12:43 pm
Location - NYC, NY USA

Post by JNeuhoff » Fri Apr 15, 2011 5:03 pm

The additional fields I added are cleaning_code, repeat_dir, xroll_dir, fabric_dir, and roll_width.

Is there anyone that can take a look and tell me what I'm missing? I'm assuming it's a comma or apostrophe or something that is either missing or not where it's supposed to be. I've attached my entire /admin/model/tool/export.php.
In method uploadProducts you need to make sure to access the cells using the correct column indexes:

Code: Select all

			.....
			$productId = trim($this->getCell($data,$i,1));
			if ($productId=="") {
				continue;
			}
			$name = $this->getCell($data,$i,2);
			$name = htmlentities( $name, ENT_QUOTES, $this->detect_encoding($name) );
			$categories = $this->getCell($data,$i,3);
			$sku = $this->getCell($data,$i,4,'0');
			$location = $this->getCell($data,$i,5,'0');
			$quantity = $this->getCell($data,$i,6,'0');
			$model = $this->getCell($data,$i,7,'   ');
			$manufacturer = $this->getCell($data,$i,8);
			$imageName = $this->getCell($data,$i,9);
			$shipping = $this->getCell($data,$i,10,'yes');
			$price = $this->getCell($data,$i,11,'0.00');
			$dateAdded = $this->getCell($data,$i,12);
			$dateAdded = ((is_string($dateAdded)) && (strlen($dateAdded)>0)) ? $dateAdded : "NOW()";
			$dateModified = $this->getCell($data,$i,13);
			$dateModified = ((is_string($dateModified)) && (strlen($dateModified)>0)) ? $dateModified : "NOW()";
			$dateAvailable = $this->getCell($data,$i,14);
			$dateAvailable = ((is_string($dateAvailable)) && (strlen($dateAvailable)>0)) ? $dateAvailable : "NOW()";
			$weight = $this->getCell($data,$i,15,'0');
			$unit = $this->getCell($data,$i,16,$defaultWeightUnit);
			$length = $this->getCell($data,$i,17,'0');
			$width = $this->getCell($data,$i,18,'0');
			$height = $this->getCell($data,$i,19,'0');
			$measurementUnit = $this->getCell($data,$i,20,$defaultMeasurementUnit);
			$cleaning_code = $this->getCell($data,$i,21);
			$repeat_dir = $this->getCell($data,$i,22,'0');
			$xroll_dir = $this->getCell($data,$i,23,'0');
			$fabric_dir = $this->getCell($data,$i,24,'0');
			$roll_width = $this->getCell($data,$i,25,'0');
			$status = $this->getCell($data,$i,26,'true');
			$taxClassId = $this->getCell($data,$i,27,'0');
			$viewed = $this->getCell($data,$i,28,'0');
			$langId = $this->getCell($data,$i,29,'1');
			if ($langId!=$languageId) {
				continue;
			}
			$keyword = $this->getCell($data,$i,30);
			$description = $this->getCell($data,$i,31);
			$description = htmlentities( $description, ENT_QUOTES, $this->detect_encoding($description) );
			$meta_description = $this->getCell($data,$i,32);
			$meta_description = htmlentities( $meta_description, ENT_QUOTES, $this->detect_encoding($meta_description) );
			$meta_keywords = $this->getCell($data,$i,33);
			$meta_keywords = htmlentities( $meta_keywords, ENT_QUOTES, $this->detect_encoding($meta_keywords) );
			$additionalImageNames = $this->getCell($data,$i,34);
			$stockStatusId = $this->getCell($data,$i,35,$defaultStockStatusId);
			$storeIds = $this->getCell($data,$i,36);
			$related = $this->getCell($data,$i,37);
			$tags = $this->getCell($data,$i,38);
			$sort_order = $this->getCell($data,$i,39,'0');
			$subtract = $this->getCell($data,$i,40,'true');
			$minimum = $this->getCell($data,$i,41,'1');
			$cost = $this->getCell($data,$i,42,'0.00');
			......

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by daledude » Fri Apr 15, 2011 11:08 pm

JNeuhoff wrote:
In method uploadProducts you need to make sure to access the cells using the correct column indexes
Hahahaha WOW how did I miss that... Repeating numbers definitely won't work.

I made that change, and now the error is:

Code: Select all

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0,0,0,0,'1','1','1',0)' at line 1
Error No: 1064
INSERT INTO `product` (`product_id`,`quantity`,`sku`,`location`,`stock_status_id`,`model`,`manufacturer_id`,`image`,`shipping`,`price`,`date_added`,`date_modified`,`date_available`,`weight`,`weight_class_id`,`status`,`tax_class_id`,`viewed`,`length`,`width`,`height`,`length_class_id`,`cleaning_code`,`repeat_dir`,`xroll_dir`,`fabric_dir`,`roll_width`,`sort_order`,`subtract`,`minimum`,`cost`) VALUES (1,0,'','',5,'felina',0,'data/felina-parchment-500x500.jpg',1,0,'2011-04-05 20:46:41','2011-04-05 20:46:41','2011-04-05',0,5,1,0,0,0,0,0,'3',,0,0,0,0,'1','1','1',0);
I'm not very knowledgeable in MySQL... but I know I'm so close... Here is a screenshot of the products table if that helps...?
http://img810.imageshack.us/i/products.png/

I thought it may be because I have a '0' after each of the new fields, like:

Code: Select all

$repeat_dir = $this->getCell($data,$i,22,'0');
Which I assume corresponds to a default value, even though in the img above there is no default value in the table, but I deleted the , '0's out and it gave the same error but with just commas instead of 0,...

Code: Select all

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,'1','1','1',0)' at line 1
Can't quite wrap my head around what's wrong!

New member

Posts

Joined
Thu Dec 17, 2009 1:30 am

Post by JNeuhoff » Sat Apr 16, 2011 5:27 am

Looks like your 2nd product doesn't have values in the spreadsheet for the new fields. If you want to make them optional then you must ensure that the Import uses appropriate default values in the getCell calls, e.g.

$cleaning_code = $this->getCell($data,$i,21,0);

instead of

$cleaning_code = $this->getCell($data,$i,21);

I assume your cleaning_code is a numeric value.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by daledude » Sat Apr 16, 2011 6:58 am

JNeuhoff wrote:Looks like your 2nd product doesn't have values in the spreadsheet for the new fields. If you want to make them optional then you must ensure that the Import uses appropriate default values in the getCell calls, e.g.

$cleaning_code = $this->getCell($data,$i,21,0);

instead of

$cleaning_code = $this->getCell($data,$i,21);

I assume your cleaning_code is a numeric value.
Ahh, I see. Adding the zero in allowed me to type 12345 into cleaning_code and it uploaded successfully! Thanks!

I haven't tried the others yet, but they would have letter-based or alphanumeric values. I haven't got to test it but I assume I have to use one of the ones that has htmlentities as a base for that... either that or the one for model with ' ' as the value.

New member

Posts

Joined
Thu Dec 17, 2009 1:30 am

Post by daledude » Thu Apr 21, 2011 11:33 pm

daledude wrote:Ahh, I see. Adding the zero in allowed me to type 12345 into cleaning_code and it uploaded successfully! Thanks!

I haven't tried the others yet, but they would have letter-based or alphanumeric values. I haven't got to test it but I assume I have to use one of the ones that has htmlentities as a base for that... either that or the one for model with ' ' as the value.
Just for reference, anybody else who may try this, using

Code: Select all

$database->escape($product[# here]);
in the foreach ($products as $product) area fixed everything for the custom columns I made with the SQL errors. Everything works wonderfully. Thanks for the great tool and the help, JNeuhoff. 8)

New member

Posts

Joined
Thu Dec 17, 2009 1:30 am

Post by renegade » Sat Apr 23, 2011 2:53 am

Hi, JNeuhoff!

First of all, thanks for putting this tool together. I followed the installation instructions and got it to work properly in the English language, and that was great. My only problem now is that I would like to leave the website with a Portuguese-only front-end. I deleted everything from the website and database and started over, this time inserting your modifications and files in portuguese-related directories (when applicable), among other ideas, but unfortunately I could never make the "tool/export" appear to my Top Administrator.

So my question is: Is there a quick way to make it work in a website in Portuguese only? Should I have deleted the English language altogether before installing the app? (I left is disabled when I tried to install in Portuguese).

Thank you bunches for your help and advice, and congratulations on this most invaluable extension. I plan on making money with the online store, so I promise to donate as soon as I get the ball rolling!

Best regards from Brazil,

Renegade

Newbie

Posts

Joined
Sat Apr 23, 2011 2:42 am

Post by JNeuhoff » Sat Apr 23, 2011 6:43 am

It uses the language set in yourAdmin backend at

System > Settings > Local > Language

which I understand it to be the frontend language.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by raoulpop » Mon Apr 25, 2011 2:48 am

I'd really appreciate some usage instructions for this plugin. I've installed it according to your instructions (vQMod is pre-installed), and I see no Import or Export option anywhere in the Admin pages. (Yes, I've enabled it on the user group page.) I don't know where else to look. Please help.

Newbie

Posts

Joined
Mon Apr 25, 2011 2:44 am

Post by Rbq » Mon Apr 25, 2011 5:42 am

Hi.
I'm new here, so hello all. I have problem with export, error.

Fatal error: require_once() [function.require]: Failed opening required 'Spreadsheet/Excel/Writer.php' (include_path='.:/usr/local/php52/lib/php/') in /home/NAME/domains/MY DOMAIN/public_html/admin/model/tool/export.php on line 1691

Please help.
Thanks.

Rbq
Newbie

Posts

Joined
Mon Apr 25, 2011 4:39 am

Post by JNeuhoff » Mon Apr 25, 2011 8:00 pm

raoulpop wrote:I'd really appreciate some usage instructions for this plugin. I've installed it according to your instructions (vQMod is pre-installed), and I see no Import or Export option anywhere in the Admin pages. (Yes, I've enabled it on the user group page.) I don't know where else to look. Please help.

Send me a PM with your Opencart and FTP login details, and I can take a look at it this week.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Mon Apr 25, 2011 8:04 pm

Rbq wrote:Hi.
I'm new here, so hello all. I have problem with export, error.

Fatal error: require_once() [function.require]: Failed opening required 'Spreadsheet/Excel/Writer.php' (include_path='.:/usr/local/php52/lib/php/') in /home/NAME/domains/MY DOMAIN/public_html/admin/model/tool/export.php on line 1691

Please help.
Thanks.
Looks like something hasn't been correctly installed on your server. In particular, make sure you have the system/pear folder with all its subfolders and files correctly installed on your server.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Rbq » Tue Apr 26, 2011 1:36 am

Okey. I reaper error. That was easy, just change cod from errors lins from BIG to small(File to file). But now I have problem with import file.

Fatal error: require_once() [function.require]: Failed opening required 'Classes/PHPexcel.php' (include_path='.:/usr/local/php52/lib/php/') in /home/NAME/domains/MY DOMAIN/public_html/admin/model/tool/export.php on line 1169

I suppose bad source but I have no idea how to change to good one.

thanks.

Rbq
Newbie

Posts

Joined
Mon Apr 25, 2011 4:39 am

Post by renegade » Tue Apr 26, 2011 2:53 am

JNeuhoff wrote:It uses the language set in yourAdmin backend at

System > Settings > Local > Language

which I understand it to be the frontend language.
Juergen, thanks for the response! Brother, I have just attempted a clean install (DB + OpenCart), in which I even completely removed the English language e left only the Brazilian Portuguese one (for both the Back-end and Front-end), and when installing the tool, I did so on the following directories and files:

admin/controller/common/header.php
admin/language/portuguese-br/common/header.php
admin/view/template/common/header.tpl

And yet the tool/export option never appears, but the interesting thing is that if I do a clean install with the English language only, then it works! Curiously, if there is any other language installed, then the language options on the backend will cease to be able to change the frontend language, so that whatever language was set prior to running the tool, that's what will be there (forever?). Have any idea what might be going on?

Appreciate your super-help, Juergen!!!

Newbie

Posts

Joined
Sat Apr 23, 2011 2:42 am

Post by renegade » Tue Apr 26, 2011 2:28 pm

I figured out a [filthy-but-functional] workaround: just overwrote the english directories with the brazilian portuguese files. Working beautifully now! ;)

Newbie

Posts

Joined
Sat Apr 23, 2011 2:42 am

Post by JNeuhoff » Tue Apr 26, 2011 5:46 pm

renegade wrote:I figured out a [filthy-but-functional] workaround: just overwrote the english directories with the brazilian portuguese files. Working beautifully now! ;)
In your database, what's the value for your config_language in your settings table?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Rbq » Sun May 01, 2011 10:28 pm

Anyone could help me with this import error?

Fatal error: require_once() [function.require]: Failed opening required 'Classes/PHPexcel.php' (include_path='.:/usr/local/php52/lib/php/') in /home/NAME/domains/MY DOMAIN/public_html/admin/model/tool/export.php on line 1169

Rbq
Newbie

Posts

Joined
Mon Apr 25, 2011 4:39 am

Post by ercanermis » Tue May 03, 2011 4:34 am

Hi,

First of all many thanks to the module, who have contributed ...

My question or rather cross the problem. A lot of products supplied by the manufacturer with both the $ and the € available, but we have to sell them on the basis of TL. Suddenly it gave a different product, different exchange rate based on TL and 2000 to enforce a number of pieces, such as Excel, to make changes to the product must have the olduğmuzda. Price column, and euro_kuru dolar_kuru next two columns to create a more comfortable way so I can update the daily exchange, but how it can import? Import errors while I receive so crazy. In addition, price column of the Excel formula used, it is a loss, will you? What would you recommend me?

Thank you.

My Error:

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'n Prop CF061')' at line 1
Error No: 1064
INSERT INTO `product_image` (`product_image_id`, product_id, `image`) VALUES (493,492,'Pop'n Prop CF061');

Newbie

Posts

Joined
Mon Mar 07, 2011 11:47 pm
Who is online

Users browsing this forum: No registered users and 8 guests