Posted: October 30, 2013 at 4:36 pm
|
Hi there, My discount codes are giving the following error when I try to update them: Debug: Additionally, they don’t show up on Edit Event pages. |
Hi Sarah, That error looks like it only appears if you don’t modify the Coupon and then Update. I’ll get a ticket raised for that. Regarding them not showing up on the Edit Event pages, do you have Roles & Permissions (Basic) installed? |
|
|
Hi Tony, We do have Roles & Permissions installed. Also, I cannot delete the test improv codes. |
We reproduced both those issues locally and have issued tickets to get them fixed. With the Roles & Permissions add on, each user has their own set of promo codes to be used with their own events. So if User 1 creates Event A, User 2 creates Promo B. Are you the creator of the events you are creating the promo codes for? |
|
|
Hi Tony, Thanks for the quick response. Is there a way for all users to use all promo codes? Thank you, |
No Problem. It is possible yes, but requires editing Event Espresso core which we do not recommend and can not support. Having said that if you open event-espresso/includes/admin-files/event-management/promotions_box.php and go to line 46 you’ll find if (function_exists('espresso_member_data') && !empty($event_id)) { Comment the whole if function out (so from line 46 – 55) like: /*if (function_exists('espresso_member_data') && !empty($event_id)) { $wpdb->get_results("SELECT wp_user FROM " . EVENTS_DETAIL_TABLE . " WHERE id = '" . $event_id . "'"); $wp_user = $wpdb->last_result[0]->wp_user != '' ? $wpdb->last_result[0]->wp_user : espresso_member_data('id'); $sql .= " WHERE "; if ($wp_user == 0 || $wp_user == 1) { $sql .= " (wp_user = '0' OR wp_user = '1') "; } else { $sql .= " wp_user = '" . $wp_user . "' "; } }*/ That will then show all Promo codes from the DB for all events. Note this is un-tested. You may find other places with restrictions so I advise fully testing a registration (with another users promo code) on an event after you’ve made this modification. Also, as this is editing core this will be lost after each Event Espresso update and will need to be re-done. |
|
|
Hmmm, would it be possible to override this using the custom functions add on? |
Not at this time. However if the Roles and Permissions add-on is not active all users who have access to the Event Espresso menus will have access to all of the Promo codes. If you need to restrict some admin capabilities for some users you might consider using the Advanced Access Manager plugin. It allows you to restrict specific capabilities for specific user accounts. |
|
|
Thanks for the advice Josh! Ok, so I’ve removed the Roles & Permissions add on and added the discount code to my event – however, it’s not showing up on my cart page: http://monkeybusinessinstitute.com/event-registration/?regevent_action=show_shopping_cart Any ideas? thank you! |
If you go to Event Espresso -> General Settings. Scroll down to ‘Optional Event Settings’. Make sure ‘Allow discounts in the shopping cart?’ is set to Yes and then update the settings. This will allow the Coupon Codes to display on the shopping cart. |
|
|
Thanks! Sorry I missed it. Ok, here is the next issue – when I activated the coupon codes in the shopping cart, it did not update the price. As a matter of fact, I checked out for $60, but the coupon was supposed to only take $12 off. Please advise. |
If you go into the event that you want the discount to apply for, is the Allow Promo codes option set to yes and is the box next to the discount code checked? |
|
|
Hi Josh, In regards to your last question, all of the fields were checked and the box appeared. However, since the site is live now, I can’t leave these options checked and run the risk that the cart won’t work. I will make a copy of the site this weekend for testing so you can see what I’m talking about. Thanks. |
Hi Sarah, Can you verify that the “Allow discount codes” option is set to yes for the event you are trying to apply discount codes for? |
|
The support post ‘Discount Code Bug’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.