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

Order Date Column

Thread began 6/05/2009 5:06 pm by jenbar3378469 | Last modified 6/08/2009 6:58 pm by Ray Borduin | 1681 views | 9 replies |

jenbar3378469

Order Date Column

Hi, when going to the confirm.php page, I am now getting this error: Field 'OrderDate' doesn't have a default value

What do I have to do to set a default date in the OrderDate field? If I need to set it in MySQL can you please tell me the syntax? I have been working on this off and on all day and have had no luck setting a default for the date column.

Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

You could set the default to: CURRENT_TIMESTAMP in the mySQL database. (make sure the column is type TIMESTAMP)

Sign in to reply to this post

jenbar3378469

Ok, I think I have all of the MySQL errors fixed! However I am now getting this error:

Warning: mail() [function.mail]: SMTP server response: 501 Syntax error, parameters in command "RCPT TO:<Jane Doe <jdoe@suminet.com>>" unrecognized or missing in D:\www\smcyclo.com\sumidrive\WA_Universal_Email\mail_PHP.php on line 254

Obviously the code is incorrect in my universal email settings. It will not send a receipt to the person ordering the items or anybody for that matter.

Line 254 of the mail_PHP.php file has this:

$mailObj = mail($mailTo,$mailSubject,$mailContent,$mailHeader);

Again, any help would be appreciated! Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

What do you have set as the value of the TO field in the email? The error implies it may not be set correctly.

Sign in to reply to this post

jenbar3378469

Here is the code for the To: field

<?php
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {
//WA Universal Email object="mail"
//Send Loop Once Per Entry
$RecipientEmail = "".((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ." ".((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ."|WA|".((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ."";include("WA_Universal_Email/WAUE_confirm_3.php");

//Send Mail All Entries
if (""!="") {
header("Location: ");
}
}
?>


Please advise.

Thanks

Sign in to reply to this post

Ray BorduinWebAssist

Just use:

$RecipientEmail = "".((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ."";include("WA_Universal_Email/WAUE_confirm_3.php");

Some mail objects don't support adding a name to the TO address.

Sign in to reply to this post

jenbar3378469

Ok, I did that & no errors, but now it is doing nothing. When I click on the submit order button it refreshes quickly to same page, does not email anything off and never goes to the checkout_success.php or checkout_failure.php pages.

Here is the code for the mail form:
<?php
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {
//WA Universal Email object="mail"
//Send Loop Once Per Entry
$RecipientEmail = "".$_SESSION['eCartCheckoutForm_email'] ."";include("WA_Universal_Email/WAUE_confirm_3.php");

//Send Mail All Entries
if (""!="") {
header("Location: ");
}
}
?>

Here is the code for the "Submit" Button:

<input type="image" alt="Modify information" value="Modify information" src="WA_eCart/Images/Pacifica/Btn2_EN_modifyinformation.gif" onclick="history.back();return false;"/><input type="image" name="Submit_order" id="Submit_order" value="Checkout" alt="Submit order" src="WA_eCart/Images/Pacifica/Btn2_EN_submitorder.gif" />

I don't see where it is directing it anywhere in that code.

Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

I think the redirect code is in the store cart details in database server behavior.

Sign in to reply to this post

jenbar3378469

Thanks Ray! Everything worked with that!

BUT now My Order ID numbers are not progressing. In other words, when someone places a new order, it wipes out the old order in the database. I have the OrderId column in the MySQL database marked as the primary key and for auto increment.

Thanks for all of your help!

Sign in to reply to this post

Ray BorduinWebAssist

It would increment for a new user. The problem is that your session isn't cleared so it is treating it as the same shopping session. You can probably solve the problem by clearing the orderID session variable on the success page.

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