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.