• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Showing French canadian format price on show.php

Showing French canadian format price on show.php 11 years 1 day ago #23127

  • pwickert
  • pwickert's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 2
Hello,

In the example php code below, how can I show the price like : 250.00 $?

Thank you

<?php
$db = &JFactory::getDBO();
$db->setQuery("SELECT * FROM #__rseventspro_tickets WHERE ide = '".$event->id."'");
$tickets = $db->loadObjectList();
if($tickets)
{
$t = '<h4>This event has the following tickets:</h4>';
$t .='<table style="text-align: center;">';
$t .='<tr>';
$t .='<th style="color: blue;">Ticket Name</th>';
$t .='<th style="color: blue;">Ticket Price</th>';
$t .='<th style="color: blue;">Number of seats</th>';
$t .='</tr>';

foreach($tickets as $ticket)
{
$t .='<tr>';
$t .='<td>'.$ticket->name.'</td>';
$t .='<td>'.$ticket->price.'</td>';
$t .='<td>'.$ticket->seats.'</td>';
$t .= '</tr>';
}
$t .='</table>';
echo $t;
}
?>
Last Edit: 10 years 11 months ago by pwickert.
The administrator has disabled public write access.

Showing French canadian format price on show.php 10 years 11 months ago #23191

  • pwickert
  • pwickert's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 2
Here is the solution from RSJoomla technician (thanks Andrei) that worked perfectly for me from


You can set the mask of your displayed price from Components > RSEvents!Pro > Settings > Payments by editing the "Payment mask" field. This will help you control the order of the price and currency symbol.

In your linked example you could try replacing:

$t .='<td>'.$ticket->price.'</td>';

with

$t .='<td>'.rseventsproHelper::currency($ticket->price).'</td>';
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!