MLJman Posted December 18, 2004 Posted December 18, 2004 Hi, I am new at trying to set oscommerce and have been trying to find the code that will let me fix the width of my first two columns in the Product Listings in the normal rows format. They are Product Model and Product Name, but have been unable to find it. I guess it must be a "<td width = ...." somewhere. I have tried looking through the Forums for an answer, but with no success, so could someone be good enough to point me in the right direction. Thanks.
♥Vger Posted December 18, 2004 Posted December 18, 2004 Not sure what you mean by the 'first two columns' in Product Listings? By far the simplest way of fixing the width of columns overall is to fix the width of the site. If you fix the width of the site at 750, and your left and right column are defined at 150 each, then the columns in the main body of the page will total 450. The other td's you will need are to be found in index.php (the one in the root folder), and product_info.php esp. <?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 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); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } 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']; } ?> Vger
MLJman Posted December 18, 2004 Author Posted December 18, 2004 Not sure what you mean by the 'first two columns' in Product Listings? By far the simplest way of fixing the width of columns overall is to fix the width of the site. If you fix the width of the site at 750, and your left and right column are defined at 150 each, then the columns in the main body of the page will total 450. The other td's you will need are to be found in index.php (the one in the root folder), and product_info.php esp. <?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 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); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } 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']; } ?> Vger <{POST_SNAPBACK}> Thanks Vger for your suggestion, and I might go with the fixed width site, but I am only just begining to develope this site with oscommerce and it is the first two column widths in the main body that I want to fix. http://www.mlj.org.uk/catalog/index.php?cPath=21_22 I would like to be able to pull them closer together as in other categories the second column may not have anything in it and this would leave a rather large gap, so if the first two columns could have a fixed width it would not matter how wide the overall site was.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.