KPGroup Posted October 3, 2006 Posted October 3, 2006 Hello, I installed the "fixed prices" contribution (#4445) on MS2. I created a "fixed_prices" table in my database with the required fields. I now have as many price fields as I have currencies in the products pages in Admin. The problem is when I delete a product. I get an error that says: --------- 1146 - Table 'mydatabasenamehere.FIXED_PRICES' doesn't exist delete from FIXED_PRICES where product_id = '34' [TEP STOP] --------- When i return to the Admin and check, the product is no longer listed (deleted?). However when I check in the database in phpmyadmin, I still see a listing in the following tables: Fixed_prices Products products_descriptions Does anybody know why I have this error? And how come the listing is still in the tables but not visible in the store admin? The product also remains visible in my store. Thanks in advance for the help. Quote
KPGroup Posted October 3, 2006 Author Posted October 3, 2006 I re-checked just to be sure and I confirm that the table is defined in includes/database_tables.php and in admin/includes/database_tables.php What to do? Quote
KPGroup Posted October 3, 2006 Author Posted October 3, 2006 My problem might have to do with the table creation. The way i did it was to click on the SQL icon in phpmyadmin. I then typed the following in the SQL query window: ----------- CREATE TABLE `fixed_prices` ( `product_id` int( 11 ) NOT NULL default '0', `code` char( 3 ) NOT NULL default '', `products_price` decimal( 15, 2 ) NOT NULL default '0.00' ) TYPE = MYISAM ----------- And clicked on "GO". Please note there is no index defined. Quote
KPGroup Posted October 3, 2006 Author Posted October 3, 2006 I fixed it!!! For those interested, there is a mistake in the installation instructions. The last instructions are: In catalog/admin/includes/functions/general.php ####[ FIND ] ######################################################### tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "'"); ####[ REPLACE WITH ] ################################################### //Efface les prix du produit tep_db_query("delete from " . FIXED_PRICES . " where product_id = '" . (int)$product_id . "'"); tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "'"); It should read: ####[ FIND ] ######################################################### tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "'"); ####[ REPLACE WITH ] ################################################### //Efface les prix du produit tep_db_query("delete from " . TABLE_FIXED_PRICES . " where product_id = '" . (int)$product_id . "'"); tep_db_query("delete from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "'"); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.