Dennis_gull Posted October 15, 2006 Posted October 15, 2006 Hey, How do you put all the products in new_products.php in a frame. Now you see 9 products, 3 in each row but I would like to have them all separated, so its a line between each product. But im not sure how to do it. Would be glad if someone could help me out here.
bill110 Posted October 15, 2006 Posted October 15, 2006 Hey, How do you put all the products in new_products.php in a frame. Now you see 9 products, 3 in each row but I would like to have them all separated, so its a line between each product. But im not sure how to do it. Would be glad if someone could help me out here. Dont know if this will work for you because mine is only 1 product per row. catalog/products_new.php find <tr> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?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) . '</a>'; ?></td> <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"><b><u>' . $products_new['products_name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '<br><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> change to: <tr><tr> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" valign="top" class="main"><?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) . '</a>'; ?></td> <td valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new['products_id']) . '"><b><u>' . $products_new['products_name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . tep_date_long($products_new['products_date_added']) . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new['manufacturers_name'] . '<br><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><td colspan="3"><hr></td></tr> My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
Dennis_gull Posted October 15, 2006 Author Posted October 15, 2006 No line look like that :P This is how my new_product.php look like: <!-- new_products //--> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <?php echo mws_header2(BOX_HEADING_WHATS_NEW); ?> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); // new contentBoxHeading($info_box_contents); if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_name'] = tep_get_products_name($new_products['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))); $col ++; if ($col > 1) { $col = 0; $row ++; } } new noborderBox($info_box_contents); ?> </td> <?php echo mws_footer2(''); ?> </tr> </table> <!-- new_products_eof //--> I use a graphic border thats why it starts with mws_header2 and ends with footer2.
Dennis_gull Posted October 16, 2006 Author Posted October 16, 2006 hmm I have seen like 10 sites with a line between the new products cant someone share the code? :) and btw I might wanna have it like your box look like can you post the whole code to your new_products.php because the before line you posted is not the same as the one you got from oscommerce.
bill110 Posted October 17, 2006 Posted October 17, 2006 hmm I have seen like 10 sites with a line between the new products cant someone share the code? :) and btw I might wanna have it like your box look like can you post the whole code to your new_products.php because the before line you posted is not the same as the one you got from oscommerce. It will be a few days before I can post it. Had a business trip to go on and am now 500 miles from my PC. It is possible that mine is different but I do not remember changing it that much. however my shop is heavly modified. http://www.carolz-stylez.com My Contributions Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly Password Protect Admin "No matter where you go....There you are" - Buccaroo Bonsai
Dennis_gull Posted October 17, 2006 Author Posted October 17, 2006 Okay I'll wait :) Bah I just found the line sorry to bother you :rolleyes:
Dennis_gull Posted October 17, 2006 Author Posted October 17, 2006 Ahh the code you posted is for products_new.php but I wanted to change new_products.php its not the same file :)
Dennis_gull Posted October 20, 2006 Author Posted October 20, 2006 I just gonna bump this one more time because I would really like to get this on my site.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.