close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

write session after validation

Thread began 4/27/2009 7:52 am by carsten299415 | Last modified 4/29/2009 2:09 am by carsten299415 | 5291 views | 12 replies

carsten299415

write session after validation

hi,

for my checkout form i have inserted some SS formvalidations.
In the form i use also a eC_SameAs checkbox to copy the values from billing to delivery inputs. The copy Process works fine. But after the validation the values from the input fields that have been copied from the eC_SameAs have not been written into my sessions.

Can anybody help?

Here is some code:

<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php
$XOX_Shop->GetContent();
?>
<?php
$_SESSION["re_plz"] = (ValidatedField("checkoutstep1","postcode"));
$_SESSION["re_stadt"] = (ValidatedField("checkoutstep1","city"));
$_SESSION["re_strasse2"] = (ValidatedField("checkoutstep1","street2"));
$_SESSION["re_strasse1"] = (ValidatedField("checkoutstep1","street1"));
$_SESSION["re_fax"] = (ValidatedField("checkoutstep1","fax"));
$_SESSION["re_telefon"] = (ValidatedField("checkoutstep1","phone"));
$_SESSION["re_email"] = (ValidatedField("checkoutstep1","email"));
$_SESSION["re_name"] = (ValidatedField("checkoutstep1","lastname"));
$_SESSION["re_vorname"] = (ValidatedField("checkoutstep1","firstname"));;
if(isset($_POST['eC_SameAs'])&&($_POST['eC_SameAs'] == true)) {
$_SESSION["li_plz"] = (ValidatedField("checkoutstep1","postcode"));
$_SESSION["li_stadt"] = (ValidatedField("checkoutstep1","city"));
$_SESSION["li_strasse2"] = (ValidatedField("checkoutstep1","street2"));
$_SESSION["li_strasse1"] = (ValidatedField("checkoutstep1","street1"));
$_SESSION["li_fax"] = (ValidatedField("checkoutstep1","fax"));
$_SESSION["li_telefon"] = (ValidatedField("checkoutstep1","phone"));
$_SESSION["li_email"] = (ValidatedField("checkoutstep1","email"));
$_SESSION["li_nachname"] = (ValidatedField("checkoutstep1","lastname"));
$_SESSION["li_vorname"] = (ValidatedField("checkoutstep1","firstname"));
} else {
$_SESSION["li_plz"] = (ValidatedField("checkoutstep1","shipping_postcode"));
$_SESSION["li_stadt"] = (ValidatedField("checkoutstep1","shipping_city"));
$_SESSION["li_strasse2"] = (ValidatedField("checkoutstep1","shipping_street2"));
$_SESSION["li_strasse1"] = (ValidatedField("checkoutstep1","shipping_street1"));
$_SESSION["li_fax"] = (ValidatedField("checkoutstep1","shipping_fax"));
$_SESSION["li_telefon"] = (ValidatedField("checkoutstep1","shipping_phone"));
$_SESSION["li_email"] = (ValidatedField("checkoutstep1","shipping_email"));
$_SESSION["li_nachname"] = (ValidatedField("checkoutstep1","shipping_lastname"));
$_SESSION["li_vorname"] = (ValidatedField("checkoutstep1","shipping_firstname"));
}
?>
<?php
//WA eCart Redirect Check Out
if (isset($_POST["XOX_Shop_Checkout_1_x"]) || isset($_POST["XOX_Shop_Checkout_1"])) {
$Redirect_redirStr="checkout_step2.php";
if ($Redirect_redirStr != "") {
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
if (strpos($Redirect_redirStr, "?") === false) {
$Redirect_redirStr .= "?".$_SERVER['QUERY_STRING'];
}
else {
$Redirect_redirStr .= "&".$_SERVER['QUERY_STRING'];
}
}

$XOX_Shop->redirStr = $Redirect_redirStr;
}
$XOX_Shop->cartAction = "Checkout";
}
?>
<?php
// WA eCart Redirect
if ($XOX_Shop->redirStr != "") {
header("Location: ".$XOX_Shop->redirStr);
}
?>



AND HERE an extract from THE FORM:

<div class="eC_FieldsetWrapper">
<h3 class="eC_CheckoutFormHeader">Lieferadresse</h3>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="eC_SameAsWrapper" >
<tr>
<td><input type="checkbox" name="eC_SameAs" id="eC_SameAs" value="1" onClick="eCart_copyBillingToShipping(this); toggle('box')" style="width:auto;" /></td>
<td><label for="eC_SameAs">Lieferadresse entspricht der Rechnungsadresse</label></td>
</tr>
</table>
<br /><div id="box">
<table border="0" cellpadding="0" cellspacing="0">

<tr>
<th><label for="shipping_firstname" >Vorname*</label></th>
<td><input type="text" name="shipping_firstname" id="shipping_firstname" value="<?php echo $_SESSION['li_vorname']; ?>" />
<span class="Stil1">
<?php
if (ValidatedField("checkoutstep1","checkoutstep1")) {
if ((strpos((",".ValidatedField("checkoutstep1","checkoutstep1").","), "," . "7" . ",") !== false || "7" == "")) {
if (!(false)) {
?>
PFLICHTFELD
<?php //WAFV_Conditional checkout_step1.php checkoutstep1(7:)
}
}
}
?>
</span></td>
</tr>
<tr>
<th><label for="shipping_lastname" >Nachname*</label></th>
<td><input type="text" name="shipping_lastname" id="shipping_lastname" value="<?php echo $_SESSION['li_nachname']; ?>" />
<span class="Stil1">
<?php
if (ValidatedField("checkoutstep1","checkoutstep1")) {
if ((strpos((",".ValidatedField("checkoutstep1","checkoutstep1").","), "," . "8" . ",") !== false || "8" == "")) {
if (!(false)) {
?>
PFLICHTFELD
<?php //WAFV_Conditional checkout_step1.php checkoutstep1(8:)
}
}
}
?>
</span></td>
</tr>
<tr>
<th><label for="shipping_email" >Emailadresse*</label></th>
<td><input type="text" name="shipping_email" id="shipping_email" value="<?php echo $_SESSION['li_email']; ?>" />
<span class="Stil1">
<?php
if (ValidatedField("checkoutstep1","checkoutstep1")) {
if ((strpos((",".ValidatedField("checkoutstep1","checkoutstep1").","), "," . "9" . ",") !== false || "9" == "")) {
if (!(false)) {
?>
PFLICHTFELD
<?php //WAFV_Conditional checkout_step1.php checkoutstep1(9:)
}
}
}
?>
</span></td>
</tr>
<tr>
<th><label for="shipping_phone" >Telefonnummer</label></th>
<td><input type="text" name="shipping_phone" id="shipping_phone" value="<?php echo $_SESSION['li_telefon']; ?>" /></td>
</tr>
<tr>
<th><label for="shipping_fax" >Faxnummer</label></th>
<td><input type="text" name="shipping_fax" id="shipping_fax" value="<?php echo $_SESSION['li_fax']; ?>" /></td>
</tr>
<tr>
<th><label for="shipping_street1" >Stra&szlig;e*</label></th>
<td><input type="text" name="shipping_street1" id="shipping_street1" value="<?php echo $_SESSION['li_strasse1']; ?>" />
<span class="Stil1">
<?php
if (ValidatedField("checkoutstep1","checkoutstep1")) {
if ((strpos((",".ValidatedField("checkoutstep1","checkoutstep1").","), "," . "10" . ",") !== false || "10" == "")) {
if (!(false)) {

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