close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Inserting checkout form information in a mysql database

Thread began 4/18/2010 10:17 pm by phil107723 | Last modified 4/26/2010 3:10 pm by Eric Mittman | 1611 views | 7 replies |

phil107723

Inserting checkout form information in a mysql database

Hi
I'm trying to create a registration page that saves thea persons information from a checkout form into a mysql database and then redirects to paypal.

I did manage to get it working once but then discovered that it wasn't adding a record it was replacing a record in the database and after that things deteriorated.
Any help appreciated
Thanks
Phil

Sign in to reply to this post

Eric Mittman

What did you try already? In general you should be able to add an Insert Server Behavior to your checkout page. In the server behavior you should be able to select the table to insert into, then select the columns and the corresponding form field that you would like to store in that column.

If you use the store order summary server behavior you can get mixed results in regards to updating an existing record. Please post back with what you have tried and which WebAssist tools you have access to.

Sign in to reply to this post

phil107723

Reply to eric

I have ecart 4.5.2
I've tried to do is add an insert server behaviour to my checkout form which I had modified to match the info I needed to store. But this stopped the info from being sent to paypal

I've tried to insert order details using the database manipulation server behaviour also modifying to store the data I required. This is the method that worked best but replaced the record in the database rather than added a new record.

I read that you suggested to someone else doing a registration not to use the add to cart simply move straight to checkout and that is what I am going try today.

A second problem is in the back of my mind is that the user will be able to add his details to the database and then when he gets to pay he can decide to pull out without paying or do I simply delete it from the database if I don't get an email confirmation from paypal?

Any help appreciated
Thanks

Sign in to reply to this post

Eric Mittman

In general you should not assume that an order is going to be completed successfully. Normally when a checkout is created with eCart you will have the option to manage the orders in your db. When the wizard is completed it will create the checkout pages and include the store order summary and details server behaviors on the confirm page.

If you are using a local checkout and do not have a set of pages created by the checkout wizard then you can add in the store order summary and details server behaviors to your checkout success page.

Please describe a little more about you current setup and what you are trying to accomplish in the end. Post back with a copy of the checkout page in a zip archive for reference.

Sign in to reply to this post

phil107723

Reply to eric

Hi Eric
I've tried all the things you've mentioned.
I'm trying get the user to register for a paid service. I am trying to get them to fill in a form with relevant details such as first and last name, age, trade and experience. I want to store that information in my mysql database for contacting them at a later date.
Then after they have submitted their details I want to redirect them to Paypal for a remote checkout using paypal website standard payment.

The difficulty I am having is getting the details stored in the database. The pages I am attaching are a hash job not pretty. I was trying to add the required details such as last name and first name to the add to cart server behaviour having already added those columns to the ecart.

Attached Files
phil_boyle.zip
Sign in to reply to this post

Eric Mittman

Your store cart details server behavior is triggered on any page post. This checkout page does not post to itself so the trigger is not occurring.

If you want to store this info in the db when the user gets to the checkout page you should update the trigger to be before page load. The store order summary server behavior will insert a record for each item that is in the cart. If you want to insert a single record for the entire order you would wan to use the store order summary server behavior.

This will get the record in your db, but you can't rely on the presence of this record to confirm that the payment has been made. The only way you can do that with a remote checkout like Payments Standard is to have the insert occur on the IPN page after you check for a successful transaction.

Sign in to reply to this post

phil107723

Thanks Eric

Thanks Eric I'll give it a go and I get what you are saying about the order verification.
Phil

Sign in to reply to this post

Eric Mittman

Let us know if you have any more questions.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...