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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problems with Universal Email on confirm.php

Thread began 1/27/2011 12:19 am by danny405167 | Last modified 2/03/2011 1:19 am by danny405167 | 2019 views | 13 replies |

danny405167

Problems with Universal Email on confirm.php

I am developing an ecart with no payment gateway. Every time I try to add the email order confirmation via the checkout wizard, the code on the confirmation is written with an error at line 33. Some times the code for emailing the order confirmation does not get written on the confirmation page when I start from scratch. I have deleted the .dat file on my os snow leopard. I am using CS5 with Ecart 5, Form builder 2.0 and all the extensions that came with my suite that I purchased in May 2010.


$RecipArray[$CurIndex][] = $row_<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?>

Below is the information that I keep entering when the I reach the Universal email step.

Step 3 of 3: Send email receipt
EMAIL TO:
<?php echo ((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ?>

TO DISPLAY NAME:
<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?> <?php echo ((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ?>

FROM ADDRESS:
admin@bmprinting2000.com

FROM DISPLAY NAME:
B and M Printing

SUBJECT:
Order Confirmation

EMAIL OBJECT: mail
STMP SERVER: smtp.1and1.com
PORT: 25
ORGANIZATION: blank (what is this?)
X-mailer: blank (for linux?)

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

Dani Chankhour

This line of code does not look correct:

$RecipArray[$CurIndex][] = $row_<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?>

Can you send me a screen shot of what you are actually entering in the Wizard. Are you selecting the lighting bolt and choosing the form element or are you copying an pasting.

Sign in to reply to this post

danny405167

Universal Email behavior not being added to my confirm page

Thank you for responding to my plea! But sincerely I am facing a dilemma with with ECART 5.0.3. Let me start by saying that there is definitely a bug with ECART 5 and FORMBUILDER 2.0. At work I have a DELL tower that runs on WINDOWS 7 Pro and CS4. On my dell the checkout wizard does not display Email option window.Weird huh? In my IMAC i3 I am running SNOW LEOPARD and CS5. I get the email option window, I entered, not paste, the information that I am require to enter for the UNIVERSAL EMAIL. After the wizard completes building my 3 pages: checkout.php, confirm.php, and confirm_success.php, I go to my confirm page to check if the UNIVERSAL EMAIL behavior has been installed. And what do you know? It writes the code with syntax errors. I go to my binding tab and there is no universal email behavior.

I like challenges but this is turning into a nightmare. I've spent the whole day at work troubleshooting my unique problem with ECART 5.0.3 and FORMBUILDER 2.0. I uninstalled FORMBUILDER 2.0 and installed FORMBUILDER 1.0 and UNIVERSAL EMAIL. I also replace the WAUniversalEmail.xml file with the one that you posted on line. Believe it or not it fixed my problem at work. I wished I had created the ecart pages before I purchased FORMBUILDER 2.0 because honestly the extension is not stable. If WEBASSIST really cares about loyal customers, then it needs to recalled, reimburse, or credit those who purchased FORMBUILDER 2.0.

At home I have not had any luck yet. I only replaced the WAUniversalEmail.xml and I am stilled getting the same problem; UNIVERSAL EMAIL behavior is not added to my page. I do not want to uninstalled FORMBUILDER 2.0 becasue after all I paid 49.99.

Thank you!.

Sign in to reply to this post

Ray BorduinWebAssist

We have released a new build of eCart so that this problem will no longer happen.

If you already ran into this issue and don't want to run the wizard again you should be able to replace:

$RecipArray[$CurIndex][] = $row_<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?>
<?php echo ((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ?>|WA|<?php echo ((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ?>;
$RecipArray[$CurIndex][] = $<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?><?php echo ((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ?>|WA|<?php echo ((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ?>;
$RecipArray[$CurIndex][] = "undefined";
$TotalEmails += mysql_num_rows($<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?><?php echo ((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ?>|WA|<?php echo ((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ?>);



with:

$RecipArray[$CurIndex ][] = "".((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ."";
$TotalEmails += sizeof($RecipArray[$CurIndex]);
Sign in to reply to this post

danny405167

Your solution worked but...

Whats the point of the wizard if is not able to add universal email to my confirm page? Now I have to save that piece of code every time I create a new cart. Ecart 5.0.3 was supposed to fix the problem but it did not do this. Is there any way I can get credit for purchasing formbuilder 2.0 when is obvious that is unable to perform a simple task of adding universal email?
By the way, I installed Ecart 5.0.4 beta version and even though is not a finish product; it was able to add universal email on my confirm page. The only worry I have that I might run into problems when I decide to use a gateway payment. Any suggestions?

Sign in to reply to this post

Ray BorduinWebAssist

We have corrected the issue in both universal email and in form builder. You shouldn't have anything to worry about if you have installed either update.

Sign in to reply to this post

danny405167

Formbuilder 2.0 still unable to add Universal email on Ecart 5.0.3 confirm.php page

I am sorry yo say this, but the problem still persist. This morning I had to removed all of my extensions because after installing and reinstalling ecart 5.0.0.3 my configuration folder got corrected.

I decided to install only ecart 5.0.0.3 and form builder 2.0 and IS STILL NOT ADDING universal email. My computer at work is a DELL PRECISION T3500 with WINDOWS 7 PRO. and DW CS4.
Bellow is the code from my confirm page.

<?php require_once("webassist/email/mail_php.php"); ?>
<?php require_once("webassist/email/mailformatting_php.php"); ?>
<?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_1";
$BurstSize = 1;
$BurstTime = 200;
$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][] = $row_<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?>
<?php echo ((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ?>|WA|<?php echo ((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ?>;
$RecipArray[$CurIndex][] = $<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?><?php echo ((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ?>|WA|<?php echo ((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ?>;
$RecipArray[$CurIndex][] = "undefined";
$TotalEmails += mysql_num_rows($<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?><?php echo ((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ?>|WA|<?php echo ((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ?>);
$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)?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_1.php");
$endtime = microtime_float();
$TimeTracker[] =$endtime - $starttime;
$RealWait = array_sum($TimeTracker)/sizeof($TimeTracker);
if ($LoopCount % $BurstSize == 0 && $CurIndex < sizeof($RecipArray[$RecipIndex])) {
$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 ($GoToPage!="") {
header("Location: ".$GoToPage);
}
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

The fix is in eCart v 5.0.4

The problem was introduced in v 5.0.3. You will have to install version 5.0.4 for the checkout wizard email confirmation to be created properly.

You can replace the four lines with the fixed code referenced above for already created pages or if you don't want to upgrade.

Sign in to reply to this post

danny405167

I did that but your 5.0.4 is in beta and is not stable because I am getting the following error

Parse error: syntax error, unexpected '@' in /homepages/0/d351046290/htdocs/medForms_cart/confirm.php on line 305

300 $WA_connection = $bm_printing;
301 $WA_table = "orderdetails";
302 $WA_redirectURL = "@@RedirectURLParam@@";
303 $WA_indexField = "";
304 $WA_fieldNamesStr = "@@FieldNameStrParam@@";
305 $WA_fieldValuesStr = @@FieldValueStrParam@@; <-----------LINE 305
306 $WA_columnTypesStr = "@@ColumnTypeStrParam@@";
307 $WA_sql = "";

If I put the variable in quotes but I get the following error

Parse error: syntax error, unexpected '@' in /homepages/0/d351046290/htdocs/medForms_cart/confirm.php on line 336

$WA_fieldValuesStr = @@FieldValueStrParam@@; <----------LINE
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$insertParamsObj = WA_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);

I try the following the following to see if it would help but no luck


Try deleting the checkout pages, then in Dreamweaver go to Window -> Workspace Layout -> Reset '<Your layout name>'

Next close Dreamweaver and delete the cache file from the users configuration folder:

Sign in to reply to this post

Ray BorduinWebAssist

I, and our QA team, are unable to reproduce the problem.

Did you completely uninstall and remove the old version before installing the new one? I've created a support incidetn so that we can work with you directly to figure out the cause and solution for this issue.

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