Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order confirmation email - need to add info


brentc73

Recommended Posts

I need some help on the Order confirmation email - need to add info to the email.

 

Basically when someone specifically orders product X I want the Email to add a custom message based product X.

If they order product Y then the message should not appear in the Email.

 

So I modified the checkout_process.php(see code below) and the email sends the message regardless of the product ordered.

Any help would be appreciated

 

  if ($order->products_id != '50') {  //50 being the product id assigned by OSC
$email_order .= "\n" . EMAIL_SEPARATOR . "\n" . 
  EMAIL_TEXT_LINK .''. 'Thank you for ordering product X please visit our partner to buy accessories '. '.'www.ghostly.com'."\n".
 EMAIL_SEPARATOR . "\n\n";  
}

Brent C

www.provoke-me.com

Link to comment
Share on other sites

I believe something like this would work:

 

for ( $inum=0, $nnum=sizeof($order->products); $inum<$nnum; $inum++ ) {
 if ( $order->products[$inum]['id'] == '50' ) { //50 being the product id assigned by OSC
$email_order .= "\n" . EMAIL_SEPARATOR . "\n" . 
EMAIL_TEXT_LINK . 'Thank you for ordering product X please visit our partner to buy accessories www.ghostly.com' . "\n" .
EMAIL_SEPARATOR . "\n\n";  
 }
}

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I believe something like this would work:

 

for ( $inum=0, $nnum=sizeof($order->products); $inum<$nnum; $inum++ ) {
 if ( $order->products[$inum]['id'] == '50' ) { //50 being the product id assigned by OSC
$email_order .= "\n" . EMAIL_SEPARATOR . "\n" . 
EMAIL_TEXT_LINK . 'Thank you for ordering product X please visit our partner to buy accessories www.ghostly.com' . "\n" .
EMAIL_SEPARATOR . "\n\n";  
 }
}

 

Tried it but unfortunately it did not work, thank you for trying.

 

Anyone else have any idea?

Brent C

www.provoke-me.com

Link to comment
Share on other sites

Tried it but unfortunately it did not work, thank you for trying.

 

Anyone else have any idea?

 

try using the in_cart function. or just get the quantity and chek if it is 0.. that would help..

 

Hari

Link to comment
Share on other sites

Tried it but unfortunately it did not work, thank you for trying.

That might be because you didn't insert the code in the right place.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...