PHP Classes
elePHPant
Icontem

AJAX shopping cart

Recommend this page to a friend!

      Shopping Cart  >  Shopping Cart package blog  >  How to Create a Simpl...  >  All threads  >  AJAX shopping cart  >  (Un) Subscribe thread alerts  
Subject:AJAX shopping cart
Summary:Thanks and a couple of bugs
Messages:2
Author:Andy Burgess
Date:2015-09-22 12:51:23
 

 


  1. AJAX shopping cart   Reply   Report abuse  
Andy Burgess - 2015-09-22 12:51:23
Thanks for posting this tutorial. I was very helpful to me as I've been working on something similar, and wanted to see how someone else had done it.

Although we've both done it differently, I really like your method, and indeed I've learnt a thing or two, too!

I did find a couple of bugs in your code (in part 2):


<form action="/confirm.php" method="post">

should be

<form action="/order.php" method="post">

.... and ....

$statement = $dbConnection->prepare( "insert into order( name, email, total) value(?, ?, ?)" );

should be

$statement = $dbConnection->prepare( "insert into `order`( name, email, total) value(?, ?, ?)" );

i.e. "order" backticked

HTH, and thanks again.

Cheers
Andy Burgess

  2. Re: AJAX shopping cart   Reply   Report abuse  
Ashraf Gheith - 2015-09-22 12:58:25 - In reply to message 1 from Andy Burgess
Thank you Andy :)
When writing too much code during the day, such thing happen :)