Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Main Page New Products only display 4 products


Guest

Recommended Posts

Hi there, i am having problems as my site only displays 4 New Products on the main page. I can set the number from 4-30 in admin, but it will only ever show 4, no more no less. I have found new products.php, is this where i should go to check to see if this has been disabled by the template creator or is there some thing else i should do?

 

 

Any help is very much appreciated!

 

Thanks

 

Matt

Link to comment
Share on other sites

Hi there, i am having problems as my site only displays 4 New Products on the main page. I can set the number from 4-30 in admin, but it will only ever show 4, no more no less. I have found new products.php, is this where i should go to check to see if this has been disabled by the template creator or is there some thing else i should do?

Any help is very much appreciated!

 

Thanks

 

Matt

 

you configure this in admin

Regards

 

Mark A Reynolds

Link to comment
Share on other sites

Hi Matt,

 

yes, it's very probably that your template creater hardcoded the mx number. Did you find new_products.php in the modules folder? Search your harddrive whether you find another one, or even two more (very common for template systems). If not, you can paste the top part (where the query is) in here for reviewing it.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Hi Matt,

 

yes, it's very probably that your template creater hardcoded the mx number. Did you find new_products.php in the modules folder? Search your harddrive whether you find another one, or even two more (very common for template systems). If not, you can paste the top part (where the query is) in here for reviewing it.

 

Thank you very much Monika. :D

 

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

Link to comment
Share on other sites

if this is your only file, the value is not hardcoded ... see MAX_DISPLAY_NEW_PRODUCTS

 

You may have changed the wrong parameter though. There are several parametrs for new products. The one you need is "new products module"

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

if this is your only file, the value is not hardcoded ... see MAX_DISPLAY_NEW_PRODUCTS

 

You may have changed the wrong parameter though. There are several parametrs for new products. The one you need is "new products module"

 

 

Hi Monika, thanks for staying in there with me. In admin i go to Maximum Values and i change the New Products Listings. It doesnt matter what number i change this to, it does not make any changes.

 

Matt

Link to comment
Share on other sites

Hi Monika, thanks for staying in there with me. In admin i go to Maximum Values and i change the New Products Listings. It doesnt matter what number i change this to, it does not make any changes.

 

Matt

Hi Matt,

 

you need to read and work very carefully here. You did change the wrong parameter. This is what you have in admin max values - there are THREE new products values, and you have to change the red one ( do not worry about the numbers my values copied over):

 

Address Book Entries 5

Search Results 20

Page Links 5

Special Products 9

New Products Module 9

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

Address Book Entries

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Hi Matt,

 

you need to read and work very carefully here. You did change the wrong parameter. This is what you have in admin max values - there are THREE new products values, and you have to change the red one ( do not worry about the numbers my values copied over):

 

Address Book Entries 5

Search Results 20

Page Links 5

Special Products 9

New Products Module 9

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

Address Book Entries

 

 

Wow, cant believe i overlooked that. Still having problems though. When i went in there, New Products Module was already set to 9. I changed it to 15 to see what it would do and it lists 10 products. this would be fine for me but the way it is listing them is not very balanced.

 

Take a look

 

My Webpage

 

Thanks Monika.

Link to comment
Share on other sites

I think the problem is probably that your template forgot to add the strip_tags function to your products descriptions before it doesthe substring .... you get extra tag openers in and they shift the layout.

 

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

 

should be

 

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

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

I think the problem is probably that your template forgot to add the strip_tags function to your products descriptions before it doesthe substring .... you get extra tag openers in and they shift the layout.

 

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

 

should be

 

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

 

 

Ok, i am with you. what file would this info be in so i can make the change. I received your PM and we will do what you mentioned .

Link to comment
Share on other sites

the file is catalog/includes/modules/new_products.php

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

the file is catalog/includes/modules/new_products.php

 

 

Hi Monika, i tried replacing that code and there is no visible change when refreshing the main page. Perhaps i should open up a ticket on your site. :)

 

Matt

Link to comment
Share on other sites

Hey Matt

 

looking the code again (i just leave it alone doin another mods for a few weeks), i found the solution for my problem at least, i had blank spaces next to the first 2 rows, that should display a product and it didn't), so here is my code now:

 

$description['products_description'][$desc_len-1] = '.';
$description['products_description'][$desc_len-2] = '.';
$description['products_description'][$desc_len-3] = '.';
if  ( ($col == 0 && $row == 1) || ($col == 2 && $row == 1) ){
$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="90%" border="0" cellspacing="0" cellpadding="0" >

 

look after the IF and ELSE IF (the values of 0 and 1 needs to be the same) mine was different before.

 

 

Hope it helps and save you a few bucks with these mercenary ppl that are infiltred on this forum :angry:

 

 

Fabio

Link to comment
Share on other sites

Ok i think i see what you mean, the $col and $row number ie 1's & 0's for if statement should match the else if statement?

 

Ill check on that, hope it works. Thanks alot man! I was quoted 40 euro to fix this which is okay with me, but convert that to our lousy canadian dollar and its almost 60.00$ :P

 

Thanks again.

 

Matt

Link to comment
Share on other sites

Ok i think i see what you mean, the $col and $row number ie 1's & 0's for if statement should match the else if statement?

 

Ill check on that, hope it works. Thanks alot man! I was quoted 40 euro to fix this which is okay with me, but convert that to our lousy canadian dollar and its almost 60.00$ :P

 

Thanks again.

 

Matt

 

 

It works now. Thanks a million. been working on this for like a week now.

 

Cheers

 

Matt

Link to comment
Share on other sites

Nice to hear that man :)

 

i had the same trouble for 2 months i think ...

 

I hope that u spent the money that u saved on that in a few beers :)

 

Don't forget to drink one for me.. heh

 

cheers

 

Fabio

 

i will for sure, lol chug chug.

 

Matt

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...