Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 Trying to hack Add to Cart Button functionality | Event Espresso - Staging Server
Hello, I’m in the processes of customizing the event_list.php and event_list_display.php templates and am hoping to change the behavior of the Add to Cart button. Basically instead of “Add to Cart” changing to “View Cart” which then moves the user to the cart I would like “Add to Cart” to alternate with “Remove from Cart” with a single button at the bottom of the list to move onto the next step (view the cart and select quantities).
It appears my best hope is hacking a couple lines in cart.php. Specifically I’m looking at:
It seems that adding “$registration_cart_class = ‘ee_remove_item_to_cart’;” to the IF statement while changing $registration_cart_url to “javascript:void(0)” (so the link does not take you off page) does successfully remove the item from the cart. Unfortunately , I’m left with the spinning symbol and it never reverts back to “Add to Cart.”
I suspect there might be something similar to “®event_action=delete_event_from_cart” that I should pass along in the URL but I can’t see to find it or fully figure out how the Add to Cart > View Cart change happens.
The support post ‘Trying to hack Add to Cart Button functionality’ 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.