Prices

Table Views display information from the database, here is how tow to add amounts with price format

For this feature, no option type is required,

This option will display any number fetched from the database in a price format with 2 deciamal places:

$1000,000.00

In the table View page add a column for your amount. For example PRICE, in this case 80 is a with of 80px

 

array_push($td_titles, "80-PRICE");

 

Then we need to create an array with the follwing values, some of them are optional.
"type" is required, this tells that we are going to add a price
"col" is also required to specify the database column name where the price will be fetched from

 

$tdvalue = array(
'type'=>'price',
'col'=>'amount',
'sign' => '$', //optional, default: $
'privilege'=> 4, //optional, 4 will show the field only to High and Admin privileges, default is 1
'class'=>'',   //optional, class name selector default: none (empty)
'attribute'=>'',  //optional, can be any attribute(s) with value(s) default: none (empty)
'icon'=>'' //optional any text, html code or fontawesome icon, default: none (empty)
);

Then the array is added to the $td_fields array.

 

$td_titles = array();
array_push($td_fields,$tdvalue);
Get a Quote

Get a Quote