Jump to content

price formats


Recommended Posts

Hi everyone,

 

I was looking for a little help with the product.tpl file and a formatting list.

It would appear if you use

$product.pricing.minprice.price

you get a display of $15 AUD

 

If you use

{$product.displayPriceSimple}

you get $15/mo

I have been unable to find a list of these formats and was wondering if there is a reference as I am trying to work out how to code

$15

 

Thanks in advance

zeroanarchy

Link to comment
Share on other sites

On 02/06/2021 at 04:37, zeroanarchy said:

I have been unable to find a list of these formats and was wondering if there is a reference as I am trying to work out how to code

https://classdocs.whmcs.com/8.1/WHMCS/View/Formatter/Price.html

note, they would only work on Price Formatter variables, so in terms of minprice.price...

  • {$product.pricing.minprice.price) -> $15 AUD
  • {$product.pricing.minprice.price->toPrefixed()) -> $15
  • {$product.pricing.minprice.price->toSuffixed()) -> 15 AUD
  • {$product.pricing.minprice.price->toNumeric()) -> 15

if memory serves, {$product.displayPriceSimple} is just a normal string variable, so you would have to manipulate it with Smarty/PHP if you wanted to change it's display.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated