Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Editing Email Content?


keithwilliams

Recommended Posts

Hiya All,

 

I'm still plugging away with osC, and although I have much less hair than when I started, I like osC and am enjoying the challenge!

 

I'm not conversant with PHP, HTML or SQL coding, but can work thru it logically (with help!)

 

I have my osC running on my laptop using the xampp package and it all works fine.

 

I'd now like to edit the automatic emails that are generated.

 

Would anyone know how to go about this? There is some limited info in the manual, but I'd like to adjust the email and then preview the result if possible. I don't know if this can be done locally on my pc, or if I actually have to send the mail and if so, how to set this up?

 

Basically, I'm stumped as to how best to go about setting up the automatically sent emails that osC generates.

 

Any help you can give would be greatly appreciated.

 

Kind regards

Keith

In life, try everything three times...

First, just to see if you like it.

A Second, to see if you were mistaken the first,

And a third, to see if you tire of it quickly...

Link to comment
Share on other sites

Following link is going to help you with email edits (and you can spend sometime to explore more...)

 

http://oscommerce.info/kb/osCommerce/Catal...ea/E-Mails_Sent

 

cheers

gaurav

 

Thanks for the link. I think the info at the link is similar to what's in the manual?

 

If I make some changes to the files, would you know how I could see the result, perhaps without actually sending the email?

 

Thanks for you help!

In life, try everything three times...

First, just to see if you like it.

A Second, to see if you were mistaken the first,

And a third, to see if you tire of it quickly...

Link to comment
Share on other sites

If I make some changes to the files, would you know how I could see the result, perhaps without actually sending the email?

Hi Keith,

It is always good to see the real thing - ie send email to test how would it finally show up. Even the best coders goof up at times :)

If you are familiar with PHP, you may define stuff and then display the output in another php page to see how would it show up, eg. if you have

define('EMAIL_SUBJECT', 'This is my subject'); // I have added This is my subject

You can then make a simple php page (don't forget to include filename where defines exist) as shown below

testemailcontents.php
<?php
include (catalog/includes/languages/english/create_account.php);
echo EMAIL_SUBJECT."</BR>";
echo  EMAIL_GREET_MR."</BR>";
?>

 

or you may modify relevant files as an example - catalog\create_account.php comment out following lines

//	  tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); this is used to send email
//	  tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL')); this redirects page to show account has been created.

next do an echo of information that would have otherwise gone to the customer in email (after tep_mail(.... in create_account.php)

echo $name;
echo $email_address;
echo EMAIL_SUBJECT;
echo $email_text; 
etc....

Hope that helps

Cheers,

Gaurav

Best Regards,
Gaurav

Link to comment
Share on other sites

Hi Keith,

It is always good to see the real thing - ie send email to test how would it finally show up. Even the best coders goof up at times :)

If you are familiar with PHP, you may define stuff and then display the output in another php page to see how would it show up, eg. if you have

define('EMAIL_SUBJECT', 'This is my subject'); // I have added This is my subject

You can then make a simple php page (don't forget to include filename where defines exist) as shown below

testemailcontents.php
<?php
include (catalog/includes/languages/english/create_account.php);
echo EMAIL_SUBJECT."</BR>";
echo  EMAIL_GREET_MR."</BR>";
?>

Hope that helps

Cheers,

Gaurav

 

Thanks very much for the info! Unfortunately, I'm nothing like familiar with PHP!

 

However, I use PHP Designer Pro to edit the osC files and it helps me along quite a bit, so i may just go and have a play...

 

Ultimately thou you're right - it'll be best to test it all properly when I finally pull my finger out and get a host!

 

Thanks again for your help

 

Kind Regards

Keith

In life, try everything three times...

First, just to see if you like it.

A Second, to see if you were mistaken the first,

And a third, to see if you tire of it quickly...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...