SirNicholas Posted September 22, 2006 Posted September 22, 2006 The product_listing.php file in the modules directory looks like the table is dynamically created when displaying the products. How would I go about setting a column width? I'd like to force the columns to be specific widths instead of the width being determined by the data. Any help or direction would be great... Thanks, Ant
♥Monika in Germany Posted September 22, 2006 Posted September 22, 2006 The product_listing.php file in the modules directory looks like the table is dynamically created when displaying the products. How would I go about setting a column width? I'd like to force the columns to be specific widths instead of the width being determined by the data. Any help or direction would be great... Thanks, Ant Hi Ant, in your product_listing.php. you need to introduce a new parameter for width. Important: add the new parameter to each column, or the value of the column displayed next to it will be reused till there is a new value for override. here are the modifications in bold (you need to add the parameter to each!!!) case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_width = '300'; if (tep_get_topcategory_id($listing['products_id']) != SHOWROOM_TOPCAT_ID) { $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>?'; } else { $lc_text = '?'; } break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data" width="' . $lc_width . '"', 'text' => $lc_text); } } new productListingBox($list_box_contents); :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
SirNicholas Posted September 22, 2006 Author Posted September 22, 2006 Thank you very much Monika! I'll give it a go... :D Ant
SirNicholas Posted September 22, 2006 Author Posted September 22, 2006 That seems to do it! I'll have to work on the values to get it just right, but that's what I needed. Thanks Monika! If you were in the US I'd buy you dinner... :blush: Ant
♥Monika in Germany Posted September 22, 2006 Posted September 22, 2006 yvw ... I just saw that the unbolded part of my code was not vanilla, but I hope it didn't confuse you. :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.