Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

flidais

Pioneers
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Real Name
    Jack

flidais's Achievements

  1. Error im getting looks like this: 1054 - Unknown column 'pa.products_id' in 'where clause' select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '4' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and m.manufacturers_id = '1' and ((pd.products_name like '1%' or p.products_model like '1%' or m.manufacturers_name like '1%') )and pa.products_id = p.products_id and pa.options_values_id in (1) And its showing when im trying to search using products attribution fields. And this one whem im using original "Advanced search with products attributes..." files 1064 - 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 'p left join manufacturers m using(manufacturers_id), products_description pd lef' at line 1 select count(distinct p.products_id) as total from (products) p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c,products_attributes pa where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '4' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and m.manufacturers_id = '1'and pa.products_id = p.products_id and pa.options_values_id in (1)
  2. Hello, Was anyone able to add "Advanced search with products attributes..." contribution to "product_attributes_option_type_3.0 (updated for OsCommerce RC2a)"? Im having problems with 1054 errors(only in advanced_search_result.php i think) when im trying to use this advanced search contribution, i did search the forum but all the fixes that are posted in here arent working for me. Could anyone help me with this please? Thats the part of the code i think is causing this problem: // ********************************************************************************************************* // ********************************************************************************************************* // This is the accompanying code to the advanced_search.php that allows for products to be searched on their // attributes through a drop down list box, it was done by adam, if it helps you perhaps you can help me by donating through paypal, my // email address is: [email protected] so that I can make more contributions // If you have a look up near line 214 there is an additional from_str that includes product attributes in the from list $attributes_query = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "'"); $option_value_selected = false; $products_stock_attributes_array = array(); while ($attributes = tep_db_fetch_array($attributes_query)) { if (isset($HTTP_GET_VARS[$attributes["products_options_id"]]) && !empty($HTTP_GET_VARS[$attributes["products_options_id"]])) $option_value_selected = true; } // the above while loop is to check to see if any values were selected if ($option_value_selected == true){ $attributes_query2 = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "'"); while ($attributes2 = tep_db_fetch_array($attributes_query2)) { if (isset($HTTP_GET_VARS[$attributes2["products_options_id"]]) && !empty($HTTP_GET_VARS[$attributes2["products_options_id"]])) { $str_selected_values = $str_selected_values . $HTTP_GET_VARS[$attributes2["products_options_id"]] . ','; } } $str_selected_values = substr($str_selected_values,0,strlen($str_selected_values) - 1); $where_str .= "and pa.products_id = p.products_id and pa.options_values_id in (".$str_selected_values.")"; // end of accompanying code to advanced_search_result.php that accompanies advanced_search.php // that will include all options_values_id that were selected // ********************************************************************************************************* // *********************************************************************************************************
×
×
  • Create New...