Jump to content
Sign in to follow this  
maceved23

Only 1 row of products

Recommended Posts

Hi,

All

 

I just installed the contribution product_listing_columns_2_2_6

 

I finally get it to work : http://www.electronicasenel.net/index.php?cPath=43'>http://www.electronicasenel.net/index.php?cPath=43

 

the problem for me now is thet the products are only in one row in the category I show I have 15 products and I only see 3 of them.

 

What I'm doing wrong ????

 

Please help me find this error.

 

The second question is how can I show the products in the same way I see them in the home of my site

http://www.electronicasenel.net/

 

I wnat to see the products descryption and the VIEW DETAILS button.

 

Thanks

 

Mario

Share this post


Link to post
Share on other sites

that contrib is not supported any more, u could use

 

Product Listing Enhancements, Thumbnails & Manufacturer Headings http://addons.oscommerce.com/info/6051

 

that does have modules for the 'home' page

 

for results shown look at

 

admin -> max values -> search results


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hi,

spooks

 

Sorry for the SPOOL

 

The solution you gave me works just perfect.

 

I have a question if you look on URL you see that on my HOME PAGE the NEW PRODUCTS it only show 4 products

if I go to admin:

 

admin -> max values -> New Products

 

I config it to 1 it shows 1 product

2 it shows 1 product

3 it shows 2 product

4 it shows 2 product

5 it shows 2 product

6 it shows 2 product

7 it shows 3 product

8 it shows 3 product

9 it shows 4 product

10 it shows 6 product (in a complete mess)

 

I don't know why this is happening I post the code of my file: new_products.php

 

<?php

 

 

 

/*

 

 

 

$Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $

 

 

 

 

 

 

 

E-Commerce Solutions

 

 

 

 

 

 

 

Copyright © 2005 www.flash-template-design.com

 

 

 

 

 

 

 

Released under the GNU General Public License

 

 

 

*/

 

 

 

?>

 

 

 

<!-- new_products //-->

 

 

 

<tr>

 

 

 

 

 

<td>

 

<?php

 

 

 

$info_box_contents = array();

 

 

 

$info_box_contents[] = array('text' => '<div class="header">'.TABLE_HEADING_NEW_PRODUCTS.'</div>');

 

 

 

 

 

 

 

new contentBoxHeading($info_box_contents);

 

 

 

?>

 

<div style="background-color:#FFF;">

 

 

 

<?php

 

 

 

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);

//$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 " . 10);

 

 

} 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);

//$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 " . 10);

 

 

 

}

 

 

 

 

 

 

 

$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']);

 

 

 

 

 

 

 

$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$new_products['products_id'].' && language_id='.(int)$languages_id;

 

 

 

$description_query = tep_db_query($sql);

 

 

 

$description = mysql_fetch_array($description_query, MYSQL_ASSOC);

 

 

 

$description['products_description'] = substr($description['products_description'], 0, 500);

 

 

 

$desc_len = strlen($description['products_description']);

 

 

 

$description['products_description'][$desc_len-1] = '.';

 

 

 

$description['products_description'][$desc_len-2] = '.';

 

 

 

$description['products_description'][$desc_len-3] = '.';

 

 

 

 

 

 

 

if ( ($col == 1 && $row == 0) || ($col == 1 && $row == 2) ){

 

 

 

$info_box_contents[$row][$col] = array('align' => 'center',

 

 

 

'params' => 'width="1" height="100%" valign="middle" ',

 

 

 

'text' => '<table height="" width="100%" border="0" cellspacing="0" cellpadding="0" >

 

 

 

<tr>

 

 

 

<td><div style="width:1px;"></div></td>

 

 

 

</tr>

 

 

 

</table>');

 

 

 

}

 

 

 

elseif (($col == 0 && $row == 1) || ($col == 2 && $row == 1)) {

 

 

 

$info_box_contents[$row][$col] = array('align' => 'center',

 

 

 

'params' => 'height="1"',

 

 

 

'text' => '<table width="95%" border="0" cellspacing="0" cellpadding="0" >

 

 

 

<tr>

 

 

 

<td style="font-size:1px;background:url(images/points.gif) repeat-x;"> </td>

 

 

 

</tr>

 

 

 

</table>');

 

 

 

}

 

 

 

elseif ($col == 1 && $row == 1) {

 

 

 

$info_box_contents[$row][$col] = array('align' => '',

 

 

 

'params' => '',

 

 

 

'text' => ' ');

 

 

 

}

 

 

 

else {

 

 

 

$info_box_contents[$row][$col] = array('align' => 'center',

 

 

 

'params' => 'class="main" width="50%" valign="top" align="left"',

 

 

 

'text' => '<table width="96%" cellpadding=0 cellspacing=0 border=0 style="margin-bottom:7px;">

 

 

 

<tr>

 

<td height="35" style="padding-right:10px;"><div class="productName">'.$new_products['products_name'].'</div></td>

 

</tr>

 

<td rowspan="2"><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, 'align="absmiddle"') . '</a></td>

 

<td height="60" colspan="2" align="left" valign="top">'.$description['products_description'].'</td>

 

 

 

 

 

 

 

</tr>

 

 

 

<tr>

 

 

 

 

 

 

 

</tr>

 

 

 

<tr>

 

 

 

 

 

 

 

</tr>

 

 

 

<tr>

 

 

 

 

 

 

 

 

 

</tr>

 

 

 

 

 

 

 

<tr>

 

 

 

<td colspan="2" class="main" valign=top align="right" style="padding-right:10px; >'. tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')).'

 

 

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">

 

 

 

<tr>

 

 

 

<td style="padding-top:1px; padding-right:1px;" ><a href="'.tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']).'">'.tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS).'</a></td><td style="padding-top:1px;"><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '"></a></td>

 

 

 

</tr>

 

 

 

</table></form>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>'); }

 

 

 

 

 

 

 

 

 

 

 

$col ++;

 

 

 

if ($col > 2) {

 

 

 

$col = 0;

 

 

 

$row ++;

 

 

 

}

 

 

 

 

 

 

 

}

 

 

 

//new contentBox($info_box_contents, 0);

new noborderBox($info_box_contents,0);

 

 

 

 

 

 

 

?>

 

 

 

</div>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<!-- new_products_eof //-->

 

Please take a look to it I don't understand what could be happening.

 

Best regards

 

Mario

 

 

 

that contrib is not supported any more, u could use

 

Product Listing Enhancements, Thumbnails & Manufacturer Headings http://addons.oscommerce.com/info/6051

 

that does have modules for the 'home' page

 

for results shown look at

 

admin -> max values -> search results

Share this post


Link to post
Share on other sites

Hi,

spooks

 

I need to know if you had the time to take a look to the post I made some days ago.

 

I still facing the same problem.

 

Mario

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×