close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

eCart3_OrderID - is not being saved in session and orderdetail table.

Thread began 8/05/2014 11:46 am by Art | Last modified 8/05/2014 1:57 pm by Jason Byrnes | 2300 views | 10 replies |

Art

eCart3_OrderID - is not being saved in session and orderdetail table.

eCart3_OrderID - this session isn't getting the order id that is being saved in the orders table...

I've changed my database so that the order id is populated with a text field variable (Date|time|session) ; the confirm.php isn't receiving the session when it saves the order details in the database.

The session dump displays this: ["eCart3_OrderID"]=> int(0)

Any ideas what I should I try to fix this?

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the confirm page.

Sign in to reply to this post

Art

PM below.

Sign in to reply to this post

Jason ByrnesWebAssist

try changing line 396:
$_SESSION[$WA_sessionName] = mysql_insert_id();

to:
$_SESSION[$WA_sessionName] = mysql_insert_id($WA_connection);

Sign in to reply to this post

Art

No, that didn't do it.

Sign in to reply to this post

Art

Using the default orderdetails table from the wizard, it would normally just set the Session to the id that's entered into that table; it receives that variable from the orders table which is normally an integer. In my case, both of those ID fields are varchar. That doesn't matter, does it?

Is the page able to set the eCart3_OrderID session variable after saving to the orders table and before the details table?

<?php echo ((isset($_SESSION["eCart3_OrderID"]))?$_SESSION["eCart3_OrderID"]:""); ?>

In other words, do I need to have this set before I write to the orders table?

Sign in to reply to this post

Jason ByrnesWebAssist

  both of those ID fields are varchar. That doesn't matter, does it?  




yes, it does matter, the ID fields must be integers.

in the orders table, the ID field needs to also be set to auto increment.

The code uses mysql_insert_id(); to look up the auto increment value when the record is inserted.

if you have the ID column set to varchar, it wont be able to auto increment, it needs to be an integer to be able to auto increment.

Sign in to reply to this post

Art

That did it. Thanks again for helping out; I appreciate it.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Art

One question about the <pre><?php var_dump($_SESSION); ?></pre>. When I put it on the checkout_success page, in one section, it's returning what looks like every product in my database. Is that what you'd expect it to do?

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