Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Location
    Taiwan
    Posts
    241
    Plugin Contributions
    0

    Default Re: Integrating 3rd party search engine

    Quote Originally Posted by DrByte View Post
    try using the header_php.php file in your page.
    What does this file actually do? Does it insert data before the opening html tag?

    This is from the docs of the search engine I'm trying to use:

    First you should see that there are two included files right at
    the top of the page: "os2/config.php" and "os2/head.php". These files
    set up the environment and handle the search process, so they must be
    included in the results page *before* any HTML output. This means
    before the <html> tag, and before any other whitespace. Otherwise you
    will get many "Headers could not be sent" errors.
    So can I use the header_php.php file for this?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Integrating 3rd party search engine

    Yes.

    In this document which explains the program flow of Zen Cart, you'll see that the header_php.php file processes code "before" the "header" is generated. It does all the background processing before anything is sent to the browser (except perhaps a "headers already sent" or other error-related messages), including the <HTML> and <HEAD> tags.

    Program-Flow document:
    http://www.zen-cart.com/index.php?ma...roducts_id=378


    However, with that said, from what you've posted earlier, when you're inserting your "include" statements for those files, you're somehow getting an error message (the variable not found message) which suggests that somehow the normal flow of the Zen Cart page-loading activity has been intercepted and pieces of it skipped. I'm not sure exactly why.

    Where exactly in the header_php.php file did you put the includes? Without studying it in great detail thus far, I would start by suggesting putting them at the end, before the closing ?> tag.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2007
    Location
    Taiwan
    Posts
    241
    Plugin Contributions
    0

    Default Re: Integrating 3rd party search engine

    The error messages that were being generated were ZC errors made visible by this line of code in the search engine:

    error_reporting(E_ALL);

    I commented out that line and all works well.

    I'm happy - thanks for your help!

 

 

Similar Threads

  1. 3rd Party API Help Required
    By coopco in forum General Questions
    Replies: 0
    Last Post: 19 Dec 2011, 12:02 PM
  2. 3rd Party Gateways & iFrames
    By wolff in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 5 Feb 2010, 07:47 PM
  3. gv discount in 3rd party payment module
    By kalleMD in forum General Questions
    Replies: 0
    Last Post: 14 Sep 2007, 08:42 AM

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