Work around for Coupon Support with 1shoppingcart

Discussion in 'Customization & add-ons' started by lyle45, Aug 24, 2009.

  1. lyle45

    lyle45 New Member

    Joined:
    Aug 10, 2009
    Messages:
    6
    I need to utilize a coupon with a product. I am using amember and 1shoppingcart and since they both have their own way of doing coupons, coupons isn't possible when utilizing together.

    So, I need to create a work around.

    I was planning on adding a form between the sales page and the signup.php page. This page would ask for their first and last name, email and coupon code. If the coupon was blank or invalid, it would go to signup.php. If the coupon matched, then it would go to signup.php?price_group=-2.

    I was wanting to populate signup.php with the fields I have already received from the user. I was going to pass these to signup.php like this: signup.php?price_group=-2&fname=First&lname=Last&gemail=email@email.com

    Now I need to GET or REQUEST the parameters in signup.php. I followed David's comments on Post from a few days ago.

    In signup.php I have this at the top:
    if ($_REQUEST['fname'] == "")
    { $_REQUEST['fname'] = $_REQUEST['fname']; }
    if ($_REQUEST['lname'] == "")
    { $_REQUEST['lname'] = $_REQUEST['lname']; }
    if ($_REQUEST['gemail'] == "")
    { $_REQUEST['gemail'] = $_REQUEST['gemail']; }
    if ($_REQUEST['coupon'] == "")
    { $_REQUEST['coupon'] = $_REQUEST['coupon']; }

    In signup.html, I have this in the input value fields:
    {$smarty.request.fname|escape}
    {$smarty.request.lname|escape}
    {$smarty.request.gemail|escape}

    but it isn't working for me. My values are showing up blank.

    1) Anyone see a better way to handle the coupon situation.
    2) Why can't I pass these variables.

    I really appreciate any and all help.
    lyle
    :confused:

Share This Page