Manoil Posted May 11, 2008 Posted May 11, 2008 Hey guys, I need to put some product attributes in my product search. For example I have product ''A'' which has attribute ''1'' and I need in the search bar to choose this attribute ''1''... I hope you got my idea :blush: Thanks in advance for the help! Manoil
Guest Posted May 11, 2008 Posted May 11, 2008 You can try the following contribution: http://www.oscommerce.com/community/contributions,2337 This only adds the options to your Advanced Search page. If you want an information box with the options so they are on every page either PM or email me.
Manoil Posted May 11, 2008 Author Posted May 11, 2008 1054 - Unknown column 'p.products_id' in 'on clause' 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 = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id [TEP STOP] that happened when I updated these files... (think) PS Thanks for the fast reply IVUM :)
duranduran2 Posted May 12, 2008 Posted May 12, 2008 1054 - Unknown column 'p.products_id' in 'on clause' 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 = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id [TEP STOP] that happened when I updated these files... (think) PS Thanks for the fast reply IVUM :) I have the same error with mysql5
Guest Posted May 12, 2008 Posted May 12, 2008 This is a known issue with PHP5 and as far as am aware there is currently no fix, I have search all over this forum when I had this issue last week!
arietis Posted May 14, 2008 Posted May 14, 2008 This is a known issue with PHP5 and as far as am aware there is currently no fix, I have search all over this forum when I had this issue last week! look here for the fix: http://www.oscommerce.com/community/contributions,4654 it's been around for quite a while. :)
Guest Posted May 14, 2008 Posted May 14, 2008 That doesn't resolve this problem if I remember correctly, if someone could confirm it would be appreciated.
arietis Posted May 15, 2008 Posted May 15, 2008 That doesn't resolve this problem if I remember correctly, if someone could confirm it would be appreciated. i tested it before i posted yesterday. i took the sql from manoil's post and it failed. then i added the parenthesis as directed in the contribution and it worked. the contribution mentions two places in the code to make similar changes...there may be more (not to mention from other contributions) but it seemed to do the trick in my test. have you tried this yourself and if so, what error (if any) did you get?
Guest Posted May 16, 2008 Posted May 16, 2008 Am sorry, I thought we were referring to the error that I seem to get on the advanced search page and not the result page, the one I get on the advanced search page is below, this only happens with PHP5 and there doesn't seem to be a fix unless I am mistaken? 1054 - Unknown column 'pv.products_options_values_id' in 'on clause' select pv.products_options_values_id as id, pv.products_options_values_name as text from products_options_values pv, products_options po join products_options_values_to_products_options popv on (pv.products_options_values_id = popv.products_options_values_id) where popv.products_options_id = po.products_options_id and popv.products_options_id =1 and po.language_id =1 group by pv.products_options_values_id, products_options_values_name [TEP STOP]
arietis Posted May 17, 2008 Posted May 17, 2008 Am sorry, I thought we were referring to the error that I seem to get on the advanced search page and not the result page, the one I get on the advanced search page is below, this only happens with PHP5 and there doesn't seem to be a fix unless I am mistaken? well, the fix that i referred to was a simple matter of adding a couple sets of parenthesis. i bet if you add the parenthesis in similar places in this statement that will fix the problem. i don't have the code on this computer that i'm on right now so i can't test it. maybe you can give it a shot? :)
Guest Posted June 9, 2008 Posted June 9, 2008 Try replacing line 238 with: $option_values_query = tep_db_query('select pv.products_options_values_id as id, pv.products_options_values_name as text from ('. TABLE_PRODUCTS_OPTIONS_VALUES . ' pv, '. TABLE_PRODUCTS_OPTIONS .' po) join ' . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . ' popv on (pv.products_options_values_id = popv.products_options_values_id) where popv.products_options_id = po.products_options_id and popv.products_options_id =' . $attributes['products_options_id'] . ' and pv.language_id ='. (int)$languages_id . ' group by pv.products_options_values_id, products_options_values_name ORDER BY products_options_values_name ASC');
Recommended Posts
Archived
This topic is now archived and is closed to further replies.