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 Sakari Ailus <sakari.ailus@nic.fi>     ******

Hans-Joachim Leidinger wrote:
> ******    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

We have many shops running on same server and it's not very good thing
if Minivend server must be restarted every time something changes in any
shop.

> restart the MV server only, if you have changes the catalog.cfg or
> minivend.cfg

This will take too much time.

> 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)

Well, I figured out how to fix the problem. But I think there is a bug
in Minivend here. If I put same information in catalog.cfg that had
earlied been in locale database, and now reconfiguring a catalog doesn't
break it anymore.

If I specify Finnish locale information in locale database, it works
fine until the catalog is reconfigured, after which prices and order
quantities get rounded downwards. The same locale information works
after reconfiguration if it's in catalog.cfg, not in locale database.
This seems like a but to me.

[FractionalItems yes]
> ..try this with "Yes" and restart the MV server...yes! It works with

I already had this earlier. Otherwise it wouldn't have worked with dots
either.

> "2.5" but not with "2,5"! The trouble with "2,5" is a Perl problem and
> not the Minivend problem.

Yes, but price information is converted, too. It wouldn't be impossible.

> > 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.

I meant the latter one, of course. I have script called reconfigcat (it
wasn't too easy to reconfigure catalogs in Minivend 3.x, was it?) which
does this and that's why I didn't remember it quite right.

> > 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"

I have dots in prices, I should have mentioned. Prices are correct in
database, but [item-price noformat=1] returns prices without fractional
parts, also [currency]...[/currency] tag drops fractional parts if I
give it correct price value from SQL database, if the catalog is broken
with reconfigure (now only happens when using locale database).

-- 
Sakari Ailus
sakari.ailus@nic.fi
-
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: