Posted: December 8, 2014 at 4:39 pm
|
We have an event that has a ticket cost of $2325.00 when we enter this into the ticket price field, and click update the price is shown with the thousand separator (,) to be $2,325.00 when we view the event it displays the ticket price as $2.00. Also, if we change any other settings on the event the price for the ticket (on the admin screen) updates to $2.00 as well. It appears the comma is the issue, as if I enter a ticket price of $23,000.00 (directly inputting the comma) the refreshed page shows a price of $23.00 |
|
The fix for the issue is in the 4.5 release, which is available in the pre-release channel on your account page. Our apologies for the inconvenience. |
|
When is 4.5 expected to be released? If it is not soon, is it possible to get a code snippet as a patch? We have an event with tickets that were set to go on sale on Dec. 10th. |
We have a few tickets remaining and then we’ll go through a testing checklist. Entering the pricing without the comma should hold the pricing option. — |
|
|
Hi, Unfortunately we probably won’t have it formally released by that point, but it is available in the Pre Release channel as a download. It is important to note that the Pre Release version is a BETA and as such may have unexpected bugs. We don’t really recommend it for live sites. Pre Release channel info: https://eventespresso.com/wiki/pre-release-channel-guide/ |
|
Without inputting the comma seems to save the value, however viewing the frontend page displays the incorrect formatted price again. (ie: $2.00 instead of $2225). I need a fix before tickets go on sale tomorrow, and the pre-release channel isn’t an option for our live site. Is there any way to get a code snippet to fix? If not I’ll have to find one out myself. |
Hi, I am also experiencing the same issue. Tickets at $1000 are displaying as $1.00 This basically renders your system unusable. I need to fix this ASAP. I also have tickets going on sale in 2 days from now. What can I do? |
|
|
I’m also having this problem. Could you point me to the area of the code to create a fix temporarily until the new version is released? |
Hi everyone, Please update to 4.4.6.p, which is available now. It has the fix for the thousands separator issue. |
|
|
I have updated to 4.4.6 and the issue is only half fixed. The price value now saves correctly on the admin side, however the ticket selector still shows the price as the $2.00 / $3.00. The correct price does show on the registration page however. |
Hi Scott, Can you let me know what you are entering for the prices? |
|
|
$2925 and $3225 (both have VAT tax as well). |
Please enter them as: 2925 and 3225 for each ticket respectively. (no currency sign) |
|
|
The issue is not that it is not being saved to the database. The issue is in the display of the price in the ticket selector. So far I have narrowed it down to:
If I remove the format_currency method it displays the price correctly. |
|
This may not be the final fix, but updating line 313 of EEH_Template.helper.php from
to
seems to fix the issue. |
Hi Scott, That is going to cause problems elsewhere. format_currency() is used in a lot of places. Has anything things else been modified on this site, like the ticket selector template? |
|
|
No. The ticket selector file has not been modified. |
Hi Scott, Can you restore the method back to the default and post a link to the event in question so we can investigate? |
|
|
I have to leave the fix in place for our live site since the tickets are now on sale. Here is a link to a test server with the event: http://ifma.digunobeta.com/events/test-event-duplicate/
|
|
The comma should be removed before the price gets to EEH_Template::format_currency( $ticket_price ). I logged it here: http://sidney.eetesting.info/desktop/EE4-master/?espresso_events=event-2 and it is 12345.67. In the database it is stored as 12345.670. You are showing a comma in the price in the DB? |
|
The price is stored without the comma (2925 and 3225) |
|
Can you see if the ticket is returning the ticket price with or without the comma in modules/ticket_selector/templates/ticket_selector_chart.template.php, line 47? |
Hi Scott, I noticed that the price displayed on ticket selector doesn’t include the tax. Are you using the FHEE__ticket_selector_chart_template__ticket_price in a functions file to change it? If so, you’ll want to make sure that you’re returning a float value for the subtotal/base price. The following example will return a float: |
|
|
Yes I had used the code snippet “Display the base price of the ticket in the ticket selector” from this page: https://eventespresso.com/wiki/useful-php-code-snippets/ I have now removed the preg_replace from the format_currency method and put it into that snippet instead. I updated the return line to be:
Seems to fix the problem. |
You can avoid the preg_replace if you do this instead:
|
|
The support post ‘EE4: Thousands separator in ticket price’ 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.