Akopia Akopia Services

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

Re: [mv] Q: Frac digits are zeroes...



******    message to minivend-users from Larry Leszczynski <larryl@furph.com>     ******

Hi Eugene -

> Thanks for reply. I have got PriceField price in my catalog.cfg and
> price is a real filed in my DB. Turning on DBI_TRACE=1 I discovered that
> queries returned correct price i.e. 10,95 but [item-price] tag still
> returns $10.00. 

If I'm understanding correctly, your price field in the database contains
entries like "10,95".  You probably need to change these to look like
"10.95".   The build_item_price() subroutine in Data.pm creates
item-price code that has lines like:
   $price = database_field($base, $item->{code},
                                          $Vend::Cfg->{PriceField});
    ...
   $price = $price / $Vend::Cfg->{PriceDivide};

These calculations won't work correctly if there are commas in the field,
e.g. if PriceDivide is 1:
   $price = 10,95 / 1;
sets price to 10, but:
   $price = 10.95 / 1;
sets price to 10.95.


Larry Leszczynski
larryl@furph.com
--
  furph, Inc.	WWW/Unix/Windows Solutions	734-513-7763 (voice)
info@furph.com	   http://www.furph.com		734-513-7759 (FAX)

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