Akopia Akopia Services

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

Re: [mv] strange behavior of [setlocale]



******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******

Quoting koto@mynetix.de (koto@mynetix.de):
> 
> I have follwing in my basket.html
> 
> <B>subtotal</B>[subtotal]<br>
> [setlocale locale=eur_EUR currency=eur_EUR]EURO [subtotal][setlocale]
> <br>
> <B>shipping</B>[shipping]<br>
> [setlocale locale=eur_EUR currency=eur_EUR]EURO [shipping][setlocale]
> <br>
> <B>total</B>[total-cost]<br>
> [setlocale locale=eur_EUR currency=eur_EUR]EURO[total-cost][setlocale]
> <br>
> 
> I get following result:
> 
> subtotal			 DM 89,95
> 					EURO 45,99
> shipping			DM 8,95
> 					EURO 8,95
> total			       DM 50,57
> 					EURO 50,57
> 
> can anyone tell me why the calculations are all mixed up?
> 
> in front of each euro field there'S this
> [setlocale locale=eur_EEUR currency=eur_EUR] and then
> a [setlocale] to get back to default mode.
> or did I miss anything in the docs? If I just use
> [setlocale eur_EUR] I get the same result.
> 

Bug. This has actually been reported before, and I couldn't find it
(had a blind spot). The fix is to patch Parse.pm and add "setlocale 1"
as one of the pairs. Against Minivend 4.04:


*** minivend-4.04/lib/Vend/Parse.pm	Mon Mar 27 03:15:37 2000
--- minivend-4.04b/lib/Vend/Parse.pm	Sat Jul 15 16:25:07 2000
*************** my %addAttr = (
*** 243,248 ****
--- 243,249 ----
                      record          1
                      region          1
                      search_region   1
+                     setlocale       1
  					shipping        1
  					handling        1
                      tag             1

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>

Friends don't let friends use Outlook. -- Bob Blaylock
-
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: