close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

OrderDetailID Cannot be Null

Thread began 3/04/2014 7:11 am by Mike Perry | Last modified 3/05/2014 2:19 pm by Jason Byrnes | 1647 views | 5 replies |

Mike Perry

OrderDetailID Cannot be Null

I'm trying to add the Store Order Details in Database Behavior.

The Order Summary is working fine; I have the the OrderID set to save as a session variable (currentOrderID). currentOrderID does not show up as a session variable in the Bindings window (even after refresh, recreate site cache, etc.).

So I have no way to reference the OrderID in the Store Order Details behavior.

trainingcheckout_success.php attached.

Thanks,

Mike

Sign in to reply to this post

Jason ByrnesWebAssist

if there is no binding for the currentOrderID session, you need to create it.

on the bindings panel, click the plus button, select Session and name it currentOrderID


If it fails to create the binding, use the OS files system browser to borwser to your site and delete the _notes folder, then create the binding again.

Sign in to reply to this post

Mike Perry

Okay -- got this working.

Now have another problem. The Store Summary behavior works great -- I can come back and enter another order and the Summary data is stored in a new order. However the Store Details behavior hangs up when it tries to add the record i get the error "Duplicate entry '1' for key 'PRIMARY'" I presume this is about the Primary key for the Details Table.

I have the OrderID set as the key column for the Summary, and it is stored in the currentOrderID Session variable. DetailID (the Primary key field in the Details table) is set to auto-increment; the error occurs when there is an existing order (Number 1) detail record.

The file is attached. . .

Thanks,

Mike

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

Jason ByrnesWebAssist

in the store order details, you have bound the detailID column to the cart ID column.

the order details primary key column, the detailsID column, should not be bound to anything. remove the binding for that column so it can assign the ID automatically.

Sign in to reply to this post

Mike Perry

Huh -- didn't do that on purpose. . .

Phantom keyboard press strike again :-(

Thanks. . .

Sign in to reply to this post

Jason ByrnesWebAssist

hate those phantom keyboards.....

you should get a standard qwerty ;)

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