email shopping cart receipt

Discussion in 'PHP' started by Dark Rider, Jan 21, 2008.

  1. #1
    Hello,

    I have been working on a shopping cart but I cant get an email to send with the information I need on the success page.

    right now I have it set to show this on the success page:
    
    <div class="eC_Clean_Pacifica_Arial" style="font-family:Arial, Helvetica, sans-serif; /* Font Style */ font-size:x-small; 	color: #2C2D2E; /* Neutral_Black */ 	width:514px;">
      <?php
    //WA eCart Show If Start
    if (!$KarnerCart->IsEmpty())     {
    ?>
        <h2 style="color:#4870AA; /* Accent_1 */ margin-bottom:7px; font-size:medium;">Your Shopping Cart</h2>
        <table width="100%" style="font-size:x-small;" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <th style="padding:10px 7px 10px 7px; vertical-align:top;	text-align:left; background-color:#F1F0EE; /* Global_Gray_Light */ color:#353C48; /* Accent_5 */ border-top:solid 1px #BABDC2; /* Neutral_Dark */ border-bottom:solid 1px #BABDC2; /* Neutral_Dark */">Name</th>
            <th style="padding:10px 7px 10px 7px; vertical-align:top;	text-align:left; background-color:#F1F0EE; /* Global_Gray_Light */ color:#353C48; /* Accent_5 */ border-top:solid 1px #BABDC2; /* Neutral_Dark */ border-bottom:solid 1px #BABDC2; /* Neutral_Dark */">Download</th>
            <th style="padding:10px 7px 10px 7px; vertical-align:top;	text-align:right; background-color:#F1F0EE; /* Global_Gray_Light */ color:#353C48; /* Accent_5 */ border-top:solid 1px #BABDC2; /* Neutral_Dark */ border-bottom:solid 1px #BABDC2; /* Neutral_Dark */">Total</th>
          </tr>
          <?php
    while (!$KarnerCart->EOF())      {
    ?>
            <tr>
              <td style="padding:10px 7px 10px 7px; vertical-align:top; "><p style="font-weight:bold; margin:0 0 2px 0;"><?php echo $KarnerCart->DisplayInfo("Name"); ?></p>
                <p style="margin:0 0 2px 0;"><?php echo $KarnerCart->DisplayInfo("Description"); ?></p></td>
              <td style="padding:10px 7px 10px 7px; vertical-align:top;">
    		  <a href="<?php echo $KarnerCart->DisplayInfo("Download"); ?>">Download Now</a></td>
              <td style="padding:10px 7px 10px 7px; vertical-align:top; text-align:right;"><?php echo WA_eCart_DisplayMoney($KarnerCart, $KarnerCart->DisplayInfo("TotalPrice")); ?></td>
            </tr>
            <?php
      $KarnerCart->MoveNext();
    }
    $KarnerCart->MoveFirst();
    ?>
        </table>
        <div>
          <table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-size:x-small; border-bottom:solid 1px #BABDC2; /* Neutral_Dark */">
            <?php
    //WA eCart Merchandizing Show Start
    //ecart="KarnerCart"
    if ($KarnerCart->GetDiscounts() > 0 || $KarnerCart->GetCharges() > 0 || $KarnerCart->GetShipping() > 0 || $KarnerCart->GetTax() > 0)     {
    ?>
            <tr>
              <td style="text-align:left; font-weight:bold; 	color: #353C48; /* Accent_5 */	padding: 10px 5px 10px 7px; border-top:solid 1px #BABDC2; /* Neutral_Dark */	background-color:#F1F0EE; /* Global_Gray_Light */" >Sub-total</td>
              <td style="text-align:right; padding: 10px 14px 10px 5px; border-top:solid 1px #CCD0D6; /* Neutral_Medium */ 	background-color:#F1F0EE; /* Global_Gray_Light */" ><?php echo WA_eCart_DisplayMoney($KarnerCart, $KarnerCart->TotalColumn("TotalPrice")); ?></td>
            </tr>
            <?php
    //WA eCart Merchandizing Show End
    //ecart="KarnerCart"
    }
    ?>
            <?php
    //WA eCart Merchandizing Show Start
    //ecart="KarnerCart"
    if ($KarnerCart->GetDiscounts() > 0)     {
    ?>
            <?php
    //WA eCart Merchandizing Show End
    //ecart="KarnerCart"
    }
    ?>
            <?php
    //WA eCart Merchandizing Show Start
    //ecart="KarnerCart"
    if ($KarnerCart->GetCharges() > 0)     {
    ?>
            <?php
    //WA eCart Merchandizing Show End
    //ecart="KarnerCart"
    }
    ?>
            <?php
    //WA eCart Merchandizing Show Start
    //ecart="KarnerCart"
    if ($KarnerCart->GetShipping() > 0)     {
    ?>
            <?php
    //WA eCart Merchandizing Show End
    //ecart="KarnerCart"
    }
    ?>
            <?php
    //WA eCart Merchandizing Show Start
    //ecart="KarnerCart"
    if ($KarnerCart->GetTax() > 0)     {
    ?>
            <?php
    //WA eCart Merchandizing Show End
    //ecart="KarnerCart"
    }
    ?>
            <tr>
              <td style="text-align:left; font-weight:bold; padding: 10px 14px 10px 5px; background-color:#E5F385; /* Accent_11 */ border-top:solid 1px #CCD0D6; /* Neutral_Medium */ " >Total:</td>
              <td style="background-color:#B8D249; /* Accent_12 */ width:15%; text-align:right; padding: 10px 14px 10px 5px; border-top:solid 1px #CCD0D6; /* Neutral_Medium */" ><?php echo WA_eCart_DisplayMoney($KarnerCart, $KarnerCart->GrandTotal()); ?></td>
            </tr>
          </table>
        </div>
        <?php
    //WA eCart Show If Middle
    }
    else     {
    ?><table><tr><td>The cart is empty</td></tr></table>
        <?php
    //WA eCart Show If End
    }
    ?>
    </div>
    
    PHP:
    it just shows the items bought and a little information, I want the user to be able to fill out a form which will send the out come of this little php code. I can do the whole mail thing I just cant get the out come of this to be mailed, it just sends it all as plain text or doesnt get the items that were bought.

    any help would be awesome!
     
    If someone posts a solution, use the "Best Answer" link in their post to pick it as the best answer.
    Dark Rider, Jan 21, 2008 IP