WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • How to remove decimal separator in "bakery"?
  • Print
Pages: [1]   Go Down

Author Topic: How to remove decimal separator in "bakery"?  (Read 6553 times)

Offline acdc1

  • Posts: 24
How to remove decimal separator in "bakery"?
« 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!
Logged

jacobi22

  • Guest
Re: How to remove decimal separator in "bakery"?
« Reply #1 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
Logged

Offline frankwis

  • Posts: 36
Re: How to remove decimal separator in "bakery"?
« Reply #2 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...
« Last Edit: August 28, 2012, 05:07:50 PM by frankwis »
Logged

Offline ward33

  • Posts: 3
Re: How to remove decimal separator in "bakery"?
« Reply #3 on: September 08, 2012, 07:57:46 PM »
Quote from: frankwis on August 28, 2012, 05:04:39 PM
It is also possible using jQuery to change the displayed value: <td class="mod_bakery_trinidad fundadores_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!
« Last Edit: September 11, 2012, 06:48:29 PM by ward33 »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • How to remove decimal separator in "bakery"?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2