Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommend Some Easy, Clean, Cool Add On's or Tip's


RC Heli Pilot

Recommended Posts

Posted

Hi.

I just installed osCommerce and have already done some editing of it for my new store.

 

What are some easy to do Add On's or Tips that you think should be done to make the store just a little bit better?

 

I found this little tip in the Manual on Page 61, How to add your own email address to the Tell a Friend so that you get a copy of it as well as the person that the Friend is sending it to does.

 

[note]To add the store owner to the form to receive an additional email when submitted

open /catalog/tell_a_friend.php about line 80 after this code:

tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name,

$from_email_address);

Put this:

// Mail a (silent) report to the web owner:

// get ip

if (getenv('HTTP_X_FORWARDED_FOR')) {

$ip=getenv('HTTP_X_FORWARDED_FOR');

} else {

$ip=getenv('REMOTE_ADDR');

}

 

// build report

$report = 'Here are the details of the T.A.F. submission by ' . $from_name . ' on ' . date("D M j G:i:s Y") .

':';

$report .= "\n\n" . 'Recipient details: ' . $HTTP_POST_VARS['friendname'] . ' - ' .

$HTTP_POST_VARS['friendemail'];

$report .= "\n" . 'Sender details: ' . $from_name . ' - ' . $from_email_address;

$report .= "\n" . 'Sender ip address: ' . $ip;

$report .= "\n" . 'Personal message: ' . "\n\n" . $HTTP_POST_VARS['yourmessage'];

$report .= "\n\n" . 'Product link: ' . HTTP_SERVER . DIR_WS_CATALOG .

FILENAME_PRODUCT_INFO . '?products_id=' . $HTTP_GET_VARS['products_id'];

// mail report

tep_mail('Tell A Friend', '[email protected]', '[ REPORT ] Tell a Friend Usage', stripslashes($report),

'', $from_email_address);

 

 

Change [email protected] to your email address.

Note that if you use MIME e-mail you should change all occurances of "\n" to "<br>"

 

This line in the code above is Incorrect:

$report .= "\n" . 'Personal message: ' . "\n\n" . $HTTP_POST_VARS['yourmessage'];

 

The Part that Reads ['yourmessage'] Needs to be just ['message'] and NOT ['yourmessage']

 

I hope this might help someone else out as it did for me.

 

So if you have any suggestions for some Add-On's or Tips,... Please Post them here.

 

Thanks.

RCHP

Archived

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

×
×
  • Create New...