close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

eCart Repeats for Each Table Row in Universal Email Template

Thread began 6/21/2013 1:21 pm by anonymous | Last modified 6/25/2013 10:56 am by anonymous | 1056 views | 5 replies |

anonymous

eCart Repeats for Each Table Row in Universal Email Template

Hi. I used Universal Email to build an order confirmation email for users of my e-commerce site. It is pulling data from my checkout form with no problem; however, when I use the Display Manager to display my eCart, it duplicates the content in my cart for each row of content from my checkout form. When I have multiple items in the cart, it cuts off the total rows.

I've attached a screenshot of a sample email to illustrate the problem. Also attached is the email template file. Please take a look and advise on any problems you may see.

Thank you!
Heather

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

anonymous

Please Reply

Please reply as soon as possible. Thank you!

Sign in to reply to this post

Jason ByrnesWebAssist

in the template, move the following code at line 50 - 54:

php:
<?php

foreach( $_POST as $pkey => $pval ){
  if (!
RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes))  {
      if (
get_magic_quotes_gpc()) $pval stripslashes((is_array($pval)?implode(", ",$pval):$pval));
?>



to be just before what is currently line 159, so that lines 159 - 171 are:

php:
<?php

foreach( $_POST as $pkey => $pval ){
  if (!
RemoveValue($pkey,$remove,$removeBegins,$removeEnds,$removeIncludes))  {
      if (
get_magic_quotes_gpc()) $pval stripslashes((is_array($pval)?implode(", ",$pval):$pval));
?>          
                    <tr valign="top">
                      <th style="font-size: 12px; width: 134px; text-align: right; padding: 3px 10px 3px 3px; font-family:Arial, Helvetica, sans-serif; font-weight: bold;"><?php echo(str_replace("_"," ",$pkey)); ?>:</th>
                      <td style="font-size: 12px; padding: 3px; font-family:Arial, Helvetica, sans-serif"><?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))); ?></td>
                  </tr>
<?php
  
}
}
?>
Sign in to reply to this post

anonymous

Thanks, Jason. That worked. Any reason why the email template doesn't show the Total Price row, though?

Sign in to reply to this post

Jason ByrnesWebAssist

there is no code on thew template to show the total price.


add the following to show the grand total:
<?php echo WA_eCart_DisplayMoney($eCart1, $eCart1->GrandTotal()); ?>

Sign in to reply to this post

anonymous

Thanks. I had the Total row in, but not Grand Total.

Sign in to reply to this post

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