Hi,
When a user comes to the pricing table view with a coupon code in the URL, I would like this to get passed on to the subscription form page. For example I give the user a link like: index.php?option=com_osmembership&view=plans&layout=pricingtableflat&id=0&coupon_code=MYCODE
The coupon_code should be appended to all buttons on the page that take you to the subscription form. I know the subscription form already supports the coupon_code parameter so there is no change required there.
I'm currently doing this with a template override but it would be a nice feature to have natively. Here is the code I added:
/components/com_osmembership/view/common/tmpl/pricingtable_flat_plans.php
Code:
// at the beginning, like line 27
$coupon = JFactory::getApplication()->input->getString('coupon_code', '');
$appendCoupon = $coupon ? '?coupon_code=' . $coupon : '';
// add in line 102 after signupUrl is created
$signUpUrl .= $appendCoupon;