Guest Posted June 12, 2005 Posted June 12, 2005 Hi, folks. Any help with this would be appreciated. I just loaded All Products 3.0a and I love it! What would make it just a little better for my store would be a tiny image or asterisk next to each item in stock. I will place notice at the top of the page to indicate any notes needed. Here's the pertinent bit of code that queries the db and posts the info: $products_query = tep_db_query("SELECT p.products_id, pd.products_name, pc.categories_id FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc WHERE p.products_id = pd.products_id AND p.products_id = pc.products_id AND p.products_status = 1 AND pd.language_id = FLOOR($languages_id) ORDER BY pc.categories_id, pd.products_name"); while($products = tep_db_fetch_array($products_query)) { echo " <tr>\n" . ' <td width="33%" class="pageheading"><h1>' . (($memory == $products['categories_id'])? '': $cat_info[$products['categories_id']]['link']) . "</h1></td>\n" . ' <td class="pageheading"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'] . (($language_code == DEFAULT_LANGUAGE) ? '' : ('&language=' . $language_code))) . '"><h1>' . $products['products_name'] . "</h1></a></td>\n" . " </tr>\n"; $memory = $products['categories_id']; } ?> </table></td> </tr> <tr> What I'd like is something like if product_quantity is > 0, show image check.jpg or something like that. I know it needs to be pulled as product_quantity in the product query and needs the if statement, but my coding ability is truly limited. Any thoughts? 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.