View Single Post
  #11  
Old 09-14-2009, 11:00 AM
 
info@sjidesign.com info@sjidesign.com is offline
 

Advanced Member
  
Join Date: Aug 2003
Posts: 46
 

Default Re: Email cart contents?

Got a little bit further, managed to get the email sending the product code and price through to me now

Would you know how to get the customers email address and their shipping address on the email that comes throught to me? and also if I could get the email to come FROM the customer so that I can reply directly to it?

many thanks for your help, I am nearly there now.

Regards

Dan


<?php
require "./auth.php";
x_load('cart');

$emailSentTo = "info@here.com";
$subjectOfEmail = "Catac Shipping Quote";

//========= no need to edit bellow

// Set HTML Mail Header
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// The Message
$message = $GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"];

//Cleaning Message

for ($i = 0; $i < $cart["max_cartid"]; $i++){


$message = $cart["products"][$i]["productcode"];
$message3 = $cart["products"][$i]["product"];
$message2 = $cart["display_discounted_subtotal"];


}
// Sending
mail($emailSentTo, $subjectOfEmail, $message, $message2, $headers);

//Thanking
echo "<script language=\"javascript\" type=\"text/javascript\">
alert('Thank You, We will contact you shortly.');
window.location = \"http://$_SERVER[HTTP_HOST]\";
</script>
";
?>
__________________
X Cart Version 4.2
Reply With Quote