osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

osCMax Intergration hacks help

This is a discussion on osCMax Intergration hacks help within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; I am currently intergrating vendors email for RC3 all works well and this will be another mod ported to work ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 12-26-2006, 10:11 AM
osCMax Testing Team
 
Join Date: Oct 2004
Location: United Kingdom
Posts: 48
Thanks: 1
Thanked 23 Times in 14 Posts
Rep Power: 0
automotiveuk will become famous soon enoughautomotiveuk will become famous soon enough
Angry osCMax Intergration hacks help

I am currently intergrating vendors email for RC3 all works well and this will be another mod ported to work with RC3.

But after testing this mod would it not be better to move the code to the catalog side at the moment vendors email gets sent out only after you update the order status to processing by admin side which is fine but I would like to hack this mod and make it automatied so lets say we go on hoilday for a week and we want to put our shop on auto pilot.

can we move this code to checkout success or order process and enable product order sent to product manaufacure as soon as the order has completed as successfull purchase. Can we check to make sure that payments have been made successfully before vendors email gets sent for that order and may be create new order status name to vendor_ordered and get the code to change the status once email has been sent.

I have searched high and low and on come agross this code from osc forums but this did not work for me may be PHP guys can shed some light so I can get this hack successfully working and released to RC3 users.

Many Thanks
Automotiveuk

Code checkout_process.php
------------------------------------------------------------
// send emails to other people
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
//vendors email begin
// Get the delivery address
$delivery_address_query = tep_db_query("select distinct delivery_company, delivery_name, delivery_street_address, delivery_city, delivery_state, delivery_postcode from " . TABLE_ORDERS . " where orders_id='" . $insert_id ."'");
$delivery_address_list = tep_db_fetch_array($delivery_address_query);

//find out what shipping methods the customer chose
$shipping_method_query = tep_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id='" . $insert_id . "' and class = 'ot_shipping'");
$shipping_method = tep_db_fetch_array($shipping_method_query);

$vendors_email_query = tep_db_query("select distinct o.orders_id, v.vendors_id, v.vendors_name, v.vendors_email, v.vendors_contact, v.vendor_add_info, v.vendor_street, v.vendor_city, v.vendor_state, v.vendors_zipcode, v.vendor_country, v.account_number, o.products_id, o.orders_products_id FROM " . TABLE_VENDORS . " v, " . TABLE_ORDERS_PRODUCTS . " o, " . TABLE_PRODUCTS . " p where p.vendors_id=v.vendors_id and o.products_id=p.products_id and o.orders_id='" . $insert_id . "' and v.vendors_send_email=1 GROUP BY vendors_id");
while ($vendors_email_list= tep_db_fetch_array($vendors_email_query)) {
$order_number='" . $insert_id . "';
$the_email=$vendors_email_list['vendors_email'];
$the_name=$vendors_email_list['vendors_name'];
$the_contact=$vendors_email_list['vendors_contact'];
$email= $the_contact . ' <br>' . $the_name . '<br>' . $the_email . '<br>' .
$vendors_email_list['vendor_street'] .'<br>' .
$vendors_email_list['vendor_city'] .', ' .
$vendors_email_list['vendor_state'] .' ' .
$vendors_email_list['vendors_zipcode'] . ' ' . $vendors_email_list['vendor_country'] . '<br>' . "\n" . EMAIL_SEPARATOR . "\n" . 'Special Comments or Instructions: ' . $vendors_email_list['vendor_add_info'] .'' . "\n" . EMAIL_SEPARATOR . "\n" . 'From: ' . STORE_OWNER . "\n" . STORE_NAME_ADDRESS . "\n" . 'Accnt #: ' . $vendors_email_list['account_number'] . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" . EMAIL_SEPARATOR . "\n" . '<br>';

// Get all the products to be included in the email
$vendors_email_products_query = tep_db_query("select distinct o.orders_id, o.orders_products_id, v.vendors_id, p.vendors_prod_comments, o.products_name, p.vendors_prod_id, o.products_model, o.products_id, o.products_quantity, p.vendors_product_price, o.orders_products_id FROM " . TABLE_VENDORS . " v, " . TABLE_ORDERS_PRODUCTS . " o, " . TABLE_PRODUCTS . " p where p.vendors_id=v.vendors_id and v.vendors_id='" . $vendors_email_list['vendors_id'] . "' and o.products_id=p.products_id and o.orders_id='" . $insert_id . "' order by o.products_name");
$email = $email . '<table width="75%" border=1 cellspacing="0" cellpadding="3">
<tr><td>Qty:</td><td>Product Name:</td><td>Item Code/Number:</td><td>Product Model:</td><td>Per Unit Price:</td><td>Item Comments: </td></tr>';
while ($vendors_email_products= tep_db_fetch_array($vendors_email_products_query)) {
$product_attribs ='';
$vendors_email_products_attrib_query = tep_db_query("SELECT products_options, products_options_values FROM " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " WHERE 1 AND orders_products_id = '" . $vendors_email_products['orders_products_id'] . "'");
while ($vendors_email_products_attribs = tep_db_fetch_array($vendors_email_products_attrib_ query)) {
$product_attribs .= $vendors_email_products_attribs['products_options'] . ': ' . $vendors_email_products_attribs['products_options_values'] . '<br>';
}
$email = $email . '<tr><td>&nbsp;' . $vendors_email_products['products_quantity'] .
'</td><td>&nbsp;' . $vendors_email_products['products_name'] . '<br>' . $product_attribs .
'</td><td>&nbsp;' . $vendors_email_products['vendors_prod_id'] .
'</td><td>&nbsp;' . $vendors_email_products['products_model'] .
'</td><td>&nbsp;' . $vendors_email_products['vendors_product_price'] . '</td><td>' .
$vendors_email_products['vendors_prod_comments'] . '</td></tr>';
}
$email = $email . '</table><br>';
//send the email
tep_mail($the_name, $the_email, EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id , $email . '<br>', STORE_NAME, STORE_OWNER_EMAIL_ADDRESS) ;
}
//vendors_email end
// LINE ADDED: MOD - OSC-AFFILIATE
require(DIR_WS_INCLUDES . 'affiliate_checkout_process.php');
// START HTML Invoice
}
// END HTML Invoice
// load the after_process function from the payment modules
$payment_modules->after_process();
$cart->reset(true);

Last edited by automotiveuk; 12-27-2006 at 03:10 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
osCMax Intergration Requests automotiveuk osCMax v2 Customization/Mods 34 08-19-2008 05:42 PM
Template Intergration oscdoxlover osCMax v2 Customization/Mods 2 10-20-2006 02:07 PM
paypal intergration samsin1 osCMax v1.7 Installation 2 01-16-2005 06:13 PM
Can anyone help with CRE-Loaded6_v2? Need some mods/hacks Traceyd osCommerce 2.2 Modification Help 3 03-03-2004 03:14 PM


All times are GMT -8. The time now is 11:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax