Support

Home Forums Event Espresso Premium Early Registration Discount – setting decimal places

Early Registration Discount – setting decimal places

Posted: October 30, 2013 at 5:45 pm

Viewing 2 reply threads


Angela Haddon

October 30, 2013 at 5:45 pm

Hi, when I apply an Early Registration Discount, the price changes its decimal display so that – for example – $217.80 is displayed as $217.8. I am using the following snippet to call and display the price:
<?php echo do_shortcode(‘[EVENT_PRICE event_id=”‘.$event_id.'” number=”0″]’);?>
This code works fine on non-discounted prices; any ideas how to ensure the discount price displays correctly?
Thanks for your help.


Dean

October 31, 2013 at 2:52 am

Hi Angela,

Not sure why it is doing that but, you could work around it by using this

<?php $x = do_shortcode('[EVENT_PRICE event_id="'.$event_id.'" number="0"]'); echo number_format($x, 2, '.', ''); ?>


Angela Haddon

November 2, 2013 at 3:22 pm

Thanks Dean, that worked perfectly 🙂

Viewing 2 reply threads

The support post ‘Early Registration Discount – setting decimal places’ 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