Post by mikejshaw » Wed Dec 23, 2009 5:00 pm

Hi!
Can't quite get the hang of this module. Do I need to fill in the Date/time stamp for the date added / modified / available fields? As NOW() or a made up time? Not having much luck. Keep on getting is error message:

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 ''9781841101675',0,'9781841101675.jpg',1,21.95,NOW(),NOW(),NOW(),0,1,1,9,0,0,0,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`,`measurement_class_id`) VALUES (116,1,'0','0',,'9781841101675',0,'9781841101675.jpg',1,21.95,NOW(),NOW(),NOW(),0,1,1,9,0,0,0,0,'1');
Any suggestions?
Cheers
Michael

Newbie

Posts

Joined
Sat Oct 24, 2009 1:06 pm
Location - Daylesford, Australia

Post by moggiex » Wed Dec 23, 2009 5:22 pm

Hi Michael,

I see your logic, but now() does not work, export a product and nick the date stamps off it, or use these two:

date_added = 2009-11-26 19:09:19
date_modified = 2009-11-30 23:51:01
date_available = 2009-12-20

Or alter the loader so that if those fields are null, for it to create the timestamp automatically for you.

Matt

Code: Select all

It was like that when I found it, honest!


User avatar
Active Member

Posts

Joined
Mon Nov 09, 2009 9:55 pm

Post by mikejshaw » Wed Dec 23, 2009 5:37 pm

So you're saying all three time stamps have to have a value?
Cheers

Newbie

Posts

Joined
Sat Oct 24, 2009 1:06 pm
Location - Daylesford, Australia

Post by JNeuhoff » Wed Dec 23, 2009 10:43 pm

mikejshaw wrote:So you're saying all three time stamps have to have a value?
Cheers
The 3 date fields are optional, if you don't specify them in the spreadsheet the Import will automatically use the NOW() function instead.

However, you forgot the specify the stock_status_id which is required, and whose values usually are

7 = In Stock
5 = Out Of Stock
6 = 2 - 3 Days

in a standard Opencart 1.3.4 database.

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


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by mikejshaw » Thu Dec 24, 2009 6:46 am

Thank you for the explication! Hopefully I'll have it sorted out by the time Santa's due down the chimney ... :)

Newbie

Posts

Joined
Sat Oct 24, 2009 1:06 pm
Location - Daylesford, Australia
Who is online

Users browsing this forum: No registered users and 16 guests