PS2+PS3+PS4 & Form Builder or Form Toolkit
Hi WA,
Can either of these products be used with PS3 and PS4? I would like to add an additional field at checkout - for example, Where do you hear about us and then have a drop down box.
Thanks, Mark.
Hi WA,
Can either of these products be used with PS3 and PS4? I would like to add an additional field at checkout - for example, Where do you hear about us and then have a drop down box.
Thanks, Mark.
You _can_ use either form builder or form toolkit to add the new select list, but it is not necessary.
when adding a new field to the checkout page, you can use Dreamweaver. Go to Insert -> Form -> Select to add the new select list.
You will also need to edit the confirm page to capture the new fomr input.
near the bottom of the confirm page is a collection of hidden element, add a new hidden element using the same name as the select list and set it to capture the selected value from the confirm page:
<input type="hidden" name="selectName" id="selectName" value="<?php echo((isset($_POST["selectName"]))?$_POST["selectName"]:"") ?>" />
you then need to add a set session value behavior, go to window -> server behaviors. In the server behaviors list, click the plus button and select eCart -> general -> Set session value.
set the name to be the same as the select list.
set the trigger to any form post.
click the lightning bolt next to value and select the new form element.
next you will need to edit the store order summary behavior. double click the ecart store order summary behavior in the server behaviors list. you will need to have added the new column for how did you hear about us, bind this column to the session variable that was created in the last step.
Hi Jason,
I've gotten "stuck" with this and in saying that I'm still a "junior" at this. After creating the column in the ps3_orders table the server behaviour for eCart doesn't find the column? I've attached the files.
Thanks, Mark.
on the confirm page, the where did you hear about us fied needs to capture the value posted from the checkout page:
<input type="hidden" name="Where_Did_You_Hear_About_Us" id="Where_Did_You_Hear_About_Us" value="<?php echo((isset($_POST["Where_Did_You_Hear_About_Us"]))?$_POST["Where_Did_You_Hear_About_Us"]:"") ?>"/>
Dreamweaver sometimes needs a nudge to see new database columns, see this post for details:
showpost.php?p=78376&postcount=2
Hi Jason,
Thanks for that tip. I must be almost there however once I selected database field on the checkout page I got the following error
checkout.php?valid=false
files attached
Thanks, Mark.
If you add code to the checkout failure page:
<?php
var_dump($_SESSION);
?>
That will write information to the page that includes the reason why it failed. That is probably the best place to start in order to find and fix whatever is causing the issue.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.