close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Ecart Order Number in UE

Thread began 6/18/2011 6:01 pm by gzirfas374932 | Last modified 6/27/2011 11:34 am by Jason Byrnes | 1234 views | 5 replies |

gzirfas374932

Ecart Order Number in UE

I searched the forum and another user had this problem. I would like to include the order number in the receipt e-mail. I used the code that solved their problem but had no success, it is NOT including the order number in the e-mail. I tried moving the UE code after the store in db code but got headers already sent errors. Can you assist me in this? I'm obviously missing something probably really simple.

I have included my confirm page and my email page code.

Attached Files
orderNoProblem.zip
Sign in to reply to this post

Jason ByrnesWebAssist

1) The HemogenixCart_OrderID session is created by the store order summary behavior. The universal Email code must come after the store order summary code.

if you get headers already sent errors it is likely because of blank lines left between the php code blocks.

see the following post on the headers already sent error:
showthread.php?t=19285

2) in the waue_confirm_1.php page, this code:

php:
if(!session_id()) session_start();

echo $_SESSION['HemogenixCart_OrderID'];

$MailBody = $MailBody . "\r\n";



should be:

php:
if(!session_id()) session_start();

$MailBody = $MailBody .  ((isset($_SESSION["HemogenixCart_OrderID"]))?$_SESSION["HemogenixCart_OrderID"]:"");

$MailBody = $MailBody . "\r\n";
Sign in to reply to this post

gzirfas374932

Got it working, but... need advice

I moved the UE code BELOW the store db and details stuff. It would not send the e-mail. I put it back at the top, email goes. Moved it back down, logged out and noticed that the log out page is not destroying the session. I cleared the cookies and voila. It's all good. Quitting the browser of course destroys the session, which also makes it good. I think this may be giving me some of my fits. On my log out page I have:

<?php
if ("" == ""){
// WA_ClearSession
$clearAll = TRUE;
$clearThese = explode(",","");
if($clearAll){
foreach ($_SESSION as $key => $value){
unset($_SESSION[$key]);
}
}
else{
foreach($clearThese as $value){
unset($_SESSION[$value]);
}
}
}
?>

SHOULDN'T THIS DESTROY/UNSET THE PHPSESSID??? When it's not clearing the session, the quick cart still shows item counts from a previous order.

Please advise. Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

this code only unsets all of the session variables, it does not destroy the session.


if you want to destroy the session and regenerate the ID, use this code:

php:
<?php

// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();

// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
    
$params session_get_cookie_params();
    @
setcookie(session_name(), ''time() - 42000,
        
$params["path"], $params["domain"],
        
$params["secure"], $params["httponly"]
    );
}

// Finally, destroy the session.
@session_destroy();
@
session_regenerate_id(TRUE);
?>
Sign in to reply to this post

gzirfas374932

Down to quickcart

Well, perhaps I attacked this from the wrong direction. I have a quick cart on the side. AFTER the order is complete and you get to the checkout success page everything is groovy. (I don't expect this to happen frequently but it needs to be addressed...) If the user goes back to the shopping pages the previous items are STILL in the quick cart. Adding the code you posted LOGS the user OUT on the checkout success page so they never see the success page, just the login page. I just need the previous items in the quick cart to GO AWAY after the success page, WITHOUT logging the user out. Can this be done?

Sign in to reply to this post

Jason ByrnesWebAssist

see this thread:
showthread.php?t=16982

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