Support

Home Forums Event Espresso Premium no background on event display!

no background on event display!

Posted: December 1, 2013 at 7:38 pm


Breakwater School

December 1, 2013 at 7:38 pm

Hi,

Suddenly my registration event list pages look weird. The white background is no longer there and fields are out of place. I have tried uploading the original css and php files for both event espresso and my theme and nothing worked.

Here’s the code for this page:

<code>&lt;h1&gt;&lt;span style=&quot;color: #80ab00;&quot;&gt;Session 2: November 4th-December 20th&lt;/span&gt;&lt;/h1&gt;
&lt;h2&gt;&lt;img alt=&quot;602082_10151886704639695_302240409_n&quot; src=&quot;http://breakwaterschoolregistration.org/wp-content/uploads/2013/10/602082_10151886704639695_302240409_n3.jpg&quot; width=&quot;531&quot; height=&quot;354&quot; /&gt;&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span style=&quot;color: #80ab00;&quot;&gt;Please click &lt;a href=&quot;http://breakwaterschoolregistration.org/?page_id=625&quot;&gt;&lt;span style=&quot;color: #80ab00;&quot;&gt;here&lt;/span&gt;&lt;/a&gt; to register for childcare in conjunction with your class.&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span style=&quot;color: #80ab00;&quot;&gt;Login to use the &quot;add to cart&quot; functionality (recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
[EVENT_LIST category_identifier=youthculinaryartslanguage order_by=event_name]</code>

Please help! Our registration is opening soon.

Thank you so much,
Ashleigh


Seth Shoultes

  • Support Staff

December 2, 2013 at 1:51 am

Hi Ashleigh,

Can you please send us a link to the page?


Breakwater School

December 2, 2013 at 7:17 am

Yep, it’s right here http://breakwaterschoolregistration.org/?page_id=646
Notice how in the ninth event down the page heading and image are stuck in there. The black and white image and session dates, along with the bulleted points, are suppose to be at the top of the page, not embedded in that one event.


Breakwater School

December 2, 2013 at 7:18 am

As you’ll see, in the actual events the background is white, but the page or background behind the events is non-existent, making it difficult to read and see text.


Breakwater School

December 2, 2013 at 7:29 am

I also just noticed that the event boxes get smaller as you scroll down.


Tony

  • Support Staff

December 2, 2013 at 7:58 am

Hi,

This is usually caused by outdated templates in the wp-content/uploads/espresso/templates folder.

A simple check would be to rename this folder to something other than templates (templates-temp for example) and reload the page.


Breakwater School

December 2, 2013 at 8:38 am

Hmm, I did that and nothing seemed to change.


Breakwater School

December 2, 2013 at 8:54 am

I also previewed with TwentyTwelve and the same thing is happening, so that means it must be inside event espresso files right?


Tony

  • Support Staff

December 2, 2013 at 9:52 am

Have you modified any core template files?
If this was an issue with EE files I would think it would be more widespread.

Possibly HTML tags within the event descriptions.

Is if possible for us to take a look?

If so please send log-in details using https://eventespresso.com/send-login-details/


Tony

  • Support Staff

December 3, 2013 at 4:45 am

Hi there,

There’s a few issues here.

The default templates in event-espresso/templates/ have been altered, I’m assuming in the same way the templates in wp-content/uploads/espresso/templates have been.

This means that disabling the modified templates in the uploads folder just uses the modified templates within event-espresso/templates.

I would advise backing up all the files on the site, we have a guide available here https://eventespresso.com/wiki/how-to-back-up-your-site/
(may as well do a full backup including the database as its a good habbit to get into anyway)

Then update Event Espresso to the latest version (currently 3.1.36)

This will revert the templates within event-espresso/templates to the current stock versions (your modified versions will still remain within wp-content/uploads/espresso/templates)

Then unfortunately due to having modified templates you’ll need to port over your changes to the latest versions. We advise the use of something like DiffMerge to identify the differences between your templates and the latest ones, then either transfer your changes to the new templates, or update your templates with any new code to match the new versions.

Also within your themes .css file (line 81) is the rule:

body, div { margin: 500; padding: 0;  }

Which is causing unexpected output. That rule puts a ‘500’ something (the browser is assuming pixel’s) margin around the body tag but also any div tags (which are wrapping your cart links currently). I would advise at lease removing the ‘div’ selector, depending on what that rule is there you may need to add another to achieve the desired result without the targeting all divs.

If none of the above seems familiar then make sure you backup all your sites files, plus database before attempting any fixes.


Breakwater School

December 3, 2013 at 9:24 am

I just followed all directions and the windows are still becoming incrementally smaller as you scroll down. I have tested the default theme css and nothing changed. I removed the 500 from the style sheet and the div and nothing changed…still confused as to what to do? Should I remove div tags from the pages? Thanks again for taking the time to help as this is an urgent matter!


Breakwater School

December 3, 2013 at 9:30 am

And the background is not white like it is on the other pages.


Tony

  • Support Staff

December 3, 2013 at 10:03 am

Although it may seem like nothing has changed the layout has fixed on pages previously broken, so we are getting closer.

Investigating currently.


Tony

  • Support Staff

December 4, 2013 at 5:00 am

The issue here seems to be with the [ESPRESSO_CART] shortcodes.

More specifically the format of the link to the Add to cart image.

I’ve added a corrected version to pastebin so the forum code editor does not alter it and make this even more confusing. http://pastebin.com/benLSbzz

Rather than having to update all events with the link, you could modify the custom templates you have to display an image in place of the ‘Add to cart’ link that will apear next to ‘View Details’ once the event becomes active.

I can talk you through it if that would that suit better?


Breakwater School

December 4, 2013 at 8:04 am

Oh, great. I was wondering if there was a way to link the add to cart button without having to go into each event.

I assume I will need to delete the short code from each event, then modify a template with the new code? I would prefer to link the add to cart image that I created and get rid of the view details button, as I only want customers to add events to the cart and then register and checkout (there’s really no need for them to view details beyond the event list).

If you could help me figure out where to put this code and link it to my cart image, I would greatly appreciate it! Thank you so much for all of your help!


Tony

  • Support Staff

December 4, 2013 at 8:18 am

The first thing to start with is to remove the add to cart link from all the events descriptions and check that this resolves the layout issue.

The events are currently closed for registration, (registration start date has not passed) so cart link will not be displayed at all. That is the reason you currently see ‘We’re sorry…’ error.

If you want the events to be open as of now, when removing the cart link from the description, set the registration start dates to a date before today. So for example, for the event ‘Aerial Arts: Aerial Improv, Grades 3-8’ you currently have http://d.pr/i/XNrG

Set the registration start date to 2013-12-03 and update. The event is now open to registrations and add to cart will be displayed. So if you want all the events to be open you’ll need to do this to all.

Check that actually fixes the issue and then we’ll look at modifying the output.


Breakwater School

December 4, 2013 at 8:46 am

Okay. That seemed to work. Our registration doesn’t open until Dec 9th, but I can certainly change the registration date for one class to for testing purposes.

I’m ready to imbed the add to cart link into the template!


Tony

  • Support Staff

December 4, 2013 at 9:16 am

Just a quick note on the html tags within the event description, be careful of non closed tags, there was an open div tag within ‘Aerial Arts: Intro to Trapeze, Grades K-2’ which still caused a slight issue. I’ve removed it now. More so to cause less confusion later on if things go wrong.

To change the output of the event list you’ll modify /wp-content/uploads/espresso/templates/event_list_display.php

I’ve pasted snippet’s of code here http://pastebin.com/tu80JACn

If you follow along with that you should end up with just the ‘Add to cart’ image.


Breakwater School

December 4, 2013 at 9:40 am

Thanks for the heads up about the div tags.

I just made the changes and am now getting this error: http://breakwaterschoolregistration.org/?page_id=646


Tony

  • Support Staff

December 4, 2013 at 9:49 am

Ah, Make sure line 130 has a comma (,) on the end.


Tony

  • Support Staff

December 5, 2013 at 2:03 am

Just checking in to make sure everything worked ok?

Did you set an event to active registration to make sure the cart button loaded correctly?


Breakwater School

December 5, 2013 at 9:11 am

The button loaded correctly (there was an “or” before it, but i figured out how to delete it in the php file so it’s all set). Thank you for your help!

I am wondering if there’s a way to change the “view cart” link to an image similar to the one I made for “add to cart”, that automatically populates when something was successfully added to the cart?


Dean

December 6, 2013 at 3:57 am

With CSS, add the following to your themes style.css file or a plugin such as My Custom CSS.

.ee_view_cart {
text-indent: -9999px;
background: url(http://breakwaterschoolregistration.org/wp-content/uploads/2013/11/addtocartbutton1.png) 0 0 no-repeat;
display: inline-block;
min-height: 42px;
min-width: 142px;
}


Breakwater School

December 7, 2013 at 3:32 pm

Hi Dean,

I added it to the style sheet and it doesn’t appear after I’ve added something to the cart. Might I need to change something in a php file instead?

Also, I need the add to cart function to display on a an event page. To see what I mean, please go to http://breakwaterschoolregistration.org/?page_id=800 and click on the event in the upper left hand most corner (cartooning grades K-2). Registration is open for that event for testing purposes. In the event list php file the add to cart button appears, I want to make sure that it does here as well (but does not display registration information as I only want that to display at checkout).

Thank you very much for your help,
Ashleigh


Tony

  • Support Staff

December 9, 2013 at 4:28 am

Do you want the cart button added for all the events or just specific ones?

Reason I ask is you have two options. You can either add it to the event description as before (if only for a few events) or add the cart button to the template file if it is to be included for all events?


Breakwater School

December 9, 2013 at 5:41 am

I would like it to be included for all events!


Tony

  • Support Staff

December 9, 2013 at 6:48 am

If you open up your modified registration_page_display.php file go to line 244 and make some space under the opening php tag.

Paste something along the lines of http://pastebin.com/J9EqCWZG

Save and check the registration page. It should not had the add to cart image at the bottom.


Tony

  • Support Staff

December 9, 2013 at 7:00 am

Apologies, I’ve just realized you do not display the registration form nor address.

In that case the above applies but you need to place the code around 44. Between the opening PHP tag, and the closing parentheses ( } ).

Or wrap the code in its own PHP tags and paste below. Basically it depends on which section of the page you want the cart displayed.


Breakwater School

December 9, 2013 at 12:28 pm

Hi Tony,

The view cart button now appears, but I only want it to appear after add to cart is clicked. So, I need the add to cart button to populate, then the view cart to populate after it’s been added to cart. I would also like to add this to the event list display (such as on this page: http://breakwaterschoolregistration.org/?page_id=161) just like I added the add to cart button before. I really appreciate your help!

Thank you,
Ashleigh


Tony

  • Support Staff

December 10, 2013 at 3:03 am

Hi Ashleigh,

The ESPRESSO_CART button is contextual, in that if the event is already in the cart it will display ‘View Cart’ if not it will display ‘Add to Cart’.

You can either clear your browsers cache, or go to the page which has the [ESPRESSO_CANCELLED] shortcode (usually called registration-cancelled) to clear the session and remove all events from the cart.


Breakwater School

December 10, 2013 at 7:54 am

Are you seeing add to cart? My cart is empty and the cache is cleared and the view cart is still displaying.

http://breakwaterschoolregistration.org/?page_id=18&ee=208


Tony

  • Support Staff

December 10, 2013 at 8:33 am

It looks like you are using the wrong img link when creating the button.

In your registration_page_display.php check the ‘anchor’ attribute is using the addtocart.jpg and not viewcartbutton.jpg in the code I posted previously.

You can also direct to user directly to the cart when add to cart is clicked but adding ‘direct_to_cart’ => 1, to the attribues. Such as http://pastebin.com/KhRFbWda

The support post ‘no background on event display!’ 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