Webocreation

Wednesday, April 27, 2011

Errors Solved in the CSV import/export of opencart






Dear Rupak

I have a similar error to ialiendre's when I click on the export button:

Error: Table 'opn_j262cjfa6g.product' doesn't exist
Error No: 1146
SELECT * FROM `product` p inner join product_description pd on pd.product_id=p.product_id

Are you able to help me? I'm running v1.4.9.4 .

Thanks & best regards

-=============================================


The tip is that i forget to place the database prefix.

Change the following code

At model/tool/csvproduct.php replace with the codes

$query = "SELECT * FROM `". DB_PREFIX ."" . $table . "` p inner join ". DB_PREFIX ."product_description pd on pd.product_id=p.product_id";

at line no 21 or something like the $query

$query15 = "SELECT * from ". DB_PREFIX ."product_to_category ptc inner join ". DB_PREFIX ."category_description cd on cd.category_id=ptc.category_id where ptc.product_id=". $row['product_id'];

at line number 85 or something like the $query

$sql_query = "INSERT INTO ". DB_PREFIX ."product(product_id,model,quantity,price,list_price,image,stock_status_id,status,weight_class_id, length_class_id) VALUES";
$sql_query1 = "INSERT INTO ". DB_PREFIX ."product_description(product_id,name,description,language_id) VALUES";
$sql_query2 = "INSERT INTO ". DB_PREFIX ."product_to_store (product_id,store_id)VALUES";

at line no 159 to 161 or something like the $query

Thanking You

1 comment:

  1. Error: Table 'surecall_shop.product_option_description' doesn't exist
    Error No: 1146
    SELECT * from product_option_description where product_id=28

    Can you help I have put all changes in so far

    ReplyDelete