Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Products for April - Column control?


Offenham

Recommended Posts

Hi

 

I have managed to install the column product diaplay and this works great as I have 8 products per page in 2 columns.

 

Problem I have is with the "New Products for April" at the bottom of the home page - The only way I can stop this from displaying 3 columns is to set the "New Products Module" in Admin to 2.

 

I would like it to display around 8 products but in 2 columns. What setting or file controls this please?

 

Any help - I hope this makes sense.

 

Thanks

 

David

Link to comment
Share on other sites

David,

 

If I understood your question correctly, you wish to display the New Products in 2 colomns also?

 

If that is correct, open the file catalog/includes/modules/new_products.php

and change: 'params' => 'class="smallText" width="33%" to: 'params' => 'class="smallText" width="50%" and if ($col > 2) { to if ($col > 1) {

 

  $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="50%" 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 ++;

   }

 }

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...