close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

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

Thread began 9/29/2014 12:40 pm by aarondressler368929 | Last modified 9/29/2014 2:33 pm by aarondressler368929 | 859 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

Sign in to reply to this post

Jason ByrnesWebAssist

Please provide a Skype username or a US phone number and a good time to contact you when you will be in front of your computer and we will have an engineer contact you to resolve this issue over the phone.

We are available Monday - Friday from 9am - 4pm EST (except major U.S. holidays).

Sign in to reply to this post

aarondressler368929

WA_persistForm() ?

Hi Jason,
I think I am one step closer to finding out whats going on.. I just have one question, but if needed, I included my phone number and availability in a PM.

I discovered the values which pp_confirm.php is trying to pull from WA_getSavedFormValue() are never set in the SESSION. The code WA_getSavedFormValue('CheckoutWizard_NewFromBlank_Default','SOME_FIELD') is referenced a bunch of times in the pp_confirm script. However, when I var_dump SESSION, I see blank entries for $_SESSION['CheckoutWizard_NewFromBlank_Default'] fields.

Where are these values set usually? I'm assuming WA_persistForm() is not being called to set the values being pulled in from WA_getSavedForm() on pp_confirm.

I also noticed a typo on my part in some custom bindings I added to allow for multiple shipping providers. However, upon fixing those errors and ensuring error reporting and display_errors were on, the pp_confirm script executes without throwing any errors, and redirects to the same success page referencing the non-existent Order Number 1.

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