WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: acdc1 on August 28, 2012, 02:35:02 PM

Title: How to remove decimal separator in "bakery"?
Post by: acdc1 on August 28, 2012, 02:35:02 PM
Hi everyone!

 I'm need to remove decimal separator (".00") in bakery. If my price for example $200 it must be displayed "$200" not "$200.00" . How can i do this?

Thanx!
Title: Re: How to remove decimal separator in "bakery"?
Post by: jacobi22 on August 28, 2012, 03:55:30 PM
Quote
I'm need to remove decimal separator (".00") in bakery. If my price for example $200 it must be displayed "$200" not "$200.00" . How can i do this?
the function is number_format();
look at code like this
Code: [Select]
$price = number_format(stripslashes($item['price']), 2, $setting_dec_point, $setting_thousands_sep);
and set the 2 to 0

you found this in mini_cart.php, view_cart.php, view_item.php, view_summary.php and view_overview.php
but i dont know, how much entrys
Title: Re: How to remove decimal separator in "bakery"?
Post by: frankwis on August 28, 2012, 05:04:39 PM
It is also possible using jQuery to change the displayed value:
<td class="mod_bakery_cart_td_ price_f">155.00</td>
$("td.mod_bakery_cart_ td_price_f').text...
Title: Re: How to remove decimal separator in "bakery"?
Post by: ward33 on September 08, 2012, 07:57:46 PM
It is also possible using jQuery to change the displayed value: <td class="mod_bakery_trinidad fundadores (http://www.solocigars.com/products/trinidad_fundadores.html)_cart_td_price_f">155.00</td>
$("td.mod_bakery_cart_ td_price_f').text...


I believe this is the best way to remove the separator, easy, and clean!