Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Aug 2010
    Posts
    51
    Plugin Contributions
    0

    Default define_checkout_success

    I have two different products that I need to send customers to two different checkout_success pages. Is there a way for me to build an intermediary page (before "define_checkout_success") that will check the product_id and do one of two things depending on the result?

    example:
    I have two products:
    1 is a digital magazine (digital meaning online version) that requires a username and password.
    1 is a print magazine that requires nothing (we simply ship the magazine to them).

    If the customer purchases the digital version, they should go to define_checkout_success_digital.php which I have already created. That page sends their username and password to our third party fulfillment company and returns a login page for the customer to login.

    If it's a print product they should redirect to define_checkout_success_print. In which case I simply have some text that displays shipping times and what not.

    If they purchase both they should still go to define_checkout_success_digital.

    I'm sooo stuck.
    Any ideas would be greatly appreciated.

    Matt

    btw - here is the code I tried. it's obviously not working:

    PHP Code:
    <?PHP
     error_reporting
    (E_ALL);
      
    // ini_set('display_errors','On'); 
    require 'db.inc.php';
    $db mysql_connect(MYSQL_HOSTMYSQL_USERMYSQL_PASSWORD) or
        die (
    'Unable to connect. Check your connection parameters.');

    // Retrieve all the data from the "zen_cart.pm_customers" table
    $result mysql_query("SELECT * FROM zen_cart.pm_customers WHERE customers_id=" $_SESSION['customer_id']) or
        die(
    mysql_error());  

    // store the record of the "zen_cart.pm_customers" table into $row
    $row mysql_fetch_array($result);

    $result mysql_query("SELECT * FROM zen_cart.pm_products WHERE products_id=" $row['products_id']) or
            die(
    mysql_error());  

    if (
    $row['products_id'] == "4")
    {
        
    //go to define_checkout_success_digital
        
    header ("location: "/digital/includes/languages/english/html_includes/classic/define_checkout_success_digital.php"");
    }
    else
    {
        
    //else go to define_checkout_success_print
        
    header ("location: "/digital/includes/languages/english/html_includes/classic/define_checkout_success_print.php"");
    }
    ?>
    Last edited by inestine; 19 Nov 2010 at 10:35 PM. Reason: added code

 

 

Similar Threads

  1. Please help, I ruined my define_checkout_success.php
    By MommyMilk® in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 3 Nov 2010, 03:35 PM
  2. Variables that are passed to define_checkout_success.php
    By babyandme in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Sep 2008, 11:21 PM
  3. define_checkout_success.php
    By Goofster in forum General Questions
    Replies: 0
    Last Post: 9 Jul 2008, 12:49 PM
  4. Where is '$define_checkout_success' defined??
    By jronis in forum Installing on a Linux/Unix Server
    Replies: 13
    Last Post: 29 Aug 2006, 02:30 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