<input type="hidden" name="custom" value="www.MyWebsite.org|<?php echo $qty; ?>" />

Statistics: Posted by joelcpatterson — July 20th, 2011, 11:07 pm
Statistics: Posted by Cristián Lávaque — July 20th, 2011, 9:51 pm
<?php 
   $user_id = S2MEMBER_CURRENT_USER_ID;
   $s2member_custom_fields = get_user_option('s2member_custom_fields', $user_id);
   $qty = $_GET["qty"];
   $step = $_GET["step"];
   if(!$qty){
      $qty = substr(S2MEMBER_CURRENT_USER_CUSTOM,26);
   }
   $a3 = ($qty * .5);
?>
<!-- noformat on -->   
<div class="contentBackground setHeight">
<div class="contentHeader">Modify Membership</div>
<table>
    <tr>
    <?php
   if($step == 1){
      echo "<th class='selected' style='width:306px;'>Update Quantity</th>";
   }else{
      echo "<th style='width:306px;'>Update Quantity</th>";
   }
   if($step == 2){
      echo "<th class='selected' style='width:306px;'>Submit Modification</th>";
   }else{
      echo "<th style='width:306px;'>Submit Modification</th>";
   }
    ?>
    </tr>
    <tr>
    <td colspan=2>
   <?php if($step == 1){ ?>
   <form action="http://www.MyWebAddress.org/" method="get">
      <fieldset>
      <legend>Quantity:</legend>
      <input type="hidden" name="page_id" value="561">
       <input type="hidden" name="step" value="2">
      <label>I would like to receive </label>
      <input type="text" value="<?php echo $qty; ?>" name="qty" style="width:20px;">
      <label> Bible(s) a month.</label>
      <input type="submit" value="Update Quantity" name="submit">
      </fieldset>
   </form>
   <?php } ?>
   <?php if($step == 2){ ?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
   <fieldset>
   <legend>Place Order:</legend>
   <label>I want <strong><?php echo $qty; ?></strong> Bible(s) per month, for a total cost of <strong>$<?php echo $a3; ?></strong> per month.</label>
   <input type="hidden" name="business" value="webmaster@MyWebAddress.org" />
   <input type="hidden" name="cmd" value="_xclick-subscriptions" />
   <input type="hidden" name="notify_url" value="http://www.MyWebAddress.org/?s2member_paypal_notify=1" />
   <input type="hidden" name="cancel_return" value="http://www.MyWebAddress.org/" />
   <input type="hidden" name="return" value="http://www.MyWebAddress.org/?s2member_paypal_return=1" />
   <input type="hidden" name="rm" value="2" />
   <input type="hidden" name="lc" value="" />
   <input type="hidden" name="no_shipping" value="1" />
   <input type="hidden" name="no_note" value="1" />
   <input type="hidden" name="custom" value="www.MyWebAddress.org|<?php echo $qty; ?>" />
   <input type="hidden" name="currency_code" value="USD" />
   <input type="hidden" name="page_style" value="paypal" />
   <input type="hidden" name="charset" value="utf-8" />
   <input type="hidden" name="item_name" value="Description and pricing details here." />
   <input type="hidden" name="item_number" value="1" />
   <input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
   <input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
   <input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
   <input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
   <input type="hidden" name="modify" value="1" />
   <input type="hidden" name="src" value="1" />
   <input type="hidden" name="srt" value="" />
   <input type="hidden" name="sra" value="1" />
   <input type="hidden" name="a3" value="<?php echo $a3; ?>" style="width:40px;" />
   <input type="hidden" name="p3" value="1" />
   <input type="hidden" name="t3" value="M" />
   <input type="submit" value="Submit Order Modification" />
   
   <input type="hidden" name="first_name" value="[s2Get user_field="first_name" /]">
        <input type="hidden" name="last_name" value="[s2Get user_field="last_name" /]">
        <input type="hidden" name="address1" value="[s2Get user_field="address" /]">
        <input type="hidden" name="address2" value="[s2Get user_field="address2" /]">
        <input type="hidden" name="state" value="[s2Get user_field="state" /]">
        <input type="hidden" name="city" value="[s2Get user_field="city" /]">
        <input type="hidden" name="zip" value="[s2Get user_field="zip_code" /]">
        <input type="hidden" name="night_ phone_a" value="[s2Get user_field="phone_number" /]">
        <input type="hidden" name="email" value="[s2Get constant="S2MEMBER_CURRENT_USER_EMAIL" /]">
   </fieldset>
</form>
<strong>NOTE:</strong>You must process this modification through your paypal account. This will remove your previous montly subscription and update it to your desired subscription.<br /><br />
   <?php } ?>
    </td>
</table>
</div>
<!-- noformat off -->   
Statistics: Posted by joelcpatterson — July 20th, 2011, 10:13 am
Statistics: Posted by joelcpatterson — July 20th, 2011, 9:28 am
    <input type="hidden" name="return" value="URL goes here" />Statistics: Posted by Cristián Lávaque — July 8th, 2011, 5:33 pm
Statistics: Posted by joelcpatterson — July 8th, 2011, 2:18 pm