Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    169
    Plugin Contributions
    0

    Default Error when category has only one product

    Whenever I browse to ...

    Code:
    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 ...

    Code:
    Warning: 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 /home/content/b/a/g/bagsrhere/html/includes/functions/functions_general.php on line 44
    
    Notice:  Object of class queryFactoryResult could not be converted to int in /home/content/b/a/g/bagsrhere/html/includes/functions/functions_general.php on line 19

    Line 44 of functions_general.php shows ...

    Code:
     header('Location: ' . $url);
    


    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.
    Last edited by artcoder; 16 Feb 2009 at 12:21 AM.

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default 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.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. blank page when there is only one product in a category
    By rajoo.sharma in forum General Questions
    Replies: 2
    Last Post: 27 May 2010, 05:34 PM
  2. When only one product in a category, it goes right to product -
    By linnx in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Feb 2010, 03:21 PM
  3. Show product category when only one product
    By HandcraftedUK in forum General Questions
    Replies: 3
    Last Post: 18 Jun 2008, 01:32 PM
  4. Blank page when category has only one product.
    By arrow in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 23 Nov 2007, 08:19 PM
  5. No category image when only one product
    By budfox in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 21 Feb 2007, 10:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg