Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Locale problems



******    message to minivend-users from Hans-Joachim Leidinger <jojo@buchonline.net>     ******

Sakari Ailus schrieb:
> > I canīt follow you! Can you write an example?
> 
> Yes. I have product X which costs, lets say 1,10 mk. I want to order 2,5
> units of it.
> 
> This works fine if catalog isn't reconfiguration yet. But if I
> reconfigure it (running $VENDROOT/bin/minivend
> --reconfigure=catalog_name) Minivend starts to think one item product X
> costs 1,00 mk and I want to order 2 units of it. This prevents me
> reconfiguring catalogs and users of other catalogs will have to wait
> restarting Minivend.

1) Why do you want to reconfig the MV server? You have to reconfig or
restart the MV server only, if you have changes the catalog.cfg or
minivend.cfg

2) All the locale setting is needed to format the price and is showing
in your browser only. Is not used for any calculations (only the rate
"PriceDivide|1|0.5409|0.1632" is needed, if you change the locale) 

[DEL]
> > No! This is coming from the simple demo!
> 
> Sorry, I didn't know, just thought that because last replier put that
> locale thing here.
> 
> > I use this
> >
> > Locale de_DE de_DE.ISO_8859-1
> > Locale de_DE LC_CTYPE de_DE
> > Locale de_DE LC_TIME de_DE
> > Locale de_DE LC_COLLATE de_DE
> >
> > Locale de_DE p_cs_precedes 0
> > Locale de_DE p_sep_by_space 2
> > Locale de_DE frac_digits 2
> > Locale de_DE mon_decimal_point   ,
> > Locale de_DE mon_thousands_sep .
> >
> > LocaleDatabase  locale
> >
> > in my catalog.cfg!
> 
> I tried but without success. And there probably should be also line
> "Locale de_DE decimal_point ," if I understood right? If I put e. g. 1,1
> to item's quantity field and say Minivend to recalculate basket items it
> goes on to error page and displays error message "'1,1' for item 14 is
> not numeric".

I get this behavior too! I get this with "1.1" too! It seems to me,
Minivend don't allow any decimal numbers in the field quantity.
Hmmm...grepping for "is not numeric"...found it in bin/minivend...get a
hint "FrationalItems"...go to the doc and grepping it for
"Frational"...found it

----snippppp---
FractionalItems

     Whether items in the shopping cart should be allowed to be
fractional, i.e. 2.5 or 1.25. Default is no. 

         FractionalItems     Yes
----snippppp---

..try this with "Yes" and restart the MV server...yes! It works with
"2.5" but not with "2,5"! The trouble with "2,5" is a Perl problem and
not the Minivend problem.

> Reconfiguring still breaks things. Does price/quantity calculation still
> work correctly if you reconfigure your catalog?

$VENDROOT/bin/minivend --reconfigure=catalog_name

doesn't work, but

$VENDROOT/bin/minivend --reconfig=catalog_name

works! :-))
And yes! It works correctly.

> BTW what kind of database are you using? I have PostgreSQL products
> database and all fields are type text.

MySQL and the normal database stuff per default (products.txt without
any SQL database).

Hmmm...what do you get, if you use

[item-price norformat=1] 

in your basket? 
In my case 

SQL-Database: select price from products where code="1";    -> "12,34"

in my basket, I see "12".

or

SQL-Database: select price from products where code="1";    -> "12.34"

in my basket, I see "12.34". Without "noformat=1", I see "12,34"

Joachim

-- 
-------------Hans-Joachim Leidinger---------------------


-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: