Questions tagged [zend-currency]

8 questions
1
vote
1 answer

Should dates and currencies always be passed around as objects?

Help me settle an argument with a coworker... We’re using Zend Framework and PHP and much of the data we deal with includes dates and prices. I’ve been arguing that when the data is retrieved (either from the database or JSON) we should…
J Cobb
  • 294
  • 3
  • 14
0
votes
1 answer

number format on Zend Currency

I am developing a site Zend based but I have the followin problem: $currency = new Zend_Currency(); $currency->toCurrency(20, array('currency' => 'EUR','number_format' => '#0.#')); Gives me 20,00 EUR but I need 20.00 EUR (that is why i set…
José Carlos
  • 1,005
  • 16
  • 29
0
votes
3 answers

Zend Currency in Euro with English locale

It is very possible that I totally don't understand the Zend aproach in working with currencies. What I want to do is to have a Zend_Currency object where the active currency is EURO and the language to be English (the locale of the application is…
Elzo Valugi
  • 27,240
  • 15
  • 95
  • 114
0
votes
1 answer

Zend_Currency value with cents instead of dollars

I am using Zend_Currency and would like to store the values in cents as (opposed to to dollars) due to other parts of the system that work in cents. So, I would like to initialise and retrieve values for Zend_Currency objects in cents, is there a…
Brenton Alker
  • 8,947
  • 3
  • 36
  • 37
0
votes
1 answer

Fatal error: Class 'Zend_Currency' not found

I am new to Zend. Now, I am trying to print/format numbers as per my locale, however when I do this $c = new Zend_Currency(); $c->setFormat(array('display' => Zend_Currency::NO_SYMBOL)); echo $c->toCurrency(2500.01); returns error. I have checked…
Adarsh Khatri
  • 358
  • 1
  • 5
  • 23
0
votes
3 answers

How to store & process currencies in mysql / zend framework

We want to store product prices and weight (kg/pound) in MySQL. Can somebody tell me what's the best way to do this? double/decimal/... ? We need to be able to display both USD and EURos. I don't know if it helps, but we use the Zend framework to…
Jorre
  • 17,273
  • 32
  • 100
  • 145
0
votes
1 answer

Zend Locale & Zend_Currency: Region code

I am trying to create a connection between the Zend_Locale and the Zend_Currency using the browser language preferences. BROWSER: en $locale = new…
Michelangelo
  • 1,398
  • 2
  • 14
  • 37
0
votes
1 answer

Using Zend_Currency to display a value without using a symbol

I am outputting a value using toCurrency() from Zend: echo $currency->toCurrency(1000, array('currency' => "GBP", 'precision' => 2)); Which gives me an example of £ 1,999.99, without using any extra code such as preg repplace can i return the value…
Ne Ma
  • 1,719
  • 13
  • 19