www.uburst.com www.uburst.com

"4 digit pricing"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

General Questions
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"4 digit pricing"
Posted by Scott on Jul-05-00 at 03:55 PM (EST)
I have a product that sells for $37.75 for 100 units, but they have to be ordered individually at $.3775 each. When the qty. is entered into the field and submitted, the cart is defaulting to $.38. Is there a way to support the 4 digit ($.3775) figures?

Thanks.

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

4 digit pricing, Scott, Jul-05-00, (1)
RE: 4 digit pricing, Bill Weiner, Jul-05-00, (2)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "4 digit pricing"
Posted by Scott on Jul-05-00 at 04:01 PM (EST)
Follow-up to the previous message. I noticed the total cost is being calculated correctly but the price in the PRICE column of the cart is defaulting to a 2 digit price.
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "RE: 4 digit pricing"
Posted by Bill Weiner on Jul-05-00 at 07:00 PM (EST)
Internally, uStorekeeper will keep the accurate pricing....all the way down to the 4-digit precision that you need for items priced at "$.3775" each....So that is why the final calculation is correct.

The problem of when you order one item at "$.3775" it appears in the shopping cart as "$.38" -- is purely a display/rounding issue. That is, before any items in the shopping cart are displayed, the prices are formatted to the standard 2-decimal place precision....thus the reason why an item priced at "$.3775" appears as "$.38".

I would suggest just forcing the customers to purchase the item in quantities of 100. For instance, if the item was a "Candle" priced at $.3775 each, then maybe just put in the description that the item can only be purchased in quantities of 100. For the "Short Description" field you could even enter something like "Box of 100"....and then specify the price of the product as "$37.75".

Otherwise, if you really wanted to, you could try editing the "get_cart_html" subroutine of the ustorekeeper.pl script. About half-way down in that subroutine you will see the following line:

$formatted_price = sprintf("%.2f",$price);

Which is the line that formats the price output to be rounded to 2 decimal places. I believe you could just change that line to:

$formatted_price = sprintf("%f",$price);

...and you'll get the necessary precision displayed.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.