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

Save store summary in database behavior does not insert into DB, saves OrderID of 1 to the Session anyways.

Thread began 9/29/2014 3:40 pm by aarondressler368929 | Last modified 9/29/2014 5:33 pm by aarondressler368929 | 410 views | 2 replies

aarondressler368929

Save store summary in database behavior does not insert into DB, saves OrderID of 1 to the Session anyways.

Hello,
I have just upgraded to ecart 6. I have a handful of static products which I added with Ecart 5 that all add to cart just fine. I re-created the checkout pages with Ecart 6. When I proceed through the checkout process, I do all the paypal stuff, and when I am redirected back to my site, it pulls up the checkout_success.php page with Order Number of 1. However, the new record is not inserted into the database, and the database has 6 rows in it, last row id of 7 (left from Ecart 5). It seems to be setting the $_SESSION['CartID'] variable to 1 even though it doesn't insert an ID of 1 (no ID of 1 exists in the db, it was deleted).

There were a few attempts when ecart actually updated an existing row in the database with blank values and showed the ID of the row it updated in the checkout_success.php page next to Order Number. Assuming it was an old Session ID, I manually unset / destroyed the session vars, it started to just show an Order ID of 1, and upon dumping the $_SESSION vars to the screen, I can see the $_SESSION['order_id'] is being set every time I try to check out. Shouldn't it throw an error if it cannot insert to the db?

After looking through the pp_confirm.php, I find this line which is more than likely the culprit:

if (isset($_SESSION[$ConditionalQuery->SaveAs])) $ConditionalQuery->addFilter("OrderID", "=", "d", $_SESSION[$ConditionalQuery->SaveAs]);

Do I even need this line?? I really don't want people to update their orders. But after I comment it, the save summary in Database behavior disappears from the server behaviors panel. And I'm afraid that will make any future edits a PITA.

Also, am I supposed to manually clear the CartID session var once I'm done with it? If somebody wants to order another product separately, I don't want them to overwrite their previous order(s) in the DB.

should I also mention I am using a Dynamic MySQLi connection to switch between localhost and remote host.

Thanks

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