Events Made Easy › Forums › Generic › Papyal and zero price after discount
- This topic has 15 replies, 2 voices, and was last updated 6 years, 11 months ago by Franky.
-
AuthorPosts
-
Fri 8 Dec 2017 at 00:37 #57126AnonymousInactive
Hi, I’m trying to use discounts in a discount group so I can sell a voucher ahead of time and then use a discount code on the voucher so they can book the event. The codes are working, so I can use a code to reduce the price to zero, but I can’t seem to avoid going to Paypal and when I do go to PayPal the price it charges is the full price. If I use a normal reduced price discount code (price >0) then the correct price is passed to PP. Is there a reason it won’t pass zero to PP or is there something I can do to avoid this step? Thanks as always
Fri 8 Dec 2017 at 01:10 #57128FrankyKeymaster(I’ve split this into a new thread, please don’t hijack threads …).
EME only goes to paypal if the price is >0. So this means the price is indeed not 0 when that decision is being made. See line 402,403 in eme_rsvp.php. The function call there (eme_get_payment_price) takes the discount for each booking into account too.
So: how do you know the price is 0 after booking but before going to paypal? And/or a demo would help too …Fri 8 Dec 2017 at 10:18 #57129AnonymousInactiveFranky, Thank you for the quick response and opening up a new thread. I’m afraid I can’t reproduce the problem this morning. The discount codes are reducing the price to zero and the system is not passing me to Paypal, although it did do so yesterday. I’ve created both absolute and percentage discount vouchers and they’re working. The only thing it doesn’t do is automatically approve the booking (as if it was paid for) but that would need some complex logic to know the price is zero and then auto approve. Thanks again for your help, and for building a great plugin
Fri 8 Dec 2017 at 10:50 #57130FrankyKeymasterWell, indeed if the price is 0 after discount and auto-approve is selected, it should be auto-approved. I’ll take a look at that.
Fri 8 Dec 2017 at 12:51 #57132FrankyKeymasterThu 14 Dec 2017 at 16:23 #57155AnonymousInactiveFranky. I’ve upgraded to the latest version today and for some reason with a 100% discount voucher I’m still being passed to Paypal and the amount showing to pay is the full amount. The discount code page is being incremented, and the price on the booking form is reduced to zero, but the field passed to PP is the full amount. I’ve got auto approve registration on payment ticked. Is there another setting I should enable or disable? If I use a discount that leaves an amount to pay it works fine. Also, is there a shortcode that I can use in an email to indicate which discount code has been used? As always, thanks for your excellent support.
Thu 14 Dec 2017 at 16:33 #57156FrankyKeymasterIs this reproducible? Meaning: always for 100% discount code?
There’s currently no discount placeholder for mails (yet), but it is a good suggestion.Thu 14 Dec 2017 at 16:39 #57158AnonymousInactiveYes – if you want to try it, http://vineyard.corfan.co.uk/events/15/midsummer-tour-morning-copy/ use voucher codes of 2018/001 to 2018/020
Fri 15 Dec 2017 at 00:03 #57163FrankyKeymasterI just figured it out while playing on your site …
This should fix it:
https://plugins.trac.wordpress.org/changeset/1787329/Fri 15 Dec 2017 at 00:08 #57164AnonymousInactiveThank you for taking the time to look at it so quickly.
Fri 15 Dec 2017 at 01:03 #57167FrankyKeymasterThis fix is in the just released version 2.0.12
Fri 15 Dec 2017 at 10:24 #57168AnonymousInactiveThank you – it works fine now with the discount being applied and being passed to PP correctly (or just marked as fully paid) That’s fabulous and just what’s needed. However, the field on the event form, #_DYNAMICPRICE does not show the price with the discount applied. Is there another field that will show that?
Fri 15 Dec 2017 at 10:28 #57169FrankyKeymasterargh … I tested the code with payments and paypal and applied discounts, but not the dynamic pricing placeholder … let me see
Fri 15 Dec 2017 at 10:42 #57170FrankyKeymasterI was a bit too quick yesterday, this fixes it completely now:
https://plugins.trac.wordpress.org/changeset/1787515/Also, for the discount calculated, you can use #_TOTALDISCOUNT in your mails.
Fri 15 Dec 2017 at 10:58 #57171AnonymousInactiveThanks for the fast solution – I’ve done enough programming to know how tricky it is. Thanks also for the #_TOTALDISCOUNT. It would be great to have the actual discount voucher entered, so the administrator can see which voucher has been used. It’s not at all urgent, but an idea for the future. Thanks again for all your help, it’s very much appreciated.
Fri 15 Dec 2017 at 11:00 #57173FrankyKeymasterI don’t actually store the used voucher with the booking (but only the calculated discount), so that’s currently not possible.
-
AuthorPosts
- The forum ‘Generic’ is closed to new topics and replies.