Support Offline: Mon - Fri / 08:00am - 05:00pm (GMT +7)
Your Time: Our Time:

map-pin How to custom price format for Restaurant Menu

More
9 years 1 month ago #2810 by GDragon
Hi, This is tutorial to custom price format of restaurant menu
1. Don't show price when price is 0:
Step 1: go to {root}/components/../helper then open file jux_resmenu.php

keep only this code in this function:
$price = self::getNumber($price);
return $price;
Step 2: custom in default.php file
- Go to line 54 and add code as below:
if($currency_position == "0"){
if($item->price!="0"){
$item->price = $currency.$item->price;
}
else
$item->price="";
}
else{
if($item->price!="0"){
$item->price.= $currency;
}
$item->price="";
}
- Similar with middle and right page
Hope this help!

Best regards,
--GD--

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #7426 by gianluca1
Hi I have just purchased and installed this but i followed your guide, can you be a bit clearer please. Below is the code that is currently in the file, can you tell me which part i need to replace please.

Thanks

public static function formatPrice($params, $price = null)
{
if ($price == 0)
{
return JText::_('COM_JUX_RESMENU_FREE');
} else {
// 0: code, 1:sign
$price = self::getNumber($price);

// if ($params->get('currency_position') == 0) {
// $price = $params->get('currency'). $price;
// } else {
// $price = $price. $params->get('currency') ;
// }
}
return $price;
}
}

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #7451 by GDragon
Hi gianluca,
Thanks for your reply!
That mean in jux_resmenu in hepler folder you have this code:
public static function formatPrice($params, $price = null)
{
$price = self::getNumber($price);
return $price;
}
Then go to default.php file change code as step 2
Hope this help!

Best regards,
--GD--

Please Log in or Create an account to join the conversation.

Moderators: Jackie
Time to create page: 0.024 seconds
Powered by Kunena Forum