close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Auto-populate checkout page fields

Thread began 8/20/2011 7:43 am by rob.parkin390637 | Last modified 8/23/2011 12:33 pm by Jason Byrnes | 1129 views | 7 replies |

rob.parkin390637

Auto-populate checkout page fields

Hi, I'm having problems automatically populating form fields on my checkout page. I've followed the guide, creating the rsUser recordset and binding the form fields to this - and when I test the bindings (via the TEST button) it seems ok. However, when I login (as a user) and access the checkout page the form fields are not being populated from the User dataset record - they just remain blank.

Sign in to reply to this post

Jason ByrnesWebAssist

Most likely, the session created at login time is not the same one you are using to filter the recordset by.

to double check this add the following code just before the body tag on the checkout page:
[php<pre><?php var_dump($_SESSION); ?></pre>[/php]

post back the results of this and a screen shoot showing how you have set up the recordset.

Sign in to reply to this post

rob.parkin390637

Hi Jason

I couldn't get your code just before the <body> because of the Dreamweaver template (editable regions) so I placed it at the end of the <head> tag and the results were:


[php<pre>array(6) {
["eCart1_Items"]=>
string(255) "7|WAECART|Florence Dark Grey Wall Tile|WAECART|Florence wall tile, dark grey, 40x25, sq mtr|WAECART|florence001_s.jpg|WAECART|5|WAECART|1|WAECART|0.05|WAECART|1|WAECART|5|WAECART|0.05|WAECART|1 Florence Dark Grey Wall Tile (7)|WAECART|0.0475|WAECART|0.045"
["WAEC_ContinueRedirect"]=>
string(29) "/tiles/bathrooms/ceramic2.php"
["WAENCRYPTEDRETURNUSED"]=>
bool(false)
["WAENCRYPTEDRETURNSUCCESS"]=>
bool(false)
["SecurityAssist_UserID"]=>
string(1) "5"
["userLevel"]=>
string(1) "3"
}
</pre>[/php]


I have attached screen shots of how I set up and tested the recordset -

Sign in to reply to this post

Jason ByrnesWebAssist

Ok, So from this i can seer that the name of the session created by the login page is "SecurityAssist_UserID"

in the recordset, you have set to use the Session "UserID" instead, change that to use the session named "SecurityAssist_UserID"

Sign in to reply to this post

rob.parkin390637

Thanks Jason - that worked.

The notes say to enter "UserID" in the dialogue box text field for Session Variable ... so that's what most inexperienced folk (like myself) and probably a good number of more experienced developers are going to do!
Perhaps the notes should be changed at some point to say "Enter the Session Variable you used to create your logon page."
And / Or perhaps the dialogue box could be altered in a future version so that the Session Variable field is changed from a text box to a drop-down selection box displaying all of the session variables available ?

Thanks again for your help!

Sign in to reply to this post

Jason ByrnesWebAssist

In part 1 step 9, it says:

  Select the UserID option.
Depending on the Session Variable used with SecurityAssist, this may be named differently.  




then in Part 2 step 12it says:

  Enter UserID in the text field.
In this example, UserID is the name of the Session Variable used by SecurityAssist.  




The example is using UserID as the session name, if your application uses a different session name, you will need to substitute that name.

Sign in to reply to this post

rob.parkin390637

Hi Jason,

I think we must be reading from different hymn sheets! I'm using the pdf file:

ecart_populate_checkout_fields.pdf

which was linked-to from the bottom of the guide at:

registration_on_checkout.php.

and which, for step 9, makes no mention of the possibility of the session variable being named differently - hence my suggested changes. Perhaps I'm using an out-dated guide; which one are you quoting from ?

cheers

rob

Sign in to reply to this post

Jason ByrnesWebAssist

Sorry, yes, i was looking at the Order History tutorial, I will forward your comments to our documentation team.

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