p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 8th, 2008, 10:39 AM
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: Wyoming, MI, USA.
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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old July 8th, 2008, 01:04 PM
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: Wyoming, MI, USA.
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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



All times are GMT -4. The time now is 05:53 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc