close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Insert static cart with no login into db

Thread began 2/13/2012 5:21 pm by doug8382 | Last modified 2/14/2012 12:11 pm by doug8382 | 2696 views | 13 replies |

doug8382

Insert static cart with no login into db

I have a simple static cart with a couple of products that doesn't use a login, so no user id is captured. I am using Authorize.net to capture the funds.

What would be the easiest way to insert each item in the the cart into the a database (i'm using ecart 3 with asp, so an access db is what i would use)?

Also I'd want to grab the billing contact info, maybe in a different table? could I relate them using the session ID?

Just looking how to put the info of a static cart and purchas info into a db that doesn't use a login.

Thanks,
Doug

Sign in to reply to this post

Jason ByrnesWebAssist

on the confirm page, you would need to add the eCart Store Order Summary behavior to store the billing information to an Orders table, and the eCart Store Order Details to store the cart line items to the OrderDetails table.

In the store oder summary behavior, set the Key Column to the primary Key column of the Orders table, and make note of the name of the session that will be created.

In the orderdetails table you should have an orderdetailID column that is used to create the relationship between order and orderdetails.

in the store order details behavior, set the key column to the orderdetailID column and bind that column to the session created by the store order summary behavior.

Sign in to reply to this post

doug8382

What about tying the order to a user without using a login/registration?

Thanks for getting back. i saw those two behaviors, but i'm guessing that if i don't have the purchaser logged in, i can't associate the order and it's details with the buyer, unless you have a suggestion or way around that. I'd prefer not to have them have to register/login in if possible, but i do need to know who bought what. Is this possible?

Thanks,
Doug

Sign in to reply to this post

Jason ByrnesWebAssist

by storing the billing info in the orders table, you will know who purchased the order.

Sign in to reply to this post

doug8382

i did actually think of that, but it seemed like bad practice, but i think you're right. this is a one off app and that would work.

so essentially add all the fields I'm submitting to Authorize.net (except the CC Info for security), like First name, etc to the Orders table, and that should cover it.

I'll give it a shot right now and see what I get.

Thanks,
Doug

Sign in to reply to this post

doug8382

error if DetailsID is left blank

I added the Summary behavior leaving the autonumber OrderId blank with no issue.

If I try and leave the DetailID with the Order Details left blank, It errors with "You must set the column specified as the Cart ID"

If I put a any value in for DetailID, it accepts it, but I know this should be left blank. Any idea what's causing the error?

Thanks,
Doug

Sign in to reply to this post

Jason ByrnesWebAssist

you are setting the key field to use the detailID column, you need to select the detailorderId column for the key field. the key key field is the column used to create the relationship between the orders and orderdetails tables.

Sign in to reply to this post

doug8382

yep, that worked beautifully. One more question. I noticed this thread here:

showthread.php?t=20540&highlight=insert+orderdetails

My form is an event registration form as well. There are two events/products with a limit of a quantity of two for either that can be purchased.

Event 1 has 2 add to cart buttons, but set to replace, so they can only add 2 of either, never both.
Event 2 has a limit of 2 as well, and can be added in addition to Event 1.

Is that thread suggesting I could actually capture the names for each event?

So if they added 2 of event one, i could grab the two names for it. and if they added 2 for event 2, i could grab those as well (four unique names, 2 each associated with a particular event, as an example?)

That would fantastic if possible, but I may have read that thread incorrectly. If it's possible, how would I accomplish that.

Thanks again,
Doug

Sign in to reply to this post

Jason ByrnesWebAssist

"Is that thread suggesting I could actually capture the names for each event?"


Yes, it is.

"If it's possible, how would I accomplish that."

I explain how to accomplish it in post 2 of that thread.

Sign in to reply to this post

doug8382

That is very cool option.

I think my situation may not work with it, becasue, my static cart has the product id of 1 twice, and set to replace, with a dropdown qty limit of 2.

and product id 2 also set to replace with a qty limit of 2.

so they can only buy 1 variation of product id 1 in addition to product id 2 both with a qty limit of 2.

If I add the name column set to update, it allows them to add the same variation of a either product multiple times.

also, my quantity discount of => 2 * .375 no longer works. It only seems to work if 2 is added at the same time. Not if it occurs in the cart twice.

Dang.

If it were possible to:

1. limit it to one variation of either product
2. never allow it to be in the cart more than twice
3. insert the names (which i see i can)
4. Calculate the discount.

it lives here if you want to see it:

workshops.asp


Thanks,
Doug

Sign in to reply to this post
loading

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