Support

Home Forums Event Espresso Premium Display Event Cart only when not empty?

Display Event Cart only when not empty?

Posted: September 14, 2015 at 12:50 am


Boris Schickedanz

September 14, 2015 at 12:50 am

Hi,
is there a way to show the event cart widget only when it is not empty?

And can I link to the shopping cart from a menu / display the shopping cart on a page?

thank you,
Boris


Boris Schickedanz

September 14, 2015 at 1:01 am

Ok, got the Menu-Link figured out… using it like this:

/registration-checkout?event_cart=view#checkout


Dean

September 14, 2015 at 6:45 am

Hi Boris,

Hiding the widget can be done, but it involves code.

Copy this file to your theme folder (ideally a child theme, as updates to your theme will remove this file):

/wp-content/plugins/eea-multi-event-registration/templates/widget_minicart_table.template.php

rename the file (but leave the .template.php intact): e.g. my_new_template.template.php

Edit that file and insert this near the top:

if( EE_Registry::instance()->CART->all_ticket_quantity_count() == 0 ) {
	return;
}

Screenshot: http://take.ms/CNmBb

Then you add the following to your theme’s functions.php file:

add_filter('FHEE__EEW_Mini_Cart__form__minicart_templates', 'my_custom_mer_mini_cart_template', 10, 1 );
function my_custom_mer_mini_cart_template( $minicart_templates ) {
	$newtemplate = get_stylesheet_directory() . '/my_new_template.template.php';
	array_push( $minicart_templates, $newtemplate );
	return $minicart_templates;
}

Now, in your WordPress admin, go to Appearance > Widgets. Either add a new Cart widget or edit your existing one. Change the Mini Cart Template dropdown to the one you just edited (it will show the filename you gave it).

Save the widget.

Now the widget will not appear when empty but if there is something in the cart it will appear.

  • This reply was modified 7 years, 8 months ago by  Josh. Reason: added missing step


Boris Schickedanz

September 14, 2015 at 1:29 pm

Thank you Dean… I might try this. Would be cool to have it as a feature in the widget.

thx!
Boris


Lorenzo Orlando Caum

  • Support Staff

September 14, 2015 at 2:09 pm

Hi Boris, were you able to get Dean’s suggestion working?

Thanks


Lorenzo


Boris Schickedanz

October 1, 2015 at 12:57 am

Well… no. I have more troubles with this cart. Someone added a free ($0.00) event, and one for $75, all with a new user. Payment was done, but registrations did not work “failed”. So I disabled it again.
My customers are usually not very technical, so I can’t give more info on this one.


Lorenzo Orlando Caum

  • Support Staff

October 1, 2015 at 9:49 am

Hi Boris, the suggestion that Dean shared does not affect registrations. It is more of a customization for display.

It sounds like a registrant try a free registration along with a paid one and that failed?

Are you using an up to date version of Event Espresso 4?


Lorenzo


Boris Schickedanz

October 1, 2015 at 10:26 am

Hi Lorenzo,
yes I am aware that if the suggestion was about hiding an empty cart. However, since the cart is only useful/available for multi event registrations, and these seem to be buggy at some point, I don’t need this fix anymore.

I am not really sure what the customer did, she said she signed up for two events, one is free… and somehow it didn’t work, so she had to remove one from the cart and register again. – Can’t bug her any more with this, she’s annoyed enough because it didn’t work, sorry.

The paypal payment went through, she even got registration confirmations – but the transactions weren’t linked to her user, nor to the registrations. In only have failed transactions in the backend… the one for the free event is marked “overpaid” by the amount for the other event.

Is there a way I can register customers for a event? The problem is, she doesn’t appear on the registrations lists now, so I can’t send any messages, and ofc I might get confused if this happens more often.

thank you,
Boris


Boris Schickedanz

October 1, 2015 at 10:27 am

Oh and yes, I always use the latest version when it is available


Lorenzo Orlando Caum

  • Support Staff

October 1, 2015 at 11:00 am

Hi Boris,

You can manually register registrants through the WP dashboard:

https://eventespresso.com/wiki/manually-add-registrant-wordpress-dashboard/

Is this what you are looking for?


Lorenzo


Boris Schickedanz

October 2, 2015 at 12:00 am

Yes, thank you!


Lorenzo Orlando Caum

  • Support Staff

October 2, 2015 at 11:54 am

Hi Boris,

Were there any other questions? If not, could you update your support post to resolved?

Thanks


Lorenzo


Boris Schickedanz

October 3, 2015 at 1:13 am

All done, thx. Hope things with not-linked transactions/payments will be solved soon…

The support post ‘Display Event Cart only when not empty?’ 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