PupStar Posted November 8, 2014 Share Posted November 8, 2014 Hi Guys, I am playing with the layout in the BS version and was wondering how the number of new products per row is determined as 3 In the 2.3.4 standard version it is controlled by this code $counter++; if ($col === 0) { $new_prods_content .= '<tr>'; } $new_prods_content .= '<td width="33%" align="center" valign="top"><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'])) . '</td>'; $col ++; if (($col > 4) || ($counter == $num_new_products)) { $new_prods_content .= '</tr>'; $col = 0; } } I have moved the module to above the footer and I would like to increase the amount of products to 5 but can not see where this is located. Any help would be appreciated. Thanks Mark Link to comment Share on other sites More sharing options...
♥Tsimi Posted November 8, 2014 Share Posted November 8, 2014 Hi Mark If I'm not mistaken you have to play with the col-xx-xx class setting inside the includes/modules/new_products.php file. Look for this piece of code around line 25-26 while ($new_products = tep_db_fetch_array($new_products_query)) { $new_prods_content .= '<div class="col-sm-6 col-md-4">'; and change for example the number col-md-4 to col-md-3 (4 products per row) or col-md-2 (6 products per row). The problem that you might encounter is that the name of the product might be too long and break one line down and therefore result in different height sizes and that again results in uneven sizes of boxes that can't align correctly. To fix that you will have to define certain sizes % or px inside the css file. I have no clue how to achieve 5 products per row though, sorry. Link to comment Share on other sites More sharing options...
♥GLWalker Posted November 9, 2014 Share Posted November 9, 2014 As noted, you have to change the col-xx-xx class, but you will not be able to get five in 1 row. The bootstrap class just doesn't equal out to 5. Every thing divides into 12. So currently you have three as the class is col-md-4 ~ 4/8/12 = 3 You can do 4 across by using col-md-3 or jump to 6 across by using col-md-2 You may also need to adjust the settings in admin/configuration/maximum values/new products module Follow the community build: BS3 to osCommerce Responsive from the Get Go! Check out the new construction: Admin Gone to Total BS! Link to comment Share on other sites More sharing options...
PupStar Posted November 9, 2014 Author Share Posted November 9, 2014 Thanks guys, I am still trying to get my head around this whole bootstrap thing lol The next question(s) are 1. What is the best way / correct way to add padding/margin to the left and right so it does not look to squished up? 2. The correct way to set all boxes to equal height? Link to comment Share on other sites More sharing options...
De Dokta Posted November 9, 2014 Share Posted November 9, 2014 Hi several ways for equal height you find here: http://www.oscommerce.com/forums/topic/397852-bootstrap-3-in-23-new-products-rows-aligning/ J.J. Link to comment Share on other sites More sharing options...
PupStar Posted November 9, 2014 Author Share Posted November 9, 2014 @@De Dokta Thanks Dr J :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.