kittidid Posted July 31, 2004 Posted July 31, 2004 In catalog/product_info.php The requested code to change is: <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id " . 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 . "'"); $product_info = tep_db_fetch_array($product_info_query); and change to <?php } else { $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_availability_id 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 . "'"); $product_info = tep_db_fetch_array($product_info_query); ___________________________________________________________________ My code in catalog/product_info.php page: $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image" . $new_fields_mo_pics . ", pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id " . $new_fields . " from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); If you noticed, my code is quite different. How do I edit my part of the code to reflect the product availibility code? Kitti Quote
kittidid Posted July 31, 2004 Author Posted July 31, 2004 (edited) Then in the same catalog/product_info.php page the requested code addition is: Find this code: if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } and add this immediately after it: $products_availability = $product_info['products_availability_id']; $products_availability_info_query = tep_db_query("select e.products_availability_name from " . TABLE_PRODUCTS_AVAILABILITY . " e where e.products_availability_id = '" . (int)$products_availability . "' and e.language_id = '" . (int)$languages_id . "'"); $products_availability_info = tep_db_fetch_array($products_availability_info_query); $products_availability_name = $products_availability_info['products_availability_name']; I do not have the first code in this page anywhere. I did a search and no go. So I really don't know where to add the second code. The only thing I see that even comes close in my page is: <td colspan="2" align="left"> <span class="pageHeading"><?php echo $product_info['products_name'] . '<br />'; ?></span> <span class="main"><?php echo (SHOW_PRODUCT_MODEL_PRODUCT_INFO =='1' ? PRODUCT_MODEL . ' ' . $product_info['products_model'] . '<br />' : ''); ?></span> <span class="main3"><?php echo PRODUCT_WEIGHT . ' ' . $product_info['products_weight'] . '<br />'; ?></span> <?php include(DIR_WS_INCLUDES . 'products_price_table_retail.php'); ?></td> Kitti Edited July 31, 2004 by kittidid 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.