close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Ecart checkout only accept one order

Thread began 12/25/2013 7:22 pm by henrik441511 | Last modified 12/30/2013 12:16 pm by Jason Byrnes | 1391 views | 13 replies |

henrik441511

Ecart checkout only accept one order

Hi
Where can i reset Ecart for same customer after checkout so that this customer when directed back to Ecart can make a new order?
with a new orderID. As it is now i have to logout and login to make a new order

Regards

Sign in to reply to this post

Ray BorduinWebAssist

You can use the "clear session values" server behavior on the Checkout Success page to clear the shopping cart and the OrderID session variables.

Once you apply the server behavior you will want to move the code to the bottom of the page so that you can still show the cart contents on the page before they are cleared.

The new eCart 6 checkout wizard will do this automatically.

Sign in to reply to this post

henrik441511

Thank but did not work! if i clear all sessions i also get logged out and customer have to log in again and i am back to the same problem i have,
placed here? trigger Button: Checkout pressed or use another trigger

Tried, to only use some clearances
<?php
@session_start();
if (isset($_POST["Checkout"]) || isset($_POST["Checkout_x"])){
// WA_ClearSession
$clearAll = FALSE;
$clearThese = explode(",","WADA_Insert_products,WADbSearch1_products_results,WADbSearch1_orders_results");
if($clearAll){
foreach ($_SESSION as $key => $value){
unset($_SESSION[$key]);
}
}
else{
foreach($clearThese as $value){
unset($_SESSION[$value]);
}
}
}
?>
Can you send me a manual for Ecart can only find an old one Ecart 4 and still there it did not say anything about all variables/ session
or any ideas which session variables to remove?



It have placed itself right before <html> what do you mean with place on bottom then is it after </body> or what?

it also did not clear ecart, do i have to clear that too by myself?

Actually i got it a kind to work. It updates the same record count by one when it is the same item but not a new item it can handle in a new order record is set up it stays the same?

SHALL I REMOVE EVERYTHING AND START AGAIN FROM BEGINNING?

Sign in to reply to this post

Ray BorduinWebAssist

Don't start over.. it won't help.

Move the code after the </html>

The session variable that holds the cart contents is called [cartname]_Items

Replace [cartname] with the name of your cart and add that to the Session variables to be deleted and the cart will be cleared as well.

Sign in to reply to this post

henrik441511

I tried to follow YOur instructions but now not even one cart shows in ordertable.
Have been looking after session [cartname]_Items but it does not exist? [eCart1]_Items
my cart name is Ecart1, how come?

Sign in to reply to this post

Ray BorduinWebAssist

just eCart1_Items... no brackets. Add it to your Session bindings manually and then you will be able to select it as a variable to be removed, or add it to the code manually:

$clearThese = explode(",","WADA_Insert_products,WADbSearch1_products_results,WADbSearch1_orders_results,eCart1_Items");

Sign in to reply to this post

henrik441511

Many thanks it work. and great you are there to help for us newcomer.

Sign in to reply to this post

Ray BorduinWebAssist

The server behaviors will not show if you hand edit the code... so the line you said you changed is also the reason it doesn't show.

To get the new orders to insert, change the code back so that you can open the server behavior.

Then open the Store Cart Summary in Database server behavior and find the value for the Save As field. That is the session variable name where the order id is stored. If you add that to the list of server behaviors to remove it will add second orders placed in the same session.

Sign in to reply to this post

henrik441511

I have changed everything back.
I think it is the "store as field" nope i can only update one record, even with session variable orderid in the clear session,
the only way i can make i work is handcode $NeedInsert = (mysql_num_rows($result) === 0); set to 1

Last thing. If i want to store the productID as well in the order table is it ok to use the cart ID?

Sign in to reply to this post

Ray BorduinWebAssist

Yes, the cart ID field is usually set to the product ID. Usually that would be set in the OrderDetails table since more than one item could be in the cart.

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