SELECT * FROM CartItems WHERE CartIDReference = #USR_cartID# ORDER BY CartItemID
Sorry. Your credit card was declined.
insert into customers
(FirstName,LastName,BillAddress,BillCity,BillState,BillCountry,BillZip,Phone,Email,
shipfirstName,shipLastName,shipAddress,shipCity,shipState,shipCountry,shipZip)
values('#firstName#','#lastName#','#address#','#city#','#state#','#country#','#zipCode#','#Phone#','#Email#','#USR_shipfirstName#','#USR_shipLastName#','#USR_shipAddress#','#USR_shipCity#','#USR_shipState#','#USR_shipCountry#','#USR_shipZip#')
select max(customerID) as curr_customerID from customers
insert into orders (CustomerID,thisfirstName,thislastName,thisAddress,thisCity,thisState,thisCountry,thisZip,ccname,ccnumber,ccexpmo,ccexpyr,TotalPrice,SH,SalesTax,GrandTotal,transaction_date)
values(#form.customerID##get_key.customerID#,'#USR_shipfirstName#','#USR_shiplastName#','#USR_shipAddress#','#USR_shipCity#','#USR_shipState#','#USR_shipCountry#','#USR_shipZip#','','','','',#USR_orderTotal#,#USR_SH#,#USR_CPTAX#,#USR_CPAMT#,now()GetDate())
select max(orderID) as curr_orderID from orders
SELECT * FROM CartItems WHERE CartIDReference = #USR_cartID# ORDER BY CartItemID
delete FROM CartItems WHERE CartIDReference = #USR_cartID#
insert into orderDetails
values(#orderID#,#currentrow#,'#itemcode#',#quantity#,#lockPrice#,#totalPrice#)
Thank you!
Your order has been completed. An order confirmation email has been sent to your email address.