Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Less than one product produces error in recommends.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-17-2003, 06:10 PM
  BoomBoomBap's Avatar 
BoomBoomBap BoomBoomBap is offline
 

Senior Member
  
Join Date: Nov 2002
Location: San Francisco
Posts: 184
 

Default Less than one product produces error in recommends.php

An error occurs on the page customer/main/product.tpl when a customer visits a subcategory with only one product.

In this instance the following error appears:

Code:
Warning: rand(): Invalid range: 0..-1 in /home/virtual/site210/fst/var/www/html/shop/customer/recommends.php on line 59 Warning: rand(): Invalid range: 0..-1 in /home/virtual/site210/fst/var/www/html/shop/customer/recommends.php on line 62


Any idea how to fix this ?
__________________
Site 1 > XCART LIVE 3.4.12

Site 2 > XCART LIVE 4.0.17
Reply With Quote
  #2  
Old 03-17-2003, 06:15 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

You could try changing the setting in admin that says "choose recomended products by random"
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 03-17-2003, 06:21 PM
  BoomBoomBap's Avatar 
BoomBoomBap BoomBoomBap is offline
 

Senior Member
  
Join Date: Nov 2002
Location: San Francisco
Posts: 184
 

Default

Hmm.... when I do that it then doesn't show *any* random products for any of the products on the entire website.

This of course is not the desired effect

Thank you for your incredibly prompt response by the way...
__________________
Site 1 > XCART LIVE 3.4.12

Site 2 > XCART LIVE 4.0.17
Reply With Quote
  #4  
Old 03-24-2003, 07:04 PM
  BoomBoomBap's Avatar 
BoomBoomBap BoomBoomBap is offline
 

Senior Member
  
Join Date: Nov 2002
Location: San Francisco
Posts: 184
 

Default

Help !

I forgot this is still a problem and I'm trying to launch the site next week

Also, this does not have to do with only one product existing because I tried changing the number of products displayed in recommends list to one and I still receive an error.

Warning: rand(): Invalid range: 0..-1 in /home/virtual/site210/fst/var/www/html/shop/customer/recommends.php on line 59

Warning: rand(): Invalid range: 0..-1 in /home/virtual/site210/fst/var/www/html/shop/customer/recommends.php on line 62

Warning: rand(): Invalid range: 0..-1 in /home/virtual/site210/fst/var/www/html/shop/customer/recommends.php on line 62

Warning: rand(): Invalid range: 0..-1 in /home/virtual/site210/fst/var/www/html/shop/customer/recommends.php on line 62

Warning: rand(): Invalid range: 0..-1 in /home/virtual/site210/fst/var/www/html/shop/customer/recommends.php on line 62
__________________
Site 1 > XCART LIVE 3.4.12

Site 2 > XCART LIVE 4.0.17
Reply With Quote
  #5  
Old 03-24-2003, 07:23 PM
  BoomBoomBap's Avatar 
BoomBoomBap BoomBoomBap is offline
 

Senior Member
  
Join Date: Nov 2002
Location: San Francisco
Posts: 184
 

Default

Okay - after further searching it looks like the problem only happens on subcategories.

Still a problem though
__________________
Site 1 > XCART LIVE 3.4.12

Site 2 > XCART LIVE 4.0.17
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:56 AM.

   

 
X-Cart forums © 2001-2020