close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Duplicate OrderreferenceIds - Ecart 5

Thread began 8/28/2010 11:00 am by robert254422 | Last modified 12/27/2010 1:03 pm by robert254422 | 7064 views | 8 replies

robert254422

Duplicate OrderreferenceIds - Ecart 5

Hello,

I use the following code on checkout succes page to reset things. When user buys other stuff after this, the new orders get the same orderreferenceid in the database as the other already finished order which i reset on the success page?

I need other sessions alive (logged in users) BTW but in the example i destroy everything (and that seems to work since users get thrown out) but still i keep getting the same orderreferenceid as the completed order from previous session...

When the user uses the same windo or new tab it gets the orderreferenceid of the first finished order as orderreferenceid... When you go back the cart is empty and all so it is a new order in the database but like i said the new order has the same orderreferenceid as the completed order(s)...

Also the part after session_destroy does not seem to execute..

//TOp of page
<?php
if (!session_id()) session_start();
if(!isset($_SESSION["MyCart_OrderID"])) {
$_SESSION["MyCart_OrderID"] = "";
}
?>

// Bottom page
<?php
$MyCart->ClearCart();
unset($_SESSION['MyCart_OrderID']);
session_destroy();
if ($MyCart->IsEmpty()) {
$MyCart->redirStr = "store_cart.php";
$MyCart->cartAction = "RedirectIfEmpty";
}
?>

Any help would be great

WKR

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