KennethS Posted March 7, 2005 Share Posted March 7, 2005 Hello All, I'm wondering if it would be possible to have Oscommerce send a code with the order confirmation if they have a certain item in their shopping cart. Just an extra line of text anywhere only if they purchased a particular thing. If anyone has done this I would be very happy is someone would post how they accomplished such a thing. Thanks Much, Kenneth S. Kenneth S -------------- Customer "Are you a real programmer?" Me "No, but I did stay at a Holiday Inn Express last night" Link to comment Share on other sites More sharing options...
KennethS Posted March 7, 2005 Author Share Posted March 7, 2005 Figured it out myself, here is the jest of it if anyone is interested or searching for help on doing this: checkout_process.c : Somewhere in this file add code: $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // check through the product ID's if product's found with ID #2 or #1 define SUBSCRIBER if (($products[$i]['id']) <= 2) { define('SUBSCRIBER', true); } } After this: if ($order->info['comments']) { $email_order .= tep_db_output($order->info['comments']) . "\n\n"; } Add this: if (defined('SUBSCRIBER')) { $email_order .= EMAIL_TEXT_PASSWORD . "\n\n"; } Then in includes/languages/english/checkout_process.php add this: define('EMAIL_TEXT_PASSWORD', 'Your Subscriber Only Code Is: ######'); Hope this helps someone. Kenneth S. Kenneth S -------------- Customer "Are you a real programmer?" Me "No, but I did stay at a Holiday Inn Express last night" Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.