Support

Home Forums Event Espresso Premium [Cost] shortcode in registration confirmation emails not correct

[Cost] shortcode in registration confirmation emails not correct

Posted: February 28, 2013 at 1:22 pm


Randy

February 28, 2013 at 1:22 pm

I have searched for answers to this but nothing I’ve found has helped. The [cost] short code in the registration confirmation email shows $0.00 even though there is a cost.

How can I correct this?

I am using 3.1.30.7

I read also in my searching that the [cost] short code does not reflect the price per registrant when registering multitple people. Is that still pending correction?

thanks.


Dean

March 1, 2013 at 2:20 am

Hi Randy,

Have you got the WP User Integrastion (Members) plugin active? If so have you set a members price as it could be that the email is sending a zero price as that’s what is set.

My tests have shown no issues with the cost shortcode.

I read also in my searching that the [cost] short code does not reflect the price per registrant when registering multiple people. Is that still pending correction?

Yes, it still shows the full amount of the group tickets, rather than individual ticket prices.

I am doubtful this will be changed before 3.2 is released.


Randy

March 1, 2013 at 7:59 am

Dean, I do not have the WP User Integration add-on installed and at this time I don’t know that I actually need it for our use.

I thought the default registration confirmation email was part of the core system files and that the [cost] shortcode would work “out of the box”.

Right now, on any event that has a cost the emails still reflect $0.00 in every email.

I can work around the total cost being shown instead of per registrant until 3.2 is released.

Is there anything I can do for now to at least get the short code to reflect some sort of value?

thanks
Randy


Dean

March 1, 2013 at 9:29 am

Hi Randy,

The [cost] shortcode does work out of the box, and I can’t seem to break it in my test servers.

Are any other shortcodes failing?

Have you trouble shot the site by disabling the plugins except EE and testing the email?


Randy

March 1, 2013 at 10:24 am

Hi Dean, yes I did deactivate all my plugins and still have the issue. I don’t think any other short codes are failing. I’ve not seen anything that looks like another code failing.


Josh

  • Support Staff

March 1, 2013 at 12:09 pm

Hi Randy,

One thing that I would check is for any templates in /wp-content/uploads/espresso/templates. If there are older copies of the registration_page templates, confirmation_display.php, or payment_page.php in there (from a previous version of Event Espresso) , it could throw this off.

The same is true if there are any old gateway files in /wp-content/uploads/espresso/gateways.


Randy

March 1, 2013 at 12:26 pm

Josh, this actually brings up a question I have had about modified templates in the uploads folder in general. When do they become too old to use? It seems that at some point I will need to modify the new versions of those files in order to keep up to date right? that is something I have wondered about.

In any case I have 4 templates modified.

confirmation_display.php
Registration_page_display.php
widget.php
payment_page.php

Payment_page.php is probably the oldest file, probaby back on October or maybe before.

So 2 questions:

How do I identify from what version my modified files belong?

How do I confirm that a modified file is no longer compatible or do I need to make it a habit of always putting my customizations into the new versions?

Thanks.
Randy


Josh

  • Support Staff

March 1, 2013 at 12:32 pm

We recommend using the diffmerge tool to do a file comparison between the old and new files. If you only have a few customizations made in the files, it might be simpler to grab the new copies, add in your changes, and upload them to /wp-content/uploads/espresso/templates.

If you’re only changing things like wording (text strings), you can avoid modifying templates and use a custom function that replaces the text strings with the gettext filter. Here is some example code that you could use to change text strings if that’s what you’re after:

https://gist.github.com/joshfeck/4962940


Randy

March 1, 2013 at 12:32 pm

Josh, I just went in and removed both payment_page.php and registration_page_display.php from the uploads folder however the [cost] short code still displays a $0.00 in the confirmation email.

Randy


Josh

  • Support Staff

March 1, 2013 at 12:34 pm

How about confirmation_display.php?

Dean and I have been testing this on our installations and the [cost] email shortcode is working as expected.


Randy

March 1, 2013 at 12:41 pm

I actually didn’t add that file to the uploads folder until yesterday but I’ve been having the problem for a while now so I didn’t think the confirmation_display.php file would be suspect.

However I went just now removed both the confirmation_page.php and the widget.php but the confirmation email still shows $0.00.


Dean

March 3, 2013 at 9:00 am

Is it possible to get your login details in order to look into this?

If so, please send them via https://eventespresso.com/send-login-details/

NOTE: login details need to be Admin level.


Randy

March 4, 2013 at 7:18 am

Dean, I’ve sent the login info via the form. I hope you find something that is causing the issue.


Dean

March 4, 2013 at 11:48 pm

Hi Randy,

OK, the cost shortcode is returning 0.00 on your site. Why it is doing this is unclear as on clean systems it is working just perfectly.

You will need to trouble shoot this.

First off rename the wp-content/uploads/espresso folder, there are modified files in there which may affect it.

If that doesn’t resolve it then disable all plugins except EE and change the theme to a default theme. If the shortcode works, then it’s a plugin/theme conflict and bringing them back on one by one and testing each time until the issue is found.

If after that it is still not working and no culprit found, let us know.

Also, you have a caching plugin, but don’t seem to have “white listed” Event Espresso pages. Please do because cached EE pages can cause site issues.


Randy

March 5, 2013 at 7:29 am

Dean, I replaced the theme with the default theme and disabled the cache plugin. I had previously (before you logged in) tried to disable all plugin and I had removed all the files from the uploads folder. the [cost] shortcode still does not reflect the price in the registration confirmation email.

What should I try next?


Randy

March 5, 2013 at 7:30 am

Dean if you need to log back in please let me know first as I’ve changed the password again but I can reset it for you if you need to log back in.


Josh

  • Support Staff

March 5, 2013 at 8:54 am

Hi Randy,

It’s very important to make sure that the registration pages do not get served as cached files. When I checked your registration page today, this was in the page source in the footer:

<!-- Cached page generated by WP-Super-Cache on 2013-03-05 09:40:08 -->

You’ll need to disable caching for the event-registration page and the other pages that handle the payments/transactions (typically thank-you and transactions) so that Event Espresso can work as expected.

You can disable caching for these pages by going to the wp super cache advanced settings, and there is an option under “Accepted Filenames & Rejected URIs” that will let you list pages that are not to be cached. With default Event Espresso installation the text box will look like this:

screenshot

After you save this setting, you’ll need to clear the cache to make sure the registration pages are not being served as cached files.


Randy

March 5, 2013 at 2:33 pm

Josh, I deactivated the cache plugin, cleared the cache data, removed the cache folder in wp-content and then tested again. It still shows up as $0.00 in the registration confirmation email.


Josh

  • Support Staff

March 6, 2013 at 8:16 am

Hi Randy,

Can you check to see if there’s a copy of gateway_display.php in /wp-content/uploads/espresso/gateways and if there is, remove it?

In order to investigate this further, we will need temporary WP admin access and temporary FTP access. We may also need to create a test event and run a few test registrations with debugging turned on.


Randy

March 6, 2013 at 9:52 am

Josh, I’ve removed the gateway_display.php file and created a temporary password for you for the FTP site and WP Admin. I’ve used the link provided earlier to give that information.

Your mentioning of the gatway_display.php file prompted me to verify what gateways I have active. Right now there is only one. That is the Invoice Payment Settings. Interestingly although we don’t actually use the invoices yet (we did play to use them in the future) they don’t seem to be working now. They did work at one time. I could display the PDF file but now I get this error:

Fatal error: Class ‘FPDF’ not found in /home/……/wp-content/upload/espresso/gateways/invoice/function.pdf.php on line 8.

There is a test event called Test Event Shop Cart on March 8th you can use or you can create your own.

Thanks for sticking with this. I appreciate your efforts.


Josh

  • Support Staff

March 6, 2013 at 10:33 am

Hi Randy,

Why are all the gateway files copied over to /wp-content/uploads/espresso/gateways? This will cause all kinds of problems, including the problem you’re having with the email [cost] shortcode because it’s trying to run an updated version of Event Espresso and gateway code from a few versions back (the files are dated from September). The price functions have changed since the version that was available in September.

None of these files should be copied over. You’ll need to delete them. After you delete them, we’ll need to reset the active gateway setting in the database so Event Espresso will look for gateway files in the correct location. Please let me know when you’re ready.


Josh

  • Support Staff

March 6, 2013 at 11:03 am

Actually, I have head out for a while, so here’s how to reset the gateways after the old files in /wp-content/uploads/espresso/gateways have been removed:

You can reset the active gateway setting by adding this line to your theme’s functions php file and save:

update_option('event_espresso_active_gateways',''); 

Then refresh any page on your site to run the above code. Then you need to remove the above code from functions.php and save functions.php so the code doesn’t run again. This is important.

After doing this, you can reactivate the gateway from your payment options page.


Randy

March 6, 2013 at 12:07 pm

Josh, I really don’t know why the files were in the uploads/gateway folder. I don’t recall moving them there but they are gone now. I also added the line in functions.php and refreshed a page then removed it. I did it two times but each time now I have the following error for every gateway:

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/hbfcass1/hbf_2012_04/wp-content/plugins/event-espresso/gateways/2checkout/settings.php on line 41

The good news is the registration confirmation email and the [cost] short code are now working.


Josh

  • Support Staff

March 6, 2013 at 12:27 pm

Hi Randy,

In this case, you can try deactivating, then reactivating the Event Espresso plugin, then you can go to your payment options page and activate the invoice gateway.


Randy

March 6, 2013 at 1:15 pm

Josh, that seems to have taken care of things. I really appreciate all the effort you and Dean did in helping me with this issue. You guys really went above and beyond which really shows why this is such a great product!

The support post ‘[Cost] shortcode in registration confirmation emails not correct’ 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