Posted: August 12, 2024 at 4:09 pm
We have it configured to automatically apply a discount code depending on the location they select during signup, and the discount IS being applied when you finalize the transaction, but the discount is not being displayed on the Checkout Page. |
|
Hi there,
This isn’t something EE supports out of the box, so may I ask how you are doing this? I’m assuming some custom code? I’ll need some more details on this to see if I can help further here. Can you link me to an event I can register onto to view this? |
|
Here is what we’re using: <?php $do_discount = false; if ( $checkout instanceof EE_Checkout ) { if ($spco_obj != NULL) { $spco_registrations = $spco_obj->checkout->transaction->registrations($spco_obj->checkout->reg_cache_where_params, TRUE); // get the answer to the custom CC optin question if ( !empty ( $answers ) ) { if ( $schools[$optin] ) { $transaction = $checkout->transaction; if ( $transaction instanceof EE_Transaction ) { if ($do_discount === true) { if ($cart instanceof EE_Cart) { $cart->get_grand_total()->get_model()->refresh_entity_map_with( $tmp_promotion = new EED_Promotions; $promotion = $tmp_promotion -> get_promotion_details_from_request($discount_code); if ($promotion instanceof EE_Promotion) { if (! empty($applicable_items)) { foreach ($applicable_items as $applicable_item) { if ($verify_no_existing_promotion === true) { Here is an event: A Valid Selection would be to Choose the Fremont School with the “Fremont” code. |
|
The support post ‘Automatic Discount Code Not Being Shown During Checkout’ 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.