Posted: June 6, 2014 at 9:14 am
|
When we use a discount code the correct amount is showing on the email, however it’s applying the discount code twice (on USAePay side). So the net result is a double discount even though the front end is showing correctly. ie. $250 camp, $50 discount, showing $200 on the email, charging $150 on the card. Here is the code of the custom template shopping_cart.php in case there is something in there?
<?php if ( !function_exists( 'event_espresso_shopping_cart' ) ){ function event_espresso_shopping_cart() { if ( event_espresso_invoke_cart_error( $events_in_session )) { $events_IN = array(); if ( count( $events_in_session ) > 0 ){ $events_IN = implode( ',', $events_IN ); if ( empty( $events_IN )) { $sql = "SELECT e.* FROM " . EVENTS_DETAIL_TABLE . " e "; $result = $wpdb->get_results( $sql ); $reg_page_url = add_query_arg('regevent_action', 'load_checkout_page', get_permalink($org_options['event_page_id'])); ?> <form action="<?php echo $reg_page_url ?>" method='post' id="event_espresso_shopping_cart"> <?php $r = apply_filters( 'filter_hook_espresso_shopping_cart_event', $r ); //Check to see if the Members plugin is installed. <h3 class="event_title ui-widget-header ui-corner-top"><?php echo stripslashes_deep( $r->event_name ) ?> <span class="remove-cart-item"> id ?>" alt="Remove this item from your cart" src="<?php echo EVENT_ESPRESSO_PLUGINFULLURL ?>images/icons/remove.gif" /> </span> </h3> <input type="hidden" name="event_name[<?php echo $r->id; ?>]" value="<?php echo $r->event_name; ?>" /> </div><!-- / .event-data-display --> <?php <?php if ( function_exists( 'event_espresso_coupon_payment_page' ) && isset($org_options['allow_mer_discounts']) && $org_options['allow_mer_discounts'] == 'Y' ) : //Discount code display ?> <?php if ( function_exists( 'event_espresso_groupon_payment_page' ) && isset($org_options['allow_mer_vouchers']) && $org_options['allow_mer_vouchers'] == 'Y' ) : //Voucher code display ?> <div id="event_espresso_notifications" class="clearfix event-data-display" style=""></div> <div id="event_espresso_total_wrapper" class="clearfix event-data-display"> <p id="event_espresso_submit_cart"> </div><!-- / .mer-event-submit --> }
|
Hi RTDev, I don’t see anything in your code that changes the discoount/amount sent to USAEpay, do you have anything else customized? Perhaps a function that is used later in the process? Also, which of the two USAEpay options is this happening on? Is it off-site or on-site? |
|
|
We aren’t using any other functions beyond that…and we’re using the off-site version. Is there something else I can check in terms of a function/file to see if it’s been modified? What’s odd to me is that it’s showing everything correct on the front end and emails and all that, but not passing through to USAePay correctly. And it’s just on the amount discount codes. The 100% codes we are using are working fine. |
Yes, if any of Event Espresso’s functions that get called during the registration have been modified this might cause some issues. You might also check the USAEpay gateway files. Another thing to check is the input values that get sent to USAEpay from the payment page. You can check this by testing a registration with the promo code, and right click/inspect element on the USAepay button from the Chrome browser. |
|
|
There really is nothing else that has been modified. I’m not sure what else to do here to figure out what’s wrong. It seems that the USAePay gateway may be the culprit but those files haven’t been modified. Please advise. |
Can you check the input values that get sent to USAepay? If not, can you set up a test event with a test promo code and let us know where we can test it in order to investigate? |
|
|
So if you go to http://www.sahs.org/summer-classes-camps-2014/ and add the Baseball Camp to cart, then use promo code SS14ZA you can see the discount being applied. I tried looking into the button but didn’t see anything that would be heading over to USAePay? |
From what I can see in the source code of the credit card form, it looks like EE is sending the correct amount. Here is a screenshot: http://www.screencast.com/t/LTtTt7ykHu0I This is the amount I owe:
|
|
|
So strange. I have no idea how they are then getting a lower amount once it gets to the USAePay side?? I wouldn’t think there is any other call that would pass through the discount amount? |
You can try temporarily turning on debugging in the Event Espresso > General Settings. After testing a few registrations and payments, you can look at the logs to see if you notice anything strange. |
|
The support post ‘Multi-Registration Discount Code Issue’ 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.