How to link pricing pages with coupons

Hello I am posting this as a way to possibly circumvent the issue i have working with commissions site wide with membership so heres my question/answer.

how do i write the url syntax for auto entering a discount onto this page.

http://teamimfit.com/shaun/register-3/?action=registeruser&subscription=1

I assume it will look like

http://teamimfit.com/shaun/register-3/?action=registeruser&subscription=1$applycoupon=6MONTHPREP

and the coupon will already be applied to the page on loading.

I am attempting to create a work around to the commission issue i had by having the customer purchase a majority of the membership up front and collect the fee from that transaction, and then getting a link to the membership with a discount on the fees.

Can someone please give me an answer on how to write the query correctly so i can enter in the coupons when the page loads thank you

-Eric

  • ericwied1

    that dosen't seem to work from what i deduce from the coding of the plugin this is the function in which the process of entering in the coupon.

    <div class="membership_coupon_form couponbar">
    <form action='' method='POST'>
    <?php if(empty($coupon) || (method_exists( $coupon, 'valid_for_subscription') && !$coupon->valid_for_subscription( $sub_id ))) { ?>
    <div class="couponQuestion"><?php _e('Have a coupon code?','membership'); ?></div>
    <div class="couponEntry">
    <input type="hidden" id="coupon_sub_id" name="coupon_sub_id" value="<?php echo esc_attr($_GET['subscription']); ?>" />
    <input type="text" class="couponInput" id="coupon_code" name="coupon_code" value="" />
    <input type='submit' class="button <?php echo apply_filters('membership_subscription_button_color', 'blue'); ?>" id="submit_coupon_code" value = '<?php _e('Apply Coupon','membership'); ?>' />
    </div>
    <?php } elseif( method_exists( $coupon, 'get_coupon_code') && $coupon->get_coupon_code() != false ) { ?>
    <div class="couponEntry">
    <?php _e('Using Coupon Code: ','membership'); ?>
    <?php echo $coupon->get_coupon_code(); ?>
    <input type="hidden" id="coupon_sub_id" name="coupon_sub_id" value="<?php echo esc_attr($_GET['subscription']); ?>" />
    <input type="hidden" class="couponInput" id="coupon_code" name="coupon_code" value="" />
    <input type='submit' class="button <?php echo apply_filters('membership_subscription_button_color', 'blue'); ?>" id="submit_coupon_code" value = '<?php _e('Remove Coupon','membership'); ?>' />

    I am not sure through reading the syntax what the proper url would be that gets formulated from this operation.

    I would appreciate any help in the actual string structure maybe i can find a solution if I were to know the url that it is sending based on the submit

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.