Closed boethius closed 6 years ago
link to snippet in question: https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/bc_add_cart_modifier.php
Isn't there supposed to be some kind of update to cart triggered once the payment methods are triggered over the XHR requests?
No sorry, that snippet hooks into the payment options form processing request to add the line items, not when you are switching payment options, so it does not update the payment options screen immediately.
Why? Because that is beyond the scope of that snippet, since updating the DOM via AJAX can be quite complex. It would also require repeated updates whenever someone switched away from invoice to something else, so the line items are only generated when the form is submitted, which is why they appear correctly in steps 4 and 5 as you have noted.
If you are concerned about customers being aware of this extra charge, you should add some text to your invoice settings description in the payment methods admin. That text appears on the frontend when they select invoice.
Hope that helps
Line Items are not updated upon payment method change.
Affected snippet:
ee-code-snippet-library/checkout/bc_add_cart_modifier.php
Expected
Actual
3.i. and 3.ii. do not occur. The user does not see any changes to the total until 4. Isn't there supposed to be some kind of update to cart triggered once the payment methods are triggered over the XHR requests?
Environment