Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
Anjula
Anjula
Brief
We have updated the file 'admin_import.php' for version 3.6.
 
Description
We've rewritten the import logic when it is used with item and manufacturer codes matching options to the following:
- in case an Item ID field value is available for some record, then all other codes fields are ignored and the record is matched with only one field.
- in case there is no Item ID value we search if there are any data available for fields item code and/or manufacturer code and if there are some data, we use one or both field to match the record.
 
Solution
We would recommend you to download an updated version of the file from here:
http://www.viart.com/downloads/admin_import-3.6.zip
 
Further, extract the above mentioned file into the 'admin' folder of your shop. Do not forget to make a backup copy of the current file in case something goes wrong.
Last modified: 22 Jun 2009 12:02 PM
 
Mediadot
Mediadot
Oh my God! You are Incredible!
 
I've just told some days ago, that this custom coding was not perfectly what I wanted. And You done it in 2-3 days.
 
I'll keep the recommend Viart sys (and SUPPORT!) for others in Hungary! :)
 
Bests,
Laszlo
 
Ljuter (Guest)
Ljuter (Guest)
Database error: Invalid SQL: INSERT INTO va_items (item_id,user_id,is_showing,is_approved,item_code,item_order,item_type_id,language_code,price,is_price_edit,properties_price, trade_properties_price,is_sales,sales_price,trade_price,trade_sales,is_special_offer,use_stock_level,hide_out_of_stock,disable_ out_of_stock,is_recurring,total_views,google_base_type_id,admin_id_added_by,admin_id_modified_by,date_added,date_modified,item_ name,buying_price,is_compared) VALUES (1,0,1,1,'2',1,1,'ru',49,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,1,'2009-05-03 15:11:27','2009-05-03 15:11:27','ASROCK N68-S AM2/AM2+ GeForce 7025 / nForce 630a, DDR2, int VGA, PCI-E, SATAII, Lan, mATX',44,1)
MySQL Error: Duplicate entry '1' for key 1
 
Ljuter (Guest)
Ljuter (Guest)
Old text in admin_import.php:
if (!$is_where_set) {
$sql = "SELECT MAX(" . $table_pk . ") FROM " . $table_name . "";
$db->query($sql);
$db->next_record();
$max_id = $db->f(0);
Text in patch file admin_import.php:
if ($r->is_empty($table_pk)) {
$sql = "SELECT MAX(" . $table_pk . ") FROM " . $table_name ;
$max_id = get_db_value($sql);
Result:
Database error: Invalid SQL: INSERT INTO va_items (item_id,user_id,is_showing,is_approved,item_code,item_order,item_type_id,language_code,price,is_price_edit,properties_price, trade_properties_price,is_sales,sales_price,trade_price,trade_sales,is_special_offer,use_stock_level,hide_out_of_stock,disable_ out_of_stock,is_recurring,total_views,google_base_type_id,admin_id_added_by,admin_id_modified_by,date_added,date_modified,item_ name,buying_price,is_compared) VALUES (1,0,1,1,'2',1,1,'ru',49,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,1,'2009-05-03 15:11:27','2009-05-03 15:11:27','ASROCK N68-S AM2/AM2+ GeForce 7025 / nForce 630a, DDR2, int VGA, PCI-E, SATAII, Lan, mATX',44,1)
MySQL Error: Duplicate entry '1' for key 1
 
Five5
Five5
I am also getting the database error. Is there a fix required and available yet?
Last modified: 7 May 2009 11:59 AM
 
bob (Guest)
bob (Guest)
Check your data base table structure , it sounds like you are missing the auto increment function in your table structure.
 
Five5
Five5
Thanks bob. But va_items does have auto-increment set for primary key item_id field.