oldworldcharms Posted February 5, 2005 Share Posted February 5, 2005 (edited) I installed the Column listing contribution (link below) http://www.oscommerce.com/community/contributions,112 Following the directions: Copy the file product_listing_col.php into catalog/includes/modules/ directory In filenames.php add this new define. define('FILENAME_PRODUCT_LISTING_COL', 'product_listing_col.php'); Then in index.php search for FILENAME_PRODUCT_LISTING and change to FILENAME_PRODUCT_LISTING_COL. Everything worked good. What I would like to do is keep my categories in a single listing format but add a link to the catagories page to be able to view pictures and columns if the customer prefers. Can someone help me figure out how to do this. Your help is appreciated. Thanks Elizabeth http://www.oldworldcharms.net Edited February 5, 2005 by oldworldcharms Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 5, 2005 Share Posted February 5, 2005 Hi elizabeth, This might be a bit more tricky to be able to choose and keep this layout during the session. I'll have a look later it later today to see how extensive the changes are. I assume you want this when browsing categories and with the presentation of search results. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 5, 2005 Author Share Posted February 5, 2005 (edited) Hi Carine Thanks for taking a look. Yes I would like to be able to keep the single list catagory layout when browsing catagories but also with a link added to the catagories pages that will allow you to choose to view items in columns if you choose to browse this way instead. As far as this capability for search results the single column is fine. A good example of what I am hoping to be able to do is shown at the following single column catagory page which shows a single column but to the right top of this catagory page is a link called "Show Pictures Only" which shows the same catagories in columns with pictures and a short description. To be able to do this would be a very nice and another choice for a customer to browse Thanks Hi elizabeth, This might be a bit more tricky to be able to choose and keep this layout during the session. I'll have a look later it later today to see how extensive the changes are. I assume you want this when browsing categories and with the presentation of search results. <{POST_SNAPBACK}> Edited February 5, 2005 by oldworldcharms Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 5, 2005 Share Posted February 5, 2005 (edited) Just coded this on keukenlust.com add this to catalog/includes/languages/english/index.php ?define('TEXT_SHOW_COLUMNS','<b>Show in columns</b>'); ?define('TEXT_SHOW_LISTING','<b>Show as listing</b>'); Below if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { In catalog/index.php change ? ? ?<tr> ? ? ? ?<td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_COL); ?> ? ? ? ?</td> ? ? ?</tr> To ? ? ?<tr> ? ? ? ?<td class="main"><?php ? ? ? ?if ((isset($_GET['style'])) && ($_GET['style'] == 'listing') ) { ? ? ? ? ?echo '<a href="'.tep_href_link(basename($PHP_SELF), 'style=columns&'.tep_get_all_get_params(array('style')) ) .'">'. TEXT_SHOW_COLUMNS.'</a>'; ?> ? ? ? ? </td></tr><tr><td> <?php ? ? ? ? ? ? ? ? ?include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ? ? ? ?} else { ? ? ? ? ?echo '<a href="'.tep_href_link(basename($PHP_SELF), 'style=listing&'.tep_get_all_get_params(array('style')) ) .'">'. TEXT_SHOW_LISTING.'</a>'; ?> ? ? ? ? </td></tr><tr><td> <?php ? ? ? ? ? ? ? ? ?include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_COL); } ? ? ? ??> ? ? ? ?</td> ? ? ?</tr> As a result, the default is columns but you can change it to listing. Evidently, easy to change this around, and have the listing default. HTH Carine Edited February 5, 2005 by bruyndoncx Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 5, 2005 Author Share Posted February 5, 2005 (edited) Thank you so much Carine! Looks great on your site. I am going to try this now. Only thing, I'm have made several changes thanks to people helping with posting how to's and contributions but nothing in php is easy.... trying or struggling is a better word but can you please tell me how to make the columns the default? sorry :blush: Just coded this on keukenlust.com add this to catalog/includes/languages/english/index.php define('TEXT_SHOW_COLUMNS','<b>Show in columns</b>'); define('TEXT_SHOW_LISTING','<b>Show as listing</b>'); Below if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { In catalog/index.php change <tr> <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_COL); ?> </td> </tr> To <tr> <td class="main"><?php if ((isset($_GET['style'])) && ($_GET['style'] == 'listing') ) { echo '<a href="'.tep_href_link(basename($PHP_SELF), 'style=columns&'.tep_get_all_get_params(array('style')) ) .'">'. TEXT_SHOW_COLUMNS.'</a>'; ?> </td></tr><tr><td> <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); } else { echo '<a href="'.tep_href_link(basename($PHP_SELF), 'style=listing&'.tep_get_all_get_params(array('style')) ) .'">'. TEXT_SHOW_LISTING.'</a>'; ?> </td></tr><tr><td> <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_COL); } ?> </td> </tr> As a result, the default is columns but you can change it to listing. Evidently, easy to change this around, and have the listing default. HTH Carine <{POST_SNAPBACK}> Edited February 5, 2005 by oldworldcharms Quote Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 5, 2005 Author Share Posted February 5, 2005 (edited) With the columns listing it works great! thanks! I tried to switch the code so the single column is default but keep getting error messages :'( Thank you so much Carine! Looks great on your site. I am going to try this now. Only thing, I'm have made several changes thanks to people helping with posting how to's and contributions but nothing in php is easy.... trying or struggling is a better word but can you please tell me how to make the columns the default? sorry :blush: <{POST_SNAPBACK}> Edited February 5, 2005 by oldworldcharms Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 5, 2005 Share Posted February 5, 2005 Here you go ... To default to listing, use this piece of code <tr> <td class="main"><?php if ((isset($_GET['style'])) && ($_GET['style'] == 'columns') ) { echo '<a href="'.tep_href_link(basename($PHP_SELF), 'style=listing&'.tep_get_all_get_params(array('style')) ) .'">'. TEXT_SHOW_LISTING.'</a>'; ?> </td></tr><tr><td> <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_COL); } else { echo '<a href="'.tep_href_link(basename($PHP_SELF), 'style=columns&'.tep_get_all_get_params(array('style')) ) .'">'. TEXT_SHOW_COLUMNS.'</a>'; ?> </td></tr><tr><td> <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); } ?> </td> </tr> Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 5, 2005 Author Share Posted February 5, 2005 (edited) Thank you very much! This would be a great addition to your contribution. :thumbsup: Take a look! :) http://www.oldworldcharms.net/catalog/Redw...columns&sort=2a Here you go ... To default to listing, use this piece of code <tr> <td class="main"><?php if ((isset($_GET['style'])) && ($_GET['style'] == 'columns') ) { echo '<a href="'.tep_href_link(basename($PHP_SELF), 'style=listing&'.tep_get_all_get_params(array('style')) ) .'">'. TEXT_SHOW_LISTING.'</a>'; ?> </td></tr><tr><td> <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_COL); } else { echo '<a href="'.tep_href_link(basename($PHP_SELF), 'style=columns&'.tep_get_all_get_params(array('style')) ) .'">'. TEXT_SHOW_COLUMNS.'</a>'; ?> </td></tr><tr><td> <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); } ?> </td> </tr> <{POST_SNAPBACK}> Edited February 5, 2005 by oldworldcharms Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 5, 2005 Share Posted February 5, 2005 Thank you very much! This would be a great addition to your contribution. :thumbsup: Take a look! :) http://www.oldworldcharms.net/catalog/Redw...columns&sort=2a <{POST_SNAPBACK}> Thanks, glad it worked out. As for adding it to my contribution, you mean to add it to compare products ? or are you referring to the customization on the listing page, ie the possibility for the customer to select the number of items to show on single page? I also just tried to offer the switch on the products_new page, I already customize d it so I could just include the product_listing_col.php file, but looks for the listing format, i need to add a whole bunch of parameters that are set in index.php Oh well, another time ... one of these days, I'm gonna redirect products_new.php to index.php and add a flag to say, new ones only, ie sort desc by date added :D Why bother with a complete separate page ... Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 6, 2005 Author Share Posted February 6, 2005 (edited) I'm sorry I was thinking that the Products Listing In Columns was your contribution, it would be a great mod to add to it.. http://www.oscommerce.com/community/contributions,112 Now that I "finally" have been able to do this (thanks), of course one change leads to another so I need to change the column listing look just a little. My Column Listing Page 1. Would anyone know how I can get rid of the box around the images (class main) I tried changing the class but it will not take effect. 2. Get rid of price listing 3. The hard modification to this would be (hoping it is possible), sometimes my item names are long and if you take a look at the listing page you can see how the text goes way beyond the image. Column List Page Is it possible to restrict the text not to overrun and automatically go to the next line? 4. 1px image around border. I tried doing this the way I always add the border (described below) but it doesnt work, Or maybe my placement is wrong. 1px border around image add to css file /*border around images*/ .productInfoThumbnail {border: #898989 1px solid;} add to product info SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5" class="productInfoThumbnail"') . '</a>'; Thanks, glad it worked out. As for adding it to my contribution, you mean to add it to compare products ? or are you referring to the customization on the listing page, ie the possibility for the customer to select the number of items to show on single page? I also just tried to offer the switch on the products_new page, I already customize d it so I could just include the product_listing_col.php file, but looks for the listing format, i need to add a whole bunch of parameters that are set in index.php Oh well, another time ... one of these days, I'm gonna redirect products_new.php to index.php and add a flag to say, new ones only, ie sort desc by date added :D Why bother with a complete separate page ... <{POST_SNAPBACK}> Edited February 6, 2005 by oldworldcharms Quote Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 6, 2005 Author Share Posted February 6, 2005 Ok I made progress I was able to get a black border around the image by adding the css above and replacing the following code (includes/modules/product_listing_col.php) $lc_text= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH*1.1, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . $listing_values['products_name'] . '</a> With This code $lc_text= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing_values['products_image'], $listing_values['products_name'], SMALL_IMAGE_WIDTH*1.1, SMALL_IMAGE_HEIGHT, 'class="productInfoThumbnail"') . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing_values['products_id']) . '">' . $listing_values['products_name'] . '</a> You might have noticed that my images are larger. If you want the images larger directly after SMALL_IMAGE_WIDTH place a *1.1, this can be *1.5, or to make smaller *0.75, If you don't want to change the size remove the *1.1 from the above code hope that helps someone Quote Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 6, 2005 Author Share Posted February 6, 2005 Now all I need to do is get rid of the large box which is a class. Anybody know how? I figured a way to be able to control the text is maybe adding cellpadding but can't figure out where. Can someone tell me where this can be done? Quote Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 6, 2005 Author Share Posted February 6, 2005 Products Per Page Hi Carine Can you post the code for the customer to choose how many products per page? Thanks Elizabeth Now all I need to do is get rid of the large box which is a class. Anybody know how? I figured a way to be able to control the text is maybe adding cellpadding but can't figure out where. Can someone tell me where this can be done? <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 7, 2005 Share Posted February 7, 2005 here's the original thread for customer choice. http://www.oscommerce.com/forums/index.php?showtopic=100698&hl= As PVK points out, my changes are incompatible with fancy split page results, and dave points out that additional checks need to be done to ensure the code is secure. HTH Carine Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 8, 2005 Author Share Posted February 8, 2005 Hi Carine or anyone. Can you please tell me how can I change the column listing page to display 4 accross? Thanks Elizabeth here's the original thread for customer choice.http://www.oscommerce.com/forums/index.php?showtopic=100698&hl= As PVK points out, my changes are incompatible with fancy split page results, and dave points out that additional checks need to be done to ensure the code is secure. HTH Carine <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 9, 2005 Share Posted February 9, 2005 Sure, In catalog/includes/modules/product_listing_col.php you find this piece of code, where you just put the number of columns you want. Standard I think it's set at 3, I have 6 across. DEFINE('PRODUCT_LIST_COL_NUM',6); Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 9, 2005 Author Share Posted February 9, 2005 Thanks for answering my questions. I was able to find the column code from your last post but after seeing it decided to stay with 3 across. I don't know what the qualifications for contributions are but for some of us even small contributions help. Thank you for your help. Elizabeth Sure, In catalog/includes/modules/product_listing_col.php you find this piece of code, where you just put the number of columns you want. Standard I think it's set at 3, I have 6 across. DEFINE('PRODUCT_LIST_COL_NUM',6); <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 9, 2005 Share Posted February 9, 2005 you're welcome ! Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 10, 2005 Author Share Posted February 10, 2005 There is a strange glitch in this contribution. I have it set to 3 items across, if I don't have a 4th item in to start the next row the word productcol shows up. If I put a 4th item productcol dissapears. To see what I am talking about click here any idea's how to get rid of that? Thanks you're welcome ! <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 10, 2005 Share Posted February 10, 2005 I don't see the word productcol at all in my source, however looking at your sourcecode all css class declarations seem to be prepended with this word, so it must be something specific to your site. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 18, 2005 Author Share Posted February 18, 2005 (edited) Hi Carine Can you explain what you mean by this. "looking at your sourcecode all css class declarations seem to be prepended with this word" I looked around and cant seem to find where its coming from. I'm evidently looking in the wrong place. Where would you start looking? In case you forget what I am talking about look at the link below. Also is there anyway I could change the code to have the item start on the left instead of centered? http://oldworldcharms.net/decorative-antiq...columns&sort=2a Thanks I don't see the word productcol at all in my source, however looking at your sourcecode all css class declarations seem to be prepended with this word, so it must be something specific to your site. <{POST_SNAPBACK}> Edited February 18, 2005 by oldworldcharms Quote Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 18, 2005 Author Share Posted February 18, 2005 I have the new products contribution installed http://oldworldcharms.net/products_new.php But I cant find the code in the php file. Can someone help me add the column code to the products new page (listed above). The products_new.php code is below. <?php /* $Id: products_new.php,v 1.27 2003/06/09 22:35:33 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCTS_NEW); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCTS_NEW)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_products_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $products_new_array = array(); //rmh M-S_multi-stores edited next line $products_new_query_raw = "select p.products_id, pd.products_name, pd.products_short_description, p.products_image, p.products_price, p.products_tax_class_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id where p2s.stores_id = '" . STORES_ID . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"; $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW); if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ($products_new_split->number_of_rows > 0) { $products_new_query = tep_db_query($products_new_split->sql_query); while ($products_new = tep_db_fetch_array($products_new_query)) { if ($new_price = tep_get_products_special_price($products_new['products_id'])) { $products_price = '<s>' . $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($products_new['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($products_new['products_price'], tep_get_tax_rate($products_new['products_tax_class_id'])); } /* $product_query = tep_db_query("select p.products_id, pd.products_name, pd.products_short_description, p.products_image, p.products_price, p.products_tax_class_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id where p2s.stores_id = '" . STORES_ID . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name"); $product = tep_db_fetch_array($product_query); */ ?> <tr> <td width="<?php echo SMALL_IMAGE_WIDTH + 0 ; ?>"<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $products_new['products_image'], $products_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5" class="productInfoThumbnail"') . '</a>'; ?></td> <td valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"><b>' . $products_new['products_name'] . '</b></a>' .'<br>' . $products_new['products_short_description'] .'<br>' . TEXT_PRICE . ' ' . $products_price;?></td> <td align="right" valign="middle" class="main"><?php //echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td> </tr> <tr> <td colsp?an="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } } else { ?> <tr> <td class="main"><?php echo TEXT_NO_NEW_PRODUCTS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> </table></td> </tr> <?php if (($products_new_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <?php } ?> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 18, 2005 Author Share Posted February 18, 2005 I found the code that was causing the problem with the prodcol showing if 3 or less images are listed. If anyone else has the problem - code below $info_box_contents[] = array('text' => 'productcol'); //ditto Thanks Elizabeth Hi CarineCan you explain what you mean by this. "looking at your sourcecode all css class declarations seem to be prepended with this word" I looked around and cant seem to find where its coming from. I'm evidently looking in the wrong place. Where would you start looking? In case you forget what I am talking about look at the link below. Also is there anyway I could change the code to have the item start on the left instead of centered? http://oldworldcharms.net/decorative-antiq...columns&sort=2a Thanks <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 18, 2005 Author Share Posted February 18, 2005 Can anyone tell me how to limit the text on the first line of the item name so the text goes to the next line. See here how the text goes way past the image. http://oldworldcharms.net/antique-showcase...a&style=columns Thanks Elizabeth Quote Link to comment Share on other sites More sharing options...
oldworldcharms Posted February 19, 2005 Author Share Posted February 19, 2005 Is there a way to add sort by date added into this? I was able to sort by date in the listing file but not the column file (the code for the listing is below) $listing_sql .= " order by p.products_date_added desc"; or what looks like might be the entire sort code: if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; $listing_sql .= " order by p.products_date_added desc"; break; } } Thanks Elizabeth Quote Link to comment Share on other sites More sharing options...
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.