Jump to content

dtrain

Members
  • Content count

    14
  • Joined

  • Last visited

Profile Information

  • Real Name
    Dallas McIntosh
  1. dtrain

    Too many items

    Hi, I am trying to make my specials page similar to the rest of my website and it's link is here. Unfortunately it is adding an extra column instead of showing all the products in rows. The example is here. I have included the code below if anyone can help. I have gone through my other pages to try and see where I'm going wrong but must be missing something small. Cheers for the help in advance. <table border="0" width="100%" cellspacing="0" cellpadding="0" class="head_table"> <tr> <td class="pageHeading"><?php echo BOX_HEADING_SPECIALS;?></td> </tr> </table> <div style="height:9px;border:none;color:#2E2E2E;font-size:1px;" > </div> <table border="0" cellspacing="0" cellpadding="0" width="<?php echo $content; ?>"> <?php $specials_query_raw = "select p.products_id, pd.products_name, pd.products_description, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; $specials_split = new splitPageResults($specials_query_raw, MAX_DISPLAY_SPECIAL_PRODUCTS); if (($specials_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 $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> </td> </tr> <?php } ?> <tr> <td style="padding-left:15px"><table border="0" width="<?echo $content; ?>" cellspacing="0" cellpadding="0"> <tr> <?php $row = 0; $specials_query = tep_db_query($specials_split->sql_query); $specials = tep_db_fetch_array($specials_query); while ($specials) { $row++; echo '<td align="left" width="100%" class="specials" style="border-bottom:1px dotted #B2B2B2;> <div style="padding-bottom:10px"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' align="left" style="margin:0 15px 0 0px" class="small_image"') . '</a> </div> <div class="main"> <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '" class="zag_main"><b>' . $specials['products_name'] . '</b><br><br></a>' . tep_flatten_product_description($specials['products_description']) . '<br><br><b>' . '<div class="zag_pr_text" style="font-size:14px;">' . 'Price: ' . '<div class="item_price" style="text-align:left"><s>' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</s> ' . $currencies->display_price($specials['specials_new_products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . ' </div> </td>'; $specials = tep_db_fetch_array($specials_query); if ((($row / 2) == floor($row / 2)) && $specials) { ?> </tr> <tr> <td colspan="3"><?php echo tep_image(DIR_WS_IMAGES."spacer.gif",'',1,3); ?></td> </tr> <tr> <?php } else echo '<td height="1" colspan="3">'.tep_image(DIR_WS_IMAGES."spacer.gif",'',1,3).'</td>'; } ?> </tr> </table> </td> </tr> </table> <?php if (($specials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td><br> <?php echo tep_image(DIR_WS_IMAGES . 'main_line.gif'); ?> <table border="0" width="100%" cellspacing="8" cellpadding="2" class="number"> <tr> <td class="smallText"><?php echo $specials_split->display_count(TEXT_DISPLAY_NUMBER_OF_SPECIALS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $specials_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <?php } ?> </table>
×