close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

eCart No Payment Gateway Email

Thread began 11/19/2011 2:09 pm by greg_herr420504 | Last modified 12/16/2011 12:06 pm by Jason Byrnes | 909 views | 9 replies |

greg_herr420504

eCart No Payment Gateway Email

Hello,

I'm hoping this is something simple that I'm missing... I've got everything set up with eCart including my check out pages and I get to the 'order authorized' check out success page, but the email to the customer does not come and I'd like an email sent to the client on order as well. I'm trying to do a simple, no payment gateway, check out where the client and the customer get an email as the 'submit order' button is hit. I've done the wizard about 10 different times, but alway the same results. Is there specific instructions on this type of set up?

Thanks for the help,

Greg

Doing more testing I've noticed that even though I get the order success page my cart does not clear. Looking at my database I have 1 order record and 1 order detail record. If I manually clear the cart and place an additional order it overwrites the records so I'm left with still just 1 order record and 1 order detail record, but for the most recent order. All the wizards to date have worked so well I can't understand what I'm missing on this one... I've deleted and recreated the check out pages many times, but not making any progress. Any help would really be appreciated... I'm starting to go crazy...

Ok - a bit more testing. Went to a different computer and placed an order. That came in as a unique second order. So I appear to have two issues: 1) Email to customer is not going through and 2) on check out the session data is not cleared for the cart. So everything just ordered is still in the cart and any adjustments made to the cart and submitted again adjust the original order.

Sign in to reply to this post

greg_herr420504

.php pages attached

If it helps my .php pages for review.

Attached Files
pages.zip
Sign in to reply to this post

Jason ByrnesWebAssist

on your confirm page, i do not see any code top send the email.

The email will only be added to your checkout pages if you own either Universal Email or CSS Form Builder 2, do you have either of these extensions installed?

if one of those extensions is installed, there will be a section of the checkout wizard where you can configure the settings for emailing the order receipt. eCart alone does not contain the behaviors for emailing the receipt.



to empty the cart on the success page, add the following code just after the closing </html> tag:

php:
<?php

// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();

// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
    
$params session_get_cookie_params();
    @
setcookie(session_name(), ''time() - 42000,
        
$params["path"], $params["domain"],
        
$params["secure"], $params["httponly"]
    );
}

// Finally, destroy the session.
@session_destroy();
?>
Sign in to reply to this post

greg_herr420504

eCart Checkout Wizard

Good Evening Jason,

Thank you for the quick reply. Unfortunately I'm on this project only part time and had to set it aside for a bit.

Ok - Looking at the page you mentioned you are right it does not look like the universal email code is there. I do, and did, have universal email installed (as part of Form Builder) and do get the page in the wizard to configure the email receipt. Before installing Form Builder I had the stand alone Universal Mail installed. When I installed Form Builder I disabled Universal Mail. After getting you response I completely removed both Form Builder and Universal Mail and reinstalled Form Builder. I ran the wizard again and it appears that I do get the Universal Mail code on the confirm page, but I fail to get to the confirmation page. When I click submit order it starts to load the next page, but hangs up with the spinning dial just running and page shown as partially loaded.

I've attached in a zipped folder the new pages generated by the wizard as well as screen shots of what happens when I click the submit order button. I also took screen shots of the wizard page that I filled out for the email receipt. If my problem is the SMTP settings is there a way to make changes without running the whole wizard again? For example to try different ports or the 'include from address' option. Or is something else wrong?

Any help you can provide is very much appreciated!

Thanks again,

Greg

Attached Files
checkout_screenshot.pdf.zip
updated_pages.zip
wizard_screenshots.pdf.zip
Sign in to reply to this post

greg_herr420504

Error Reporting

Good Morning,

Hoping to find a solution in the forums I noticed information on adding the error reporting code. I added the below to line one of my checkout.php, checkout_success.php and confirm.php pages.

<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>

However, I don't get any type of visible error still just hangs on loading the next page. If it helps at all...

Thanks,

Greg

Sign in to reply to this post

Jason ByrnesWebAssist

tyr changing lines 20 - 23"

php:
$BurstSize = 1;

  $BurstTime = 200;
  $WaitTime = 1;



to:

php:
$BurstSize = 200;

  $BurstTime = 1;
  $WaitTime = 1;
Sign in to reply to this post

greg_herr420504

Confirmation, but still no email...

Good Afternoon and thanks for the quick response.

Your change worked and I now get to the confirmation page successfully, but still don't get the emails. Thinking maybe it was something to adjust in the SMTP settings I opened up the Universal Email in the server behaviors and have attempted every combination I can think of:
1) mail.maddenbmx.com on port 25, 465, 587 with the 'include address' check box selected and not selected.

2) 70.32.113.125 on port 25, 465, 587 with the 'include address' check box selected and not selected.

3) Also my contact us page that I created with form builder works and has nothing in the mail setting for port or smtp, just blank... so I set it the same way and still nothing.

This is the Universal Email code on my confirm page current - set to match how it is on my contact page.

Thanks so much for the help - once I get this working I'm gonna drink a BIG beer.

<?php
if (!isset($_SESSION))session_start();
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"
set_time_limit(0);
$EmailRef = "waue_confirm_6";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex ][] = "".((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ." ".((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ."|WA|".((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ."";
$TotalEmails += sizeof($RecipArray[$CurIndex]);
$RealWait = ($WaitTime<0.25)?0.25:($WaitTime+0.1);
$TimeTracker = Array();
$TotalBursts = floor($TotalEmails/$BurstSize);
$AfterBursts = $TotalEmails % $BurstSize;
$TimeRemaining = ($TotalBursts * $BurstTime) + ($AfterBursts*$RealWait);
if ($TimeRemaining < ($TotalEmails*$RealWait) ) {
$TimeRemaining = $TotalEmails*$RealWait;
}
$_SESSION[$EmailRef."_Total"] = $TotalEmails;
$_SESSION[$EmailRef."_Index"] = 0;
$_SESSION[$EmailRef."_Remaining"] = $TimeRemaining;
while ($RecipIndex < sizeof($RecipArray)) {
$EnteredValue = is_string($RecipArray[$RecipIndex][0]);
$CurIndex = 0;
while (($EnteredValue && $CurIndex < sizeof($RecipArray[$RecipIndex])) || (!$EnteredValue && $RecipArray[$RecipIndex][0])) {
$starttime = microtime_float();
if ($EnteredValue) {
$RecipientEmail = $RecipArray[$RecipIndex][$CurIndex];
} else {
$RecipientEmail = $RecipArray[$RecipIndex][0][$RecipArray[$RecipIndex][2]];
}
$EmailsRemaining = ($TotalEmails- $LoopCount);
$BurstsRemaining = ceil(($EmailsRemaining-$AfterBursts)/$BurstSize);
$IntoBurst = ($EmailsRemaining-$AfterBursts) % $BurstSize;
if ($AfterBursts<$EmailsRemaining) $IntoBurst = 0;
$TimeRemaining = ($BurstsRemaining * $BurstTime * 60) + ((($AfterBursts<$EmailsRemaining)?$AfterBursts:$EmailsRemaining)*$RealWait) - (($AfterBursts>$EmailsRemaining)?0:($IntoBurst*$RealWait));
if ($TimeRemaining < ($EmailsRemaining*$RealWait) ) {
$TimeRemaining = $EmailsRemaining*$RealWait;
}
$CurIndex ++;
$LoopCount ++;
session_commit();
session_start();
$_SESSION[$EmailRef."_Index"] = $LoopCount;
$_SESSION[$EmailRef."_Remaining"] = round($TimeRemaining);
session_commit();
wa_sleep($WaitTime);
include("webassist/email/waue_confirm_6.php");
$endtime = microtime_float();
$TimeTracker[] =$endtime - $starttime;
$RealWait = array_sum($TimeTracker)/sizeof($TimeTracker);
if ($LoopCount % $BurstSize == 0) {
$TimePassed = (time() - $StartBurst);
if ($TimePassed < ($BurstTime*60)) {
$WaitBurst = ($BurstTime*60) -$TimePassed;
wa_sleep($WaitBurst);
}
else {
$TimeRemaining = ($TotalEmails- $LoopCount)*$RealWait;
}
$StartBurst = time();
}
if (!$EnteredValue) {
$RecipArray[$RecipIndex][0] = mysql_fetch_assoc($RecipArray[$RecipIndex][1]);
}
}
$RecipIndex ++;
}
$_SESSION[$EmailRef."_Total"] = 0;
$_SESSION[$EmailRef."_Index"] = 0;
$_SESSION[$EmailRef."_Remaining"] = 0;
session_commit();
session_start();
if (function_exists("rel2abs")) $GoToPage = $GoToPage?rel2abs($GoToPage,dirname(__FILE__)):"";
if ($GoToPage!="") {
header("Location: ".$GoToPage);
}
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

on the confirm page, open the server behaviors panel (Window -> Server Behaviors) in the list of server behaviors, double click the universal email behavior, change the trigger from Currant page submit to Button Confirm pressed.

Sign in to reply to this post

greg_herr420504

Sorry, but still no email...

Good Afternoon,

Reading your instructions I did not have a 'Button Confirm pressed' in the drop down menu, but assumed that I should switch it to 'Button: Submit_order pressed'. I did this and adjust the mail setting to be blank for SMPT and Port - like my contact page is and also did the following. Set it with just 'localhost' in SMTP and below six settings.
SMTP = mail.maddenbmx.com
Attempted each port = set to 25, 465, 587
Each port with include from address = checked and unchecked

But still have not received any emails.

Thanks for the help,

Greg

Current Universal Mail code:
<?php
if (!isset($_SESSION))session_start();
if ((isset($_POST["Submit_order_x"]))) {
//WA Universal Email object="mail"
set_time_limit(0);
$EmailRef = "waue_confirm_6";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex ][] = "".((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ." ".((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ."|WA|".((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ."";
$TotalEmails += sizeof($RecipArray[$CurIndex]);
$RealWait = ($WaitTime<0.25)?0.25:($WaitTime+0.1);
$TimeTracker = Array();
$TotalBursts = floor($TotalEmails/$BurstSize);
$AfterBursts = $TotalEmails % $BurstSize;
$TimeRemaining = ($TotalBursts * $BurstTime) + ($AfterBursts*$RealWait);
if ($TimeRemaining < ($TotalEmails*$RealWait) ) {
$TimeRemaining = $TotalEmails*$RealWait;
}
$_SESSION[$EmailRef."_Total"] = $TotalEmails;
$_SESSION[$EmailRef."_Index"] = 0;
$_SESSION[$EmailRef."_Remaining"] = $TimeRemaining;
while ($RecipIndex < sizeof($RecipArray)) {
$EnteredValue = is_string($RecipArray[$RecipIndex][0]);
$CurIndex = 0;
while (($EnteredValue && $CurIndex < sizeof($RecipArray[$RecipIndex])) || (!$EnteredValue && $RecipArray[$RecipIndex][0])) {
$starttime = microtime_float();
if ($EnteredValue) {
$RecipientEmail = $RecipArray[$RecipIndex][$CurIndex];
} else {
$RecipientEmail = $RecipArray[$RecipIndex][0][$RecipArray[$RecipIndex][2]];
}
$EmailsRemaining = ($TotalEmails- $LoopCount);
$BurstsRemaining = ceil(($EmailsRemaining-$AfterBursts)/$BurstSize);
$IntoBurst = ($EmailsRemaining-$AfterBursts) % $BurstSize;
if ($AfterBursts<$EmailsRemaining) $IntoBurst = 0;
$TimeRemaining = ($BurstsRemaining * $BurstTime * 60) + ((($AfterBursts<$EmailsRemaining)?$AfterBursts:$EmailsRemaining)*$RealWait) - (($AfterBursts>$EmailsRemaining)?0:($IntoBurst*$RealWait));
if ($TimeRemaining < ($EmailsRemaining*$RealWait) ) {
$TimeRemaining = $EmailsRemaining*$RealWait;
}
$CurIndex ++;
$LoopCount ++;
session_commit();
session_start();
$_SESSION[$EmailRef."_Index"] = $LoopCount;
$_SESSION[$EmailRef."_Remaining"] = round($TimeRemaining);
session_commit();
wa_sleep($WaitTime);
include("webassist/email/waue_confirm_6.php");
$endtime = microtime_float();
$TimeTracker[] =$endtime - $starttime;
$RealWait = array_sum($TimeTracker)/sizeof($TimeTracker);
if ($LoopCount % $BurstSize == 0) {
$TimePassed = (time() - $StartBurst);
if ($TimePassed < ($BurstTime*60)) {
$WaitBurst = ($BurstTime*60) -$TimePassed;
wa_sleep($WaitBurst);
}
else {
$TimeRemaining = ($TotalEmails- $LoopCount)*$RealWait;
}
$StartBurst = time();
}
if (!$EnteredValue) {
$RecipArray[$RecipIndex][0] = mysql_fetch_assoc($RecipArray[$RecipIndex][1]);
}
}
$RecipIndex ++;
}
$_SESSION[$EmailRef."_Total"] = 0;
$_SESSION[$EmailRef."_Index"] = 0;
$_SESSION[$EmailRef."_Remaining"] = 0;
session_commit();
session_start();
if (function_exists("rel2abs")) $GoToPage = $GoToPage?rel2abs($GoToPage,dirname(__FILE__)):"";
if ($GoToPage!="") {
header("Location: ".$GoToPage);
}
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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