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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Confirmation email

Thread began 11/19/2012 9:27 am by info364504 | Last modified 11/21/2012 2:43 pm by info364504 | 1072 views | 12 replies

info364504

Hi again,
I have inserted the cart display code inside my code but get plenty of errors on submit.
I'm sure i'm doing it wrong...

<?
$strTo = $_POST["txtTo"];
$strSubject = stripslashes($_POST["txtSubject"]);
$strMessage = '<font face="tahoma,arial" size=2>'."Hola\n\n" .$_POST["companyname"]. "<br>alguien ha hecho un pedido:<p>Nombre:\n\n".$_POST["nombre"]."<br>Apellidos:\n\n".$_POST["apellidos"]."<br>Direccion:\n\n".$_POST["tipo_via"].$_POST["nombre_via"]."<br>Ciudad:\n\n".$_POST["poblacion"]."<br>C.P.:\n\n".$_POST["cp"]."<br>Provincia:\n\n".$_POST["provincia"]."<br>Telefono:\n\n".$_POST["telefono"]."<br>Movil:\n\n".$_POST["movil"]."<br>Email:\n\n".$_POST["email"]."<br>Importe Total:\n\n".$totalemail."


if (!$enersolmaCart->IsEmpty())
{
<table width="100%" style=" border-right:solid 1px #CAD0CD; /* Neutral_Medium */ border-left:solid 1px #CAD0CD; /* Neutral_Medium */ border-bottom:solid 1px #CAD0CD; /* Neutral_Medium */ margin-bottom:14px;" border="0" cellspacing="0" cellpadding="0">
<tr>
<th style="padding:10px 14px 10px 7px; vertical-align:top; text-align:left; background-color:#578557; /* Accent1 */ color:#FFFFFF; /* Global_White */" text-align:left;>Name</th>
<th style="padding:10px 14px 10px 7px; vertical-align:top; text-align:left; background-color:#578557; /* Accent1 */ color:#FFFFFF; /* Global_White */" text-align:left;>Description</th>
<th style="padding:10px 14px 10px 7px; vertical-align:top; text-align:right; background-color:#578557; /* Accent1 */ color:#FFFFFF; /* Global_White */" text-align:right;>Price</th>
<th style="padding:10px 14px 10px 7px; vertical-align:top; text-align:right; background-color:#578557; /* Accent1 */ color:#FFFFFF; /* Global_White */" text-align:right;>Shipping</th>
<th style="padding:10px 14px 10px 7px; vertical-align:top; text-align:right; background-color:#578557; /* Accent1 */ color:#FFFFFF; /* Global_White */" text-align:right;>IVA</th>
<th style="padding:10px 14px 10px 7px; vertical-align:top; text-align:right; background-color:#578557; /* Accent1 */ color:#FFFFFF; /* Global_White */" text-align:right;>Total</th>
</tr>

while (!$enersolmaCart->EOF()) {

<tr>
<td style="padding:10px 14px 10px 7px; vertical-align:top;" >echo $enersolmaCart->DisplayInfo("Name"); </td>
<td style="padding:10px 14px 10px 7px; vertical-align:top;" >echo $enersolmaCart->DisplayInfo("Description");</td>
<td style="padding:10px 14px 10px 7px; vertical-align:top; text-align:right;" >WA_eCart_DisplayMoney($enersolmaCart, $enersolmaCart->DisplayInfo("Price")); </td>
<td style="padding:10px 14px 10px 7px; vertical-align:top; text-align:right;" >WA_eCart_DisplayMoney($enersolmaCart, $enersolmaCart->DisplayInfo("Shipping")); </td>
<td style="padding:10px 14px 10px 7px; vertical-align:top; text-align:right;" >WA_eCart_DisplayMoney($enersolmaCart, $enersolmaCart->DisplayInfo("IVA")); </td>
<td style="padding:10px 14px 10px 7px; vertical-align:top; text-align:right;" >WA_eCart_DisplayMoney($enersolmaCart, $enersolmaCart->DisplayInfo("TotalPrice"));
</td>
</tr>
<?php
$enersolmaCart->MoveNext();
}
$enersolmaCart->MoveFirst();

</table>
<h3 style="color:#578557; /* Accent1 */ margin:0 0 4px 0; font-size:small;">Order Summary</h3>

<table width="100%" style=" border:solid 1px #CAD0CD; /* Neutral_Medium */ border-top:solid 0px #CAD0CD; /* Neutral_Medium */" border="0" cellpadding="0" cellspacing="0" >

//WA eCart Merchandizing Show Start
//ecart="enersolmaCart"
if ($enersolmaCart->GetDiscounts() > 0 || $enersolmaCart->GetCharges() > 0 || $enersolmaCart->GetShipping() > 0 || $enersolmaCart->GetTax() > 0) {

<tr>
<td style="text-align:left; font-weight:bold; color:#001807; /* Accent4 */ padding: 10px 5px 10px 7px; border-top:solid 1px #CAD0CD; /* Neutral_Medium */" >Sub-total</td>
<td style=" text-align:right; padding: 10px 14px 10px 5px; border-top:solid 1px #CAD0CD; /* Neutral_Medium */">WA_eCart_DisplayMoney($enersolmaCart, $enersolmaCart->TotalColumn("TotalPrice")); </td>
</tr>

//WA eCart Merchandizing Show End
//ecart="enersolmaCart"
}


//WA eCart Merchandizing Show Start
//ecart="enersolmaCart"

if ($enersolmaCart->GetDiscounts() > 0) {


//WA eCart Merchandizing Show End
//ecart="enersolmaCart"
}


//WA eCart Merchandizing Show Start
//ecart="enersolmaCart"
if ($enersolmaCart->GetCharges() > 0) {


//WA eCart Merchandizing Show End
//ecart="enersolmaCart"
}


//WA eCart Merchandizing Show Start
//ecart="enersolmaCart"
if ($enersolmaCart->GetShipping() > 0) {

<tr>
<td style="text-align:left; font-weight:bold; color:#001807; /* Accent4 */ padding: 10px 5px 10px 7px; border-top:solid 1px #CAD0CD; /* Neutral_Medium */">Shipping</td>
<td style="text-align:right; padding: 10px 14px 10px 5px; border-top:solid 1px #CAD0CD; /* Neutral_Medium */">WA_eCart_DisplayMoney($enersolmaCart, $enersolmaCart->GetShipping());</td>
</tr>

//WA eCart Merchandizing Show End
//ecart="enersolmaCart"
}


//WA eCart Merchandizing Show Start
//ecart="enersolmaCart"
if ($enersolmaCart->GetTax() > 0) {

<tr>
<td style="text-align:left; font-weight:bold; color:#001807; /* Accent4 */ padding: 10px 5px 10px 7px; border-top:solid 1px #CAD0CD; /* Neutral_Medium */">Tax</td>
<td style="text-align:right; padding: 10px 14px 10px 5px; border-top:solid 1px #CAD0CD; /* Neutral_Medium */">WA_eCart_DisplayMoney($enersolmaCart, $enersolmaCart->GetTax()); </td>
</tr>

//WA eCart Merchandizing Show End
//ecart="enersolmaCart"
}

<tr style="background-color:#D2E6FF; /* Accent11 */" >
<td style="font-weight:bold; text-align:left; font-weight:bold; color:#001807; /* Accent4 */ padding: 10px 5px 10px 7px; border-top:solid 1px #CAD0CD; /* Neutral_Medium */" >Total:</td>
<td style="font-weight:bold; text-align:right; padding: 10px 14px 10px 5px; border-top:solid 1px #CAD0CD; /* Neutral_Medium */">WA_eCart_DisplayMoney($enersolmaCart, $enersolmaCart->GrandTotal()); </td>
</tr>
</table>
</div>

//WA eCart Show If Middle
}
else {
<table><tr><td>The cart is empty</td></tr></table>

//WA eCart Show If End
}


$from = stripslashes($_POST['fromname'])."<".stripslashes($_POST['fromemail']).">";
//*** Uniq id Session ***//
$strSid = md5(uniqid(time()));


$strHeader = "";
$strHeader .= "From: $from\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: multipart/mixed;\r\n"; // esta línea es muy importante, porque hace que lleguen bien los acentos y que los párrafos tengan separación no muy ancha.
$strHeader .= "Cc: {$_POST['cc']}\r\n";
$strHeader .= "Bcc: {$_POST['bcc']}\r\n";

$strHeader .= "MIME-Version: 1.0\n";
$strHeader .= "Content-Type: multipart/mixed; boundary=\"".$strSid."\"\n\n";
$strHeader .= "This is a multi-part message in MIME format.\n";

$strHeader .= "--".$strSid."\n";
$strHeader .= 'Content-Type: text/html; charset=iso-8859-1'.$eol;
$strHeader .= "Content-Transfer-Encoding: 7bit\n\n";
$strHeader .= $strMessage."\n\n";

$flgSend = @mail($strTo,$strSubject,null,$strHeader);
?>

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