close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Update Database After Puchase

Thread began 4/24/2009 9:04 am by purchase327552 | Last modified 5/12/2009 6:38 am by purchase327552 | 3708 views | 6 replies |

purchase327552

Update Database After Puchase

Any ideas how to use "Checkout Form Response" and "Get Contents From Form" to mark items as sold when returning from the merchant gateway? I'm pretty sure I could do it if I were dealing with single items, but I'm using a cart with PayPal's Website Payments Standard. I'm using eCart and have the Web Developer Suite, so I should have all the necessary kit - just the knowledge I'm lacking!

Any and all contributions gratefully received.

Sign in to reply to this post

Ray BorduinWebAssist

The best way to do it is to use a hidden form element named custom on your confirm page and set it to the value of the orderID for this order.

Then use that value on your IPN page to update all of the associated records using the Update server behavior that comes with DataAssist.

Sign in to reply to this post
Did this help? Tips are appreciated...

purchase327552

I don't really understand how to determine the item ID's from the OrderID. Could I use several custom form elements with an item ID each, or maybe a comma separated list which I could explode on the IPN page, using the Update Server behaviour as you suggest?

Sign in to reply to this post

Ray BorduinWebAssist

Why not mark the whole order as valid, invalid instead of each individual item? Even if you want to update each individual item, you should have a central OrderID to identify the items in the same order somehow. Use that variable.

If you used the checkout wizard, the OrderID, is one of the fields in the OrderDetails table that you can use to identify all of the items in that order. It is stored as a session variable in the Store Cart Summary in Database server behavior.

Sign in to reply to this post
Did this help? Tips are appreciated...

purchase327552

Originally Said By: Ray Borduin
  Why not mark the whole order as valid, invalid instead of each individual item?  



Because I don't keep a record of transactions (since PayPal do that it just duplicates something that's already in place), I just want to remove items from the shop when they've been sold without having to do it manually.

Originally Said By: Ray Borduin
  If you used the checkout wizard, the OrderID, is one of the fields in the OrderDetails table that you can use to identify all of the items in that order. It is stored as a session variable in the Store Cart Summary in Database server behavior.  



If this contains all the ID's I need then that would be great, but I don't understand how to get at them. Essentially all I need is a way to have the item ID's returned to me either individually or in an array, so I can run an update on the database.

Sign in to reply to this post

Ray BorduinWebAssist

If you use "get contents from form" with "ipn shopping cart" selected it will repopulate your cart with the items that were in it. You can use the cart as your array.

Sign in to reply to this post
Did this help? Tips are appreciated...

purchase327552

That's great, thanks. My main issue seems to have been not understanding the PayPal end of things, but I've boned up on that now and everything's working fine now.

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...