Thank You Page Redirect.. Please Help!

Discussion in 'Customization & add-ons' started by hecman100, Jan 6, 2010.

  1. hecman100

    hecman100 New Member

    Joined:
    Dec 23, 2009
    Messages:
    6
    What going on guys....

    Ok... this what I'm trying to do.

    I want my Thanks.php page to redirect to another page depending on the product they just purchased to create an "Upsell" or "One Time Offer"... :D

    I searched the forum.. and I know there are plugins that can help you do just that.. (ie. amOffers & amUpsell by Ken Gary) but I also saw a post by DERECK that spoke about adding some code to the thanks.php page..

    here's the code:

    Code:
    switch($p.product_id )
    {
    case "1":
    $t->display("thanks_1.html");
    break;
    case "2":
    $t->display("thanks_baa.html");
    break;
    case "3":
    $t->display("thanks_2.html");
    break;
    case "4":
    $t->display("thanks_3.html");
    break;
    case "5":
    $t->display("thanks_4.html");
    break;
    case "6":
    $t->display("thanks_5.html");
    break;
    default:
    $t->display("thanks.html");
    }
    I tried to add this code but nothing happened... the user is still being sent to the regular thank you page after payment..

    can anyone help me with this.. am I missing something?
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Within the thanks.php page you can use

    foreach ($prices as $product_id => $price){
    if ($product_id ==1){
    $t->display("thanks2.html"); }
    }

    But... I'd suggest you think about using Ken Gary's plugin amOffers: Sequential Offer Upsell Funnel for aMember. It'll handle a lot of this for you.

    David
  3. hecman100

    hecman100 New Member

    Joined:
    Dec 23, 2009
    Messages:
    6
    Thanks David.. that did exactly what I wanted.. much appreciated :D

    oh, and yea... when I grow my sales funnel to 2 or more offers.. I'll definitely get his plugin since it'll help me create a smoother sales process.. (and i'll even come back and click on your link :))

    ..I bought Ken's amProtect WP plugin.. so I know his stuff is good..

    thanks again..

    Hector

Share This Page