Home › Forums › Quform WordPress › Promo / Coupon Entry
- This topic has 5 replies, 3 voices, and was last updated 8 years, 12 months ago by Ally.
- AuthorPosts
- March 21, 2013 at 8:25 pm #3505braboxParticipant
I was wondering how can i make a Promo / Coupon entry.
Is there any way i can specific text (the actual promo codes, example: party10%) so that promo /code entry can verify if the coupon is valid?
March 24, 2013 at 12:55 pm #3530AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 25, 2013 at 7:00 pm #3546braboxParticipantHello Ally,
Thank you for the response.
I was able to follow the instructions on the link you gave me but i couldn’t find how to ( return if true ). (iam not that familiar with PHP)
This is the modified code i am using
function brabox_coupon($valid, $value, $element)
{
if ($value != 'BraBox2013') { $element->addError('This coupon has expired or is incorrect'); $valid = false;
}return $valid;
}
add_filter('iphorm_element_valid_iphorm_1_200', 'brabox_coupon', 10, 3);
So in this case, if value is BraBox2013 (the correct coupon code) nothing displays but If it is not BraBox2013 then it displays the error message.
If it is possible for you to help me, i would like to:
Add more than 1 (valid) coupon code, and when they are (valid / true) a response displays back to client “valid coupon”.
I will be using these in more than 1 form which have different unique element ID.Thank you.
March 27, 2013 at 9:49 am #3570AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 14, 2015 at 9:37 am #15297asteriosParticipantHi! How to add a confirmation message or alert for a valid ocupon?
- This reply was modified 8 years, 12 months ago by asterios.
May 15, 2015 at 10:23 am #15305AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.