g_p_java Posted September 15, 2010 Posted September 15, 2010 Hello, i would like to know which are the php files in oscommerce which select the products from the database. I would like to modify the queries which have to do with the products. May sm please tell me which are these files in order to modify them??? thanks, in advance!!!
Hotclutch Posted September 15, 2010 Posted September 15, 2010 Hello, i would like to know which are the php files in oscommerce which select the products from the database. I would like to modify the queries which have to do with the products. May sm please tell me which are these files in order to modify them??? thanks, in advance!!! product_info.php in the catalog directory.
g_p_java Posted September 15, 2010 Author Posted September 15, 2010 thanks for replying, i was studying that file too, As i can see in every query there is a statement like this "select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'" p.products_status = '1' that means that products which are out of stock are not displayed in the browser,right?? So, in my situation i would like to add sthg else like "select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and pd.products_name != ''" and pd.products_name != '' That means that if the products name == empty, that product is not going to be displayed at all Am i right??or am i thinking in a wrong way?? that's why i would like to find the queries which are related with the products and add that line everywhere thanks, in advance
markg-uk Posted September 15, 2010 Posted September 15, 2010 p.products_status = '1' checks if the product is enabled. Why would you have a product setup but not populate it's name field?
Hotclutch Posted September 15, 2010 Posted September 15, 2010 You could try an add-on like http://addons.oscommerce.com/info/7117 I don't make use of it, so can't vouch for it, but it sounds like it might do want you want.
g_p_java Posted September 15, 2010 Author Posted September 15, 2010 p.products_status = '1' checks if the product is enabled. Why would you have a product setup but not populate it's name field? in my oscommerce i have two languages,so whenever i insert a product, two entries are created in products tables in db, even if the second language's fields are empty. so i was thinking to have some conditions in the code like if(product's name == empty ) do not show the product else show the product is that a good way of thinking?? as far as the add on is concerned, it hides some products from specific customers not from specific languages thanks in advance
Recommended Posts
Archived
This topic is now archived and is closed to further replies.