Wizbits Posted August 14, 2010 Posted August 14, 2010 Please can someone take a quick look and point me in the right direction..., If you go to my website..., www.wizbits.biz you will see on the front page only 6 product listings instead of 10. The right hand column only shows one listing instead of 5. How can I change this to show all 10? Thanks Andy
Guest Posted August 14, 2010 Posted August 14, 2010 Andy, If you check the maximum values under new products module I am willing to bet it is set to 6 and not 10. Chris
Wizbits Posted August 14, 2010 Author Posted August 14, 2010 I checked that - I do not have this module available in OS Commerce - or if I do I can not locate where it should be? Maybe I need to add this module?
Guest Posted August 14, 2010 Posted August 14, 2010 Andy, No, the new products module comes with osCommerce and displays the newest items on your front page. Currently you are displaying 6 new products, and you want to increase that to 10........you need to change that from the administration area under maximum values, new products module. Chris
Wizbits Posted August 14, 2010 Author Posted August 14, 2010 Okay found it.., I have the following but no change to the site!! Maximum Values Title Value Action Address Book Entries 5 Search Results 20 Page Links 5 Special Products 9 New Products Module 10 Products Expected 10 Manufacturers List 0 Manufacturers Select Size 1 Length of Manufacturers Name 15 New Reviews 6 Selection of Random Reviews 10 Selection of Random New Products 10 Selection of Products on Special 10 Categories To List Per Row 3 New Products Listing 10 Best Sellers 10 Also Purchased 6 Customer Order History Box 6 Order History 10 Product Quantities In Shopping Cart 99 Address Book Entries Maximum address book entries a customer is allowed to have Date Added: 01/30/2010
Guest Posted August 14, 2010 Posted August 14, 2010 Andy, Unfortunately without seeing the code, it would be hard to determine what else could be affecting the new products module. Chris
Wizbits Posted August 14, 2010 Author Posted August 14, 2010 Okay what page exactly - is it the product_info.php or index.php or another - I will cut & paste and display Thanks Andy
Guest Posted August 14, 2010 Posted August 14, 2010 Andy, You will find the file in includes/modules as new_products.php Chris
Wizbits Posted August 15, 2010 Author Posted August 15, 2010 <!-- new_products //--> <?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']); $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$new_products['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $new_products['products_description'] = $product['products_description']; if(($row%3)<>0) { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'colspan="3" valign="top" height="1" ', 'text' => tep_image(DIR_WS_IMAGES . 'spacer.gif') ); $row++; } $info_box_contents[$row][$col] = array('align' => 'left', 'params' => 'class="smallText" width="100%" valign="top"', 'text' => ' <table align="center" width="234" border="0" cellspacing="0" cellpadding="0" style="border-style:solid; border-width:1px; border-color:#f9f9f9; margin:0px 0px 14px 0px; "> <tr> <td align="center" style="background-image:url(images/grad300.jpg); background-repeat:no-repeat "><table width="90%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="13" align="left" valign="top"></td> </tr> <tr> <td height="25" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr align="left" valign="top"> <td><span class="NameProd">' . $new_products['products_name'] . '</span></td> <td width="85"><span class="Price">' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])) . '</span></td> </tr> </table></td> </tr> <tr> <td height="80" align="left" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr align="left" valign="top"> <td width="100"><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></td> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="48" align="left" valign="top"><span class="Date">' . preg_replace('/\s\S*$/i', '', substr($new_products['products_description'], 0, 55)) . '...</span></td> </tr> <tr> <td height="18" align="left" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image_button('lyly1.gif') . '</a></td> </tr> <tr> <td align="left" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '">' . tep_image_button('lyly2.gif', IMAGE_BUTTON_IN_CART) . '</a></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="10" align="left" valign="top"></td> </tr> </table></td> </tr> </table> '); $col ++; if($col == 2) { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'valign="top" ', 'text' => tep_image(DIR_WS_IMAGES .'spacer.gif', '', '','','style="margin-right:0px "') ); $col ++; } if (trim($_GET['cPath'])==""){ $hack=2; }else{ $hack=3; } if ($col > $hack) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <!-- new_products_eof //-->
Recommended Posts
Archived
This topic is now archived and is closed to further replies.