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
Ways to empty the cart | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Ways to empty the cart

Ways to empty the cart

Posted: February 6, 2014 at 2:43 am

Viewing 4 reply threads


Morten Mouritzen

February 6, 2014 at 2:43 am

do_shortcode
do_shortcode(‘[ESPRESSO_CANCELLED]’);

I take it that no “echo” is needed infront since is a action and not a output?

Page with shortcode
Redirect to some page with this shorcode on and the cart will be emptied [ESPRESSO_CANCELLED]

Adding a link to press which clears the cart
Something like..
<a href="some_ee_url">Clear cart</a>

Its important to note that im refering to a AJAX look-a-like functionality. Im not interested in a page reload or a page-redirect, i can do that with the upper two. The empty cart link have to function the same was as “add to cart”. A spinnin wheel (gif file i presume) will apear and the functionality will be executed.

The top 2 solutions is not a issue, im just showing what i already know. The one im missing is bottom solution with the HTML link.

Is that possible?


Dean

  • Support Staff

February 6, 2014 at 4:41 am

Hi,

There isn’t an inbuilt way to clear the cart in one go, barring heading over to the [ESPRESSO_CANCELLED] page, which basics launches a PHP function to clear the session.

You could perhaps modify the jQuery that deals with deleting a single event from the cart and create a new function to clear all and attach that to a button


Morten Mouritzen

February 6, 2014 at 4:43 am

Hello Dean :-)

Ok i see.

I take it that it would be totally possible for me to write a new function called __ex_clear_cart(); and make that function clear the cart session array?

Do you see any problem with that?


Dean

  • Support Staff

February 6, 2014 at 5:05 am

I don’t see any issues, so long as you load the jQuery in correctly. I would advise using the custom_functions.php or a custom plugin to load the jQuery.

Of course you will need to edit the cart template as well to insert a button (unless the button is in the sidebar etc).


Morten Mouritzen

February 6, 2014 at 5:07 am

Yea i already have a custom_functions.php :-)

Ok Dean, thanks for the help.

Viewing 4 reply threads

The support post ‘Ways to empty the cart’ 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.

Event Espresso - Staging Server