Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

4 column listing???


Antonimous

Recommended Posts

I am using 2.2-MS2

 

I want my listings to look like this:

 

|-----| |-----| |-----| |-----|

|-----| |-----| |-----| |-----|

Name Name Name Name

$5.00 $5.00 $5.00 $5.00

 

|-----| |-----| |-----| |-----|

|-----| |-----| |-----| |-----|

Name Name Name Name

$5.00 $5.00 $5.00 $5.00

 

I used the contribution which allows a 3 column listing.

 

http://www.oscommerce.com/community/contributions,825

 

It changes the Catalog/includes/modules/prod_listing.php and I changed the code:

 

$column ++;

if ($column >= 3) {

$row ++;

$column = 0;

 

 

To:

 

$column ++;

if ($column >= 4) {

$row ++;

$column = 0;

 

It actually makes 4 columns and the first three are aligned nicely. The 4th column is not aligned properly. Anyone know what part of the language tells it to "center" and align at 25% across each?

 

Anton

Good things take time..... Great things happen all at once!

Link to comment
Share on other sites

      $list_box_contents[$row][$column] = array('align' => 'center',

                                               'params' => 'class="productListing-data"',

                                               'text'  => $lc_text);

in the new product_listing.php. Adding width="25%" might help, like this

      $list_box_contents[$row][$column] = array('align' => 'center',

                                               'params' => 'class="productListing-data" width="25%"',

                                               'text'  => $lc_text);

However, if your pictures are too big, they will force a wider width than you specify.

 

Seeing as how there is no code like this now with three columns, just shrinking the product pictures (size set in admin :arrow: Configuration :arrow: Images) might be enough (and necessary).

 

Hth,

Matt

Link to comment
Share on other sites

  • 7 months later...

Archived

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

×
×
  • Create New...