Posted: November 18, 2016 at 3:17 am
|
Hi I was wondering something, in https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/bc_add_cart_modifier.php you can add a cart modifier, however this information is not expelled to the AJAX Requests, so the cart isn’t updated when you select the payment method. There are no errors with the requests. It works when you view the invoice, but it would be great if you could view it while buying the tickets. This used to work in EE 4.9.0p, but does no long in .21p. Have you changed something, and what can I do to get it to work again? Thank you! |
The code example from the library still works when I test it on 4.9.21.p. May I ask have you changed something within that snippet? |
|
|
Hi, thanks for replying. Well I am trying to adapt it so that it works for other payment methods too. If you want, I can PM you access to the site (it’s behind htpasswd). |
Hi Sebastian, That particular snippet was written to work for only the invoice option (and could also work with the other offline payment method like Pay by Check). A developer would need to refactor that code to make the modifier happen with other payment methods. |
|
|
Hi Josh Thanks for your reply. I am in fact a developer, and I nor any of my developer friends can figure out why this snippet has stopped working like it should. I will again describe the expected scenario and at which point the snippet fails. Expected Actual Again, I am talking about the BASE CASE, code that is copy pasted verbatim from “your” github repo with the payment method invoice. Adding this snippet as a Plugin or extending functions.php in the could theme makes no difference. I use the theme with my other functional EE Gateway project from where I know that it displays it on change. Please gives this issue a little more attention Thanks |
So the code from the snippet library was written to be used with the invoice payment method. This isn’t a case where it stopped working, it never worked with other payments. You can open up a github issue and discuss with one of the developers. https://github.com/eventespresso/ee-code-snippet-library/issues |
|
|
Hi Josh I’ve opened an issue the repo, as you recommended. It seems my communication skills might be lacking. I am saying it doesn’t update immediately even if I use it with invoice. Apart from installing everything from scratch, is there something I missed? * I followed the recommended practice of creating a separate plugin. Is there some setting I missed in the EE that would otherwise inhibit this from working? This is a stage environment, so I don’t have the license key in it. Do I need to license key environment for this to work? Thanks |
|
Sorry, it is still me, |
It’s actually working exactly as coded. You’ve imagined that it’s supposed to adjust the totals on steps 3.1. and 3.2 where “Total is adapted to reflect the newly applied extra fee” & “The additional fee is added as a line item to the cart”. It doesn’t adjust those totals at that exact moment in time. This actually happens after step 4.
No, if you take a careful look at the code, you’ll note that the license key does not inhibit or restrict functionality in any way. |
|
The support post ‘Add Cart Modifier’ 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.