close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Does the checkout_success.php page still has session values?

Thread begun 7/28/2011 10:49 am by lr_leal239405 | Last modified 7/29/2011 1:46 pm by lr_leal239405 | 3297 views | 10 replies |

lr_leal239405

Does the checkout_success.php page still has session values?

I added some checkbox fields to the checkout page which I managed to capture into the confirm page and into the db, but the same code will not work in the checkout_success page. Here is the code:

<?php if ((isset($_POST["ReceiveEmailSpecials"]))) { echo "<strong>Yes, I would like to receive specials via Email</strong>"; }?>

I'm just getting acquainted with a little bit of PHP, but just wondering if it's because by the time it redirects to the checkout_success page, the session values are no longer available.

Sign in to reply to this post

Jason ByrnesWebAssist

this code:

<?php if ((isset($_POST["ReceiveEmailSpecials"]))) { echo "<strong>Yes, I would like to receive specials via Email</strong>"; }?>




is not referencing a Session variable, it is referencing a POST variable, which is created when the checkout form posts to the confirm page.

post information is only available while the forms action page is loading.

in other words:

The action of the form on the checkout page is to post to the confirm page.


the POST variables only exist while the confirm page is loading, once it is finished loading, the POST is cleared.

Sign in to reply to this post

lr_leal239405

Ok, Thanks. I changed it to this and it worked:

<?php if (!empty($_SESSION["ReceiveEmailSpecials"])) { echo "<strong>&#10003; Yes, I would like to receive specials via Email</strong>"; }?>

BUT it doesn't work on the email confirmation. So is the session cleared by the time it shoots the email?

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the webassist/email/ folder so i can see the code please.

Sign in to reply to this post

lr_leal239405

Ok...below I carried over what I posted on the other thread. My original problem was with the confirm page but that's working now. The problem is only with the email.
I've attached the email folder.

I've tried using this code on the email notification WHICH WORKS FINE ON THE CONFIRM PAGE:

<?php if ((isset($_POST["ReceiveEmailSpecials"]))) { echo "<strong>&#10003; Yes, I would like to receive specials via Email</strong>"; }?>


AND this code WHICH WORKS ON THE CHECKOUT_SUCCESS PAGE.

<?php if (!empty($_SESSION["ReceiveEmailSpecials"])) { echo "<strong>&#10003; Yes, I would like to receive specials via Email</strong>"; }?>


But neither works on the email confirmation....I'm not getting the response to show up. What am I doing wrong?



Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

i must be missing something, i dont see where that code is being used in the email body.

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

lr_leal239405

SHOOT! I have two folders and I picked up the wrong one. Attached is the correct one. Sorry 'bout that.

Sign in to reply to this post

Jason ByrnesWebAssist

i still dont see where that code is being used:
I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

lr_leal239405

The code is there. Of course I entered it on the Universal Email Dreamweaver edit page but I do see it on the file 'waue_confirm_10' lines 56 to 65.

Sign in to reply to this post

Jason ByrnesWebAssist

ok, i see it now, just needed to know which file to look at.


instead of using echo, you need to cast the value to the $MailBody variable.

change:

php:
$MailBody = $MailBody . "  <tr><td>";
 if ((isset($_POST["ReceiveEmailSpecials"]))) { echo "<strong>&#10003; Yes, I would like to receive specials from Jonathan via Email</strong>"; }
$MailBody = $MailBody . "</td></tr>\r\n";
$MailBody = $MailBody . "  <tr><td>";
 if ((isset($_POST["ReceiveDailySapphiresEmail"]))) { echo "<strong>&#10003; Yes, send me Daily Sapphires in Email form</strong>"; }
$MailBody = $MailBody . "</td></tr>\r\n";
$MailBody = $MailBody . "  <tr><td>";
 if ((isset($_POST["SendMeFreeGifts"]))) { echo "<strong>&#10003; Yes, send me the Free Gifts</strong>"; }
$MailBody = $MailBody . "</td></tr>\r\n";
$MailBody = $MailBody . "  <tr><td>";
 if ((isset($_POST["Membership"]))) { echo "<strong>&#10003; I would like to become a member</strong>"; }




to:

php:
$MailBody = $MailBody . "  <tr><td>";
 if ((isset($_POST["ReceiveEmailSpecials"]))) { $MailBody = $MailBody .  "<strong>&#10003; Yes, I would like to receive specials from Jonathan via Email</strong>"; }
$MailBody = $MailBody . "</td></tr>\r\n";
$MailBody = $MailBody . "  <tr><td>";
 if ((isset($_POST["ReceiveDailySapphiresEmail"]))) { $MailBody = $MailBody .  "<strong>&#10003; Yes, send me Daily Sapphires in Email form</strong>"; }
$MailBody = $MailBody . "</td></tr>\r\n";
$MailBody = $MailBody . "  <tr><td>";
 if ((isset($_POST["SendMeFreeGifts"]))) { $MailBody = $MailBody .  "<strong>&#10003; Yes, send me the Free Gifts</strong>"; }
$MailBody = $MailBody . "</td></tr>\r\n";
$MailBody = $MailBody . "  <tr><td>";
 if ((isset($_POST["Membership"]))) { $MailBody = $MailBody .  "<strong>&#10003; I would like to become a member</strong>"; }
Sign in to reply to this post
loading

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