Wrox Programmer Forums
|
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2008, 09:39 AM
Registered User
 
Join Date: Jul 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with Extended price over $1,000.00

I'm having a problem with the E-Commerce chapter. Everything works fine except when the extended price for an item goes over $1,000.00. The total at the bottom is in error. If I change the quantity so the extended total is below $1,000.00 everything works fine.

Any Ideas

Thanks
JD Bennett

 
Old July 8th, 2008, 12:04 PM
Registered User
 
Join Date: Jul 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey I found the fix. You need to get rid of the commas in the extended price. Do this by changing the code in the cart.php file and the checkout2.php file and checkout3.php file. Find the line of code for the extended price. It looks like this:

  $extprice = number_format($costPrice * $qty, 2);

change it to this:

 $extprice = number_format($costPrice * $qty, 2, '.', '');

What this does is remove the comma in the extended price. Which fixes the addition for the "total before shipping".

Yeah I fixed it myself. Google is a wonderful thing!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving 2,00,000 records effectively FileFound Visual Studio 2005 9 September 21st, 2007 08:20 AM
problem to deploye extended datasource Choose File BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 July 16th, 2004 10:46 AM
Searching through 400,000 records clueless_may Access VBA 6 July 12th, 2004 12:21 PM
Format rounding figure : 1235.00 => 1200.00 Jane SQL Language 1 June 27th, 2003 02:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.