Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Error when category has only one product

Error when category has only one product

Locked

Views: 894

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
15 Feb 2009, 11:17 PM
#1
artcoder avatar

artcoder

Zen Follower

Join Date:
Jan 2007
Posts:
166
Plugin Contributions:
0

Error when category has only one product

Whenever I browse to ...

index.php?main_page=index&cPath=6
```I get a blank page if that category has one and only one product.  If I have no products, it is fine.  When I have 2 or more products, no problem.  The one product case is special because it take user directly to that one product.  Where is that piece of code?

I did the debug for "blank page" as suggested and got ...

[B]Warning[/B]: Cannot modify header information - headers already sent by (output started at /home/content/b/a/g/bagsrhere/html/includes/languages/english/theme105/email_extras.php:105) in [B]/home/content/b/a/g/bagsrhere/html/includes/functions/functions_general.php[/B] on line [B]44[/B]

[B]Notice[/B]: Object of class queryFactoryResult could not be converted to int in [B]/home/content/b/a/g/bagsrhere/html/includes/functions/functions_general.php[/B] on line [B]19[/B]



Line 44 of functions_general.php shows ...

[B] header('Location: ' . $url);


\[/B]This is same as the unaltered zencart 1.3.8 codebase.  And it doesn't look like the "one-product" code that I am looking for.
15 Feb 2009, 11:25 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error when category has only one product

The problem is most likely a syntax error near line 105 of email_extras.php causing pre-mature output which then prevents the re-direction.