Guest Posted February 20, 2005 Share Posted February 20, 2005 Hi, I have installed the Sm,Med,and Lg Images contribution and I am now encountering the following error when trying to access my catalog through Admin (haven't even gotten to the point of adding the additional pics): Parse error: parse error, unexpected ')' in /home/kboulet/public_html/store/admin/categories.php on line 296 I have looked for the obvious - a ')' that doesn't belong but if there is one, I am missing it. I added the Canada Post with dimensions contribution a while back and it works fine if I go back to that categories.php file (ie. pre-install of this contrib). After I add all the mods to this file, I get the above error which seems to be indicating a line ABOVE the first addition to the file - If I go back to the previous version of my file it is fine. Here is the code for the first mod of this file relating to this contrib (including a few lines above): [/code] $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_date_available' => $products_date_available, 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']), 'products_weight_type' => tep_db_prepare_input($HTTP_POST_VARS['products_weight_type']), 'products_dim_type' => tep_db_prepare_input($HTTP_POST_VARS['products_dim_type']), 'products_length' => tep_db_prepare_input($HTTP_POST_VARS['products_length']), 'products_height' => tep_db_prepare_input($HTTP_POST_VARS['products_height']), 'products_width' => tep_db_prepare_input($HTTP_POST_VARS['products_width']), 'products_ready_to_ship' => tep_db_prepare_input($HTTP_POST_VARS['products_ready_to_ship']), 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']), 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']), 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id'])); if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) { $sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']); } // big image mod starts // if (isset($HTTP_POST_VARS['products_mediumimage'])) { // if (tep_not_null($HTTP_POST_VARS['products_mediumimage']) && ($HTTP_POST_VARS['products_mediumimage'] != 'none')) { if (isset($HTTP_POST_VARS['products_mediumimage']) && tep_not_null($HTTP_POST_VARS['products_mediumimage']) && ($HTTP_POST_VARS['products_mediumimage'] != 'none')) { $sql_data_array['products_mediumimage'] = tep_db_prepare_input($HTTP_POST_VARS['products_mediumimage']); } elseif (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) { $sql_data_array['products_mediumimage'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']); } // if (isset($HTTP_POST_VARS['products_largeimage'])) { // if (tep_not_null($HTTP_POST_VARS['products_largeimage']) && ($HTTP_POST_VARS['products_largeimage'] != 'none')) { if (isset($HTTP_POST_VARS['products_largeimage']) && tep_not_null($HTTP_POST_VARS['products_largeimage']) && ($HTTP_POST_VARS['products_largeimage'] != 'none')) { $sql_data_array['products_largeimage'] = tep_db_prepare_input($HTTP_POST_VARS['products_largeimage']); } elseif (isset($HTTP_POST_VARS['products_mediumimage']) && tep_not_null($HTTP_POST_VARS['products_mediumimage']) && ($HTTP_POST_VARS['products_mediumimage'] != 'none')) { $sql_data_array['products_largeimage'] = tep_db_prepare_input($HTTP_POST_VARS['products_mediumimage']); } elseif (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) { $sql_data_array['products_largeimage'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']); } // big image mod ends [/code] Any help is appreciated!! Thanks, Kathy Quote Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2005 Share Posted February 20, 2005 start with line 285 and post thru to 205 Quote Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2005 Share Posted February 20, 2005 start with line 285 and post thru to 205 <{POST_SNAPBACK}> Did you mean 285 thru 305? I'm not sure so I have included 205 to 305 below. Also, just to make sure I'm counting correctly - I should count by actual line (ie. including blank lines; and lines of code that split between two or more lines would be counted as 2 or more)?Want to make sure I'm looking in the right place...thanks for looking! tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath)); break; case 'move_category_confirm': if (isset($HTTP_POST_VARS['categories_id']) && ($HTTP_POST_VARS['categories_id'] != $HTTP_POST_VARS['move_to_category_id'])) { $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']); $path = explode('_', tep_get_generated_category_path_ids($new_parent_id)); if (in_array($categories_id, $path)) { $messageStack->add_session(ERROR_CANNOT_MOVE_CATEGORY_TO_PARENT, 'error'); tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id)); } else { tep_db_query("update " . TABLE_CATEGORIES . " set parent_id = '" . (int)$new_parent_id . "', last_modified = now() where categories_id = '" . (int)$categories_id . "'"); if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&cID=' . $categories_id)); } } break; case 'move_product_confirm': $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']); $duplicate_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$new_parent_id . "'"); $duplicate_check = tep_db_fetch_array($duplicate_check_query); if ($duplicate_check['total'] < 1) tep_db_query("update " . TABLE_PRODUCTS_TO_CATEGORIES . " set categories_id = '" . (int)$new_parent_id . "' where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$current_category_id . "'"); if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $new_parent_id . '&pID=' . $products_id)); break; case 'insert_product': case 'update_product': if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) { $action = 'new_product'; } else { if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']); $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']); $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : ///// 'null'; $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_date_available' => $products_date_available, 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']), 'products_weight_type' => tep_db_prepare_input($HTTP_POST_VARS['products_weight_type']), 'products_dim_type' => tep_db_prepare_input($HTTP_POST_VARS['products_dim_type']), Quote Link to comment Share on other sites More sharing options...
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.