close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

how do I generate a 5 digit random number per order

Thread began 4/30/2010 7:15 am by eyoung296270 | Last modified 5/13/2014 7:38 pm by eyoung296270 | 8334 views | 9 replies

eyoung296270

random id isn't posting

Hi Jason,
Thanks for your help. I am able to get the test Id to post to the new testkey table but not the random code to post to the table using the insert server behavior.
This is what I did...please let me know where I am falling short:
I added a new testkey column to ecart and set it to be unique I named it DetailRandom.
Then on the products page I added the add to cart button, selected the new DetailRandom cart column, clicked the lightning bolt next to the random number column and selected the Random Password binding from the binding panel.
I then added a new table to my database with the columns
testkeyID - Primary key Auto Number
testKey - the random number will be stored in this column
ItemIDfk - Foreign Key relation to relate the testKey to the test
I then added hidden form variables for the ItemID and the testKeyID to the checkout page.
I binded the ItemID with the ecart ItemId variable <?php echo $eCart1->DisplayInfo("ID"); ?> to the checkout page and I binded the testKey that was generated with the Security Assist with the ecart testKey <?php echo $eCart1->DisplayInfo("DetailRandom"); ?> to the checkout page.
I then added the Insert Server Behavior to the confirm page and using the checkout form I selected the new table (testkey) and I selected the DetailRandom field in the checkout form page for the testkey value and I selected the ItemId field for the ItemIDfk field.
When I ran a purchase everything went fine for the purchase but the only fields added to the testKey table was the ItemId field from the testproducts Id. The Detail Random field in the ecart object was not added.
The detailrandom key worked in this table until I tried to add the insert record server behavior with both fields.
What am I doing wrong?

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