Support

Home Forums Event Espresso Premium display event background image and logo in checkout

display event background image and logo in checkout

Posted: November 19, 2019 at 3:29 pm

Viewing 11 reply threads


Porter

November 19, 2019 at 3:29 pm

hello,

I am trying to change the checkout display by adding information about the event and the event background image, I tried the code for displaying feature image in “https://github.com/eventespresso/ee-code-snippet-library/blob/master/checkout/jf_ee_display_event_featured_image_on_spco.php” , however, it didn’t work, when I used the var_dump to display the event i realise that the feature image is an empty array “[“_feature_image”:protected]=> array(1) { [“full”]=> string(0) “” } “, can you please help me with this , thanks


Josh

  • Support Staff

November 19, 2019 at 3:43 pm

Hi,

May I ask does the event in question have a Featured Image set? A featured image isn’t necessarily the same thing as a background image.


Porter

November 19, 2019 at 3:47 pm

no, it has just a background image and a logo


Josh

  • Support Staff

November 19, 2019 at 3:49 pm

The code you tried actually uses the featured image set. So for it to work, you’ll need to set a featured image for that event.


Porter

November 19, 2019 at 3:51 pm

can I use a function that gets the background image and the logo


Tony

  • Support Staff

November 20, 2019 at 1:56 am

May I ask, where exactly are you setting a ‘background image and logo’ in the event?


Porter

November 20, 2019 at 5:10 am

that was some custom fields added to the event


Tony

  • Support Staff

November 20, 2019 at 5:15 am

Then $event->get_post_meta({custom_field_key}, true); should pull in the value for the key you set.

It depends what you are using to set them and if you know the custom field key.


Porter

November 20, 2019 at 11:49 am

thanks, I will try that


Porter

November 20, 2019 at 4:17 pm

it returned an int number so how can I get to the image from there


Porter

November 20, 2019 at 5:42 pm

I got it using get_field thank you very much


Tony

  • Support Staff

November 21, 2019 at 2:27 am

Ah, yeah ok.

If you’re using Advanced custom fields those custom fields are not ‘standard’ custom fields, using get_field does the background work to pull the right info for you.

Anyway, I’m glad you found it.

Any further questions just let us know.

Viewing 11 reply threads

The support post ‘display event background image and logo in checkout’ 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