Plugin

EE 1
EE 2
Price Format

Developer

Steve Abraham

3rd Party (Free)

Download v1.0

Compatibility

  • LG Addon Updater
  • Multi Site Manager
  • Stand Alone Entry Form

Requirements

  • jQuery for the Control Panel

Tags

Formats a supplied price (decimal places, thousands separator, decimal point separator) and adds or displays tax amount (percentage supplied as an optional parameter).

Accepts six parameters:

price (required, numeric value)
decimals (optional, number of decimal points to show, defaults to “2”)
point (optional, character to use as point separator, defaults to “.”)
thousands (optional, character to use as thousands separator or “none”, defaults to “,”)
tax (optional, tax percentage - numeric value only, defaults to “0”)
show (optional, value can be “tax” to show just the tax amount or “total” to show the price including tax, defaults to “total”)

Example usage:

{exp:price_format price="1000"

(Output: 1,000.00)

{exp:price_format price="1000" decimals="0"

(Output: 1,000)

{exp:price_format price="1000" tax="20"

(Output: 1,200.00)

{exp:price_format price="1000" tax="20" show="tax"

(Output: 200.00)

Download Price Format

EE Version Downloads Add-On Version Release Date
2.+ Download 1.0 2011-02-07 01:00 AM

This entry was last updated May 30, 2011, 2:16 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. Devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

1 Review:

Bix 05.07.12

Rating - {addon_rating_average}

I’m not sure why number formatting isn’t built into EE2 but apparently it isn’t. This plugin seems to do the trick.