Posted: January 11, 2024 at 9:28 am
Trying to get my head around how the SPCO understands what cart to apply to. I have added the promotions addon, however due to the fact adds the promo code on the payment options step and we’ve customised this to automatically redirect to the only payment option we support (a custom one). I’ve tried to move the input for processing the promo code. After having multiple failures at doing this, I’ve added my own input and ajax call to an endpoint that uses the promotions submit promo code endpoint. However, I get: Uncaught Error: Call to a member function cart() on null in /var/www/html/wp-content/plugins/eea-promotions/EED_Promotions.module.php:750 Trying to figure out how promotions.js passes this information so that EE_Registry::instance()->SSN->cart(); is initiated |
|
Hi @TheFreshUK, I’m Event Espresso’s lead developer. Is your code uploaded anywhere public, like GitHub, where I can take a look at it? Without seeing your actual code it’s difficult to give you an accurate response. That said, here’s a couple of things to consider: – your AJAX requests will need to include the session key in a parameter named – the Event Espresso session is loaded during the WordPress Let me know if that helps or your need me to look at the code directly. |
|
This reply has been marked as private. | |
Hi @thefreshuk, Thanks for posting some code for me to look at. Can’t test your code fully, because obviously you’ve changed a bunch of things up and i don’t have access to everything else you have done, but pretty sure the problem with the code you’ve posted is: – line 10 of discount.js as soon as I fixed that, things appear to work correctly. |
|
You’re a legend Brent as always! that fixed it. Thanks! |
|
The support post ‘Ajax process SSN undefined’ 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.