flood6 Posted January 26, 2006 Share Posted January 26, 2006 Fist of all, big thanks to everyone involved in this contribution. I had a specific need for a client and this met that need and more! Thanks HallMarc for wrapping up all the recent changes in a nice package with specific file changes; I'm beyond the point of being able to install big contributions unless they include the specific file changes. Next, to anyone reading this, don't believe my post until someone can confirm it, lol; I've been looking at PHP so long today that it wouldn't surprise me if I'm just seeing things. The issue: I went straight from installing the rollup to the change you just added. In your post above your second change doesn't match what I have. From the instructions in the rollup: =================== Find Lines 64 & 65 =================== // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); ============= Replace With ============= //MVS start // load the selected shipping module if (SELECT_VENDOR_SHIPPING == 'true') { include(DIR_WS_CLASSES . 'vendor_shipping.php'); } else { include(DIR_WS_CLASSES . 'shipping.php'); } //MVS End But your change above suggests I should have this upon completion of the rollup: //MVS start // load the selected shipping module if (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'true')){ include(DIR_WS_CLASSES . 'vendor_shipping.php'); } else { if ($total_weight > 0 ){ include(DIR_WS_CLASSES . 'shipping.php'); } else { } } //MVS End And why the empty "else" at the end? Anyway, if someone could confirm the type-o or point me in the right direction as to where I went wrong, I'd appreciate it. Thanks again! Quote Link to comment Share on other sites More sharing options...
flood6 Posted January 26, 2006 Share Posted January 26, 2006 (edited) i'm the idiot who double-posted Edited January 26, 2006 by flood6 Quote Link to comment Share on other sites More sharing options...
Guest Posted January 26, 2006 Share Posted January 26, 2006 (edited) flood6 I'm sure you read that I made a request for someone to make new install directions for the roll up. I just didn't have time. In using the roll up it would be best to start with a fresh install of osCommerce and just copy all the files into the folders where they belong or if doing a install on a modded version of osCommerce then use a program like WinMerge to compare fthe files. Other than that I too find myself wondering why there is an empty else statement to nowhere. :blink: I remember heaing a little voice saying something about it and of course I just ignored it. Lastly, use this to replace the other lines //MVS start // load the selected shipping module if (SELECT_VENDOR_SHIPPING == 'true') { include(DIR_WS_CLASSES . 'vendor_shipping.php'); } else { include(DIR_WS_CLASSES . 'shipping.php'); } //MVS End with this //MVS start // load the selected shipping module if (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'true')){ include(DIR_WS_CLASSES . 'vendor_shipping.php'); } elseif (($total_weight > 0 ) || (SELECT_VENDOR_SHIPPING == 'false')){ include(DIR_WS_CLASSES . 'shipping.php'); } //MVS End Which is the correct way to write that. Thanks for catching it. Edited January 26, 2006 by HallMarc Quote Link to comment Share on other sites More sharing options...
trustco Posted January 29, 2006 Share Posted January 29, 2006 hallmarc, have you had any success with the USPS module then? my current file works perfect, except it will not save the shipping info to the db. i don't remember if that is the same as posted, but i believe it is Quote Link to comment Share on other sites More sharing options...
Guest Posted January 29, 2006 Share Posted January 29, 2006 (edited) Trustco I have learned that in test mode only specific info can be sent in the XML request and I have not been able to test it any further. Sorry. Please tell me what info you are expecting to be saved to the db. Some info is not written to the db until the order is completed. Edited January 29, 2006 by HallMarc Quote Link to comment Share on other sites More sharing options...
trustco Posted January 30, 2006 Share Posted January 30, 2006 hallmarc, i get absolutely NOTHING saved. no weights, no price, no vender info, nothing. when you continue thru checkout, it doesn't any shipping method nor any cost. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 1, 2006 Share Posted February 1, 2006 trustco use the pm and send me your checkout_process.php file I'll have a look. B) Quote Link to comment Share on other sites More sharing options...
♥cigarsforless Posted February 1, 2006 Share Posted February 1, 2006 Vendor Email in HTML format while rest of store is in Text format? Can this be done? I want to send Vendor Emails in HTML format while rest of store emails are sent in Text format. I see in the configuration table "Use MIME HTML when sending emails" but I want this to apply only to vendor emails, (the orders sent to them in text format have no line breaks as <br> is not recognized) I want to keep Customers email in plain text format as they are much clearer to read and links are activated. This could be solved by either of the following but am not clear on how to make the changes 1) send vendors email in HTML but rest in plain text 2) change the coding for the vendors emails to use \n instead of <br> (tried this but I guess it is in so many places I could not get it to work) 3)change coding in customer emails to include the <a href=" and "></a> tags to activate the links to order info in the order confirmation emails and order update emails. Any help and suggestions would be much appreciated. (ps: you can have a look at my live store at http://www.internetcigarsales.com/ ) Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2006 Share Posted February 3, 2006 (edited) Vendor Email in HTML format while rest of store is in Text format? Can this be done? I want to send Vendor Emails in HTML format while rest of store emails are sent in Text format. I see in the configuration table "Use MIME HTML when sending emails" but I want this to apply only to vendor emails, (the orders sent to them in text format have no line breaks as <br> is not recognized) I want to keep Customers email in plain text format as they are much clearer to read and links are activated. This could be solved by either of the following but am not clear on how to make the changes 1) send vendors email in HTML but rest in plain text 2) change the coding for the vendors emails to use \n instead of <br> (tried this but I guess it is in so many places I could not get it to work) 3)change coding in customer emails to include the <a href=" and "></a> tags to activate the links to order info in the order confirmation emails and order update emails. Any help and suggestions would be much appreciated. (ps: you can have a look at my live store at http://www.internetcigarsales.com/ ) Yikes! Long day. I forgot to type my response before clicking add reply! lol :blink: Anyway have tried the other settings like linefeed and setting it CR/LF? If you have and you still want to send them as plain text to the customers then let me know. Edited February 3, 2006 by HallMarc Quote Link to comment Share on other sites More sharing options...
♥cigarsforless Posted February 3, 2006 Share Posted February 3, 2006 Yikes! Long day. I forgot to type my response before clicking add reply! lol :blink: Anyway have tried the other settings like linefeed and setting it CR/LF? If you have and you still want to send them as plain text to the customers then let me know. changing setting to CR/LF does add some extra line breaks in Vendor emails but still ignores all <br> tags in the hard coded Vendor Emails that look perfect in HTML format but come out like Qty:Product Name:Item Code/Number:Product Model:Per Unit Price:Item Comments: when sent as text format guess what I'm really looking for is a separate config value for Vendor Emails sent as HTLM, but to be able to have store emails sent to customers as plain text. While I am ok at editing php code when following instructions, it does take me ages of trial and error to figure it out for myself. On a side note, I can not for the life of me figure out why the vendors upsxml.php file is not adding the handling fee to quotes. Does not matter if I enter the handling fee in the vendors info, the shipping module or both. nothing works. Could it have something to do with the code in the vendors.php has value of $handling_charge while in upsxml.php it is handling_fee? Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2006 Share Posted February 3, 2006 changing setting to CR/LF does add some extra line breaks in Vendor emails but still ignores all <br> tags in the hard coded Vendor Emails that look perfect in HTML format but come out like Qty:Product Name:Item Code/Number:Product Model:Per Unit Price:Item Comments: when sent as text format guess what I'm really looking for is a separate config value for Vendor Emails sent as HTLM, but to be able to have store emails sent to customers as plain text. If you don't mind hard coding it then do this: in catalog/includes/functions/general.php find function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { if (SEND_EMAILS != 'true') return false; // Instantiate a new mail object $message = new email(array('X-Mailer: osCommerce Mailer')); // Build the text version $text = strip_tags($email_text); if (EMAIL_USE_HTML == 'true') { $message->add_html($email_text, $text); } else { $message->add_text($text); } // Send message $message->build_message(); $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); } and right below all of that add this function tep_mail_customer($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { if (SEND_EMAILS != 'true') return false; // Instantiate a new mail object $message = new email(array('X-Mailer: osCommerce Mailer')); // Build the text version $text = strip_tags($email_text); $message->add_text($text); // Send message $message->build_message(); $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); } Next, open catalog/checkout_process.php and find (down near the bottom) tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); and change it to tep_mail_customer($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); All I did there was add _customer after tep_mail If you want to check on the class definition of email then open catalog/includes/classes/email.php As for the code I just pasted up there I tested it and it works. On a side note, I can not for the life of me figure out why the vendors upsxml.php file is not adding the handling fee to quotes. Does not matter if I enter the handling fee in the vendors info, the shipping module or both. nothing works. Could it have something to do with the code in the vendors.php has value of $handling_charge while in upsxml.php it is handling_fee? As for this issue, I searched my code through and through and cannot find any reference to $handling_fee Quote Link to comment Share on other sites More sharing options...
Guest Posted February 3, 2006 Share Posted February 3, 2006 Must be a timer on the edit function. GGRRRRRRRRRR! I went back and search for it with the $ and..... As for this issue, I searched and found 6 references to handling_fee. Now first I would try the new improved version of UPSXML that JanZ recently posted. NOTE: This is for the standard osCommerce. You will have to modify it for MVS. I plan on just identifying what she changed and including those changes in my MVS version. I'm tired at this point and may have missed it if someone has already posted it. I heard people posting a bug in the previous version of UPS XML that would cause products to disappear from the catalog. :blink: Other than that, if that doesn't fix your issue then I would change all references to handling_fee to handling_charge. I found two in catalog/includes/modules/shipping/upsxml.php lines 52 $this->handling_fee = MODULE_SHIPPING_UPSXML_RATES_HANDLING; and 261 $methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->handling_fee + $cost)); I found three references of it in catalog/includes/modules/vendors_shipping/upsxml.php on lines 208, 209, 210 function handling_fee($vendors_id='1') { $this->handling_fee = constant('MODULE_SHIPPING_UPSXML_RATES_HANDLING_' . $vendors_id); return $this->handling_fee; } and one more at line 373 $methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->handling_fee + $cost)); I hope this helps Quote Link to comment Share on other sites More sharing options...
♥cigarsforless Posted February 4, 2006 Share Posted February 4, 2006 If you don't mind hard coding it then do this: in catalog/includes/functions/general.php find function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { if (SEND_EMAILS != 'true') return false; // Instantiate a new mail object $message = new email(array('X-Mailer: osCommerce Mailer')); // Build the text version $text = strip_tags($email_text); if (EMAIL_USE_HTML == 'true') { $message->add_html($email_text, $text); } else { $message->add_text($text); } // Send message $message->build_message(); $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); } and right below all of that add this function tep_mail_customer($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { if (SEND_EMAILS != 'true') return false; // Instantiate a new mail object $message = new email(array('X-Mailer: osCommerce Mailer')); // Build the text version $text = strip_tags($email_text); $message->add_text($text); // Send message $message->build_message(); $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); } Next, open catalog/checkout_process.php and find (down near the bottom) tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); and change it to tep_mail_customer($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); All I did there was add _customer after tep_mail If you want to check on the class definition of email then open catalog/includes/classes/email.php As for the code I just pasted up there I tested it and it works. As for this issue, I searched my code through and through and cannot find any reference to $handling_fee Brilliant! that solved the text / html problem I had perfectly! Now all i have to do is figure out the upsxml handling issue.... Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 4, 2006 Share Posted February 4, 2006 As for this issue, I searched and found 6 references to handling_fee. Now first I would try the new improved version of UPSXML that JanZ recently posted. NOTE: This is for the standard osCommerce. You will have to modify it for MVS. I plan on just identifying what she changed and including those changes in my MVS version. I'm tired at this point and may have missed it if someone has already posted it. I heard people posting a bug in the previous version of UPS XML that would cause products to disappear from the catalog. :blink: Hey Marc- Have you gotten the latest version of UPSXML to work with MVS? Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
blucollarguy Posted February 4, 2006 Author Share Posted February 4, 2006 Brilliant! that solved the text / html problem I had perfectly!Now all i have to do is figure out the upsxml handling issue.... First, I want to thank Marc for doing the roll-up, big help Marc, my time has been so stretched it isn't even funny anymore. :thumbsup: The handling fees are not being handled properly in the UPSXML module at all. For some reason, some of the functions that are supposed to pull information from the db as "constants" don't always work. Not sure why, but we have had this problem with a few others as well, some work, some don't. Been scratching my head on this one for quite a while. So, we need to make a change in the way the file calls for the data regarding the handling fees: in upsxml.php, find the "quote" function, it should look like this: // class methods function quote($method = '', $module = '', $vendors_id = '1') { global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes, $total_weight, $boxcount, $cart; // UPS purports that if the origin is left out, it defaults to the account's location. Yeah, right. $state = $order->delivery['state']; $zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_name = '" . $order->delivery['state'] . "'"); if (tep_db_num_rows($zone_query)) { $zone = tep_db_fetch_array($zone_query); $state = $zone['zone_code']; } $this->_upsOrigin(constant('MODULE_SHIPPING_UPSXML_RATES_CITY_' . $vendors_id), constant('MODULE_SHIPPING_UPSXML_RATES_STATEPROV_' . $vendors_id), constant('MODULE_SHIPPING_UPSXML_RATES_COUNTRY_' . $vendors_id), constant('MODULE_SHIPPING_UPSXML_RATES_POSTALCODE_' . $vendors_id)); $this->_upsDest($order->delivery['city'], $state, $order->delivery['country']['iso_code_2'], $order->delivery['postcode']); $productsArray = $cart->get_products(); if (DIMENSIONS_SUPPORTED) { // sort $productsArray according to ready-to-ship (first) and not-ready-to-ship (last) usort($productsArray, ready_to_shipCmp); // Use packing algoritm to return the number of boxes we'll ship $boxesToShip = $this->packProducts($productsArray); // Quote for the number of boxes for ($i = 0; $i < count($boxesToShip); $i++) { $this->_addItem($boxesToShip[$i]['length'], $boxesToShip[$i]['width'], $boxesToShip[$i]['height'], $boxesToShip[$i]['current_weight']); $totalWeight += $boxesToShip[$i]['current_weight']; } } else { // The old method. Let osCommerce tell us how many boxes, plus the weight of each (or total? - might be sw/num boxes) $this->items_qty = 0; //reset quantities for ($i = 0; $i < $shipping_num_boxes; $i++) { $this->_addItem (0, 0, 0, $shipping_weight); } } // BOF Time In Transit: comment out this section if you don't want/need to have // expected delivery dates $this->servicesTimeintransit = $this->_upsGetTimeServices($vendors_id); if ($this->logfile) { error_log("------------------------------------------\n", 3, $this->logfile); error_log("Time in Transit: " . $this->timeintransit . "\n", 3, $this->logfile); } // EOF Time In Transit $upsQuote = $this->_upsGetQuote($vendors_id); if ((is_array($upsQuote)) && (sizeof($upsQuote) > 0)) { if (DIMENSIONS_SUPPORTED) { $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)' ); } else { $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . $shipping_weight . ' ' . strtolower($this->unit_weight) . ' total)' ); } $methods = array(); for ($i=0; $i < sizeof($upsQuote); $i++) { list($type, $cost) = each($upsQuote[$i]); // BOF limit choices if (!exclude_choices($type, $vendors_id)) continue; // EOF limit choices if ( $method == '' || $method == $type ) { $_type = $type; if (isset($this->servicesTimeintransit[$type])) { $_type = $_type . ", ".$this->servicesTimeintransit[$type]["date"]; } // instead of just adding the expected delivery date as ", yyyy-mm-dd" // you might like to change this to your own liking for example by commenting the // three lines above this and uncommenting/changing the next: // START doing things differently /* if (isset($this->servicesTimeintransit[$type])) { $eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]); $months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $eta_arrival_date = $months[(int)$eta_array[1]]." ".$eta_array[2].", ".$eta_array[0]; $_type .= ", <acronym title='Estimated Delivery Date'>EDD</acronym>: ".$eta_arrival_date; } END of doing things differently: */ $methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->handling_fee + $cost)); } } if ($this->tax_class($vendors_id) > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']); } $this->quotes['methods'] = $methods; } else { if ( $upsQuote != false ) { $errmsg = $upsQuote; } else { $errmsg = MODULE_SHIPPING_UPSXML_RATES_TEXT_UNKNOWN_ERROR; } $errmsg .= '<br>' . MODULE_SHIPPING_UPSXML_RATES_TEXT_IF_YOU_PREFER . ' ' . STORE_NAME.' via <a href="mailto:'.STORE_OWNER_EMAIL_ADDRESS.'"><u>Email</U></a>.'; $this->quotes = array('module' => $this->title, 'error' => $errmsg); } if (tep_not_null($this->icon)) { $this->quotes['icon'] = tep_image($this->icon, $this->title); } return $this->quotes; } I made some changes to it to pull the "handling_fee" from the module iteself and the handling charges from the Vendor edit page, it now looks like this: // class methods function quote($method = '', $module = '', $vendors_id = '1') { global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes, $total_weight, $boxcount, $cart; // UPS purports that if the origin is left out, it defaults to the account's location. Yeah, right. $state = $order->delivery['state']; $zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_name = '" . $order->delivery['state'] . "'"); if (tep_db_num_rows($zone_query)) { $zone = tep_db_fetch_array($zone_query); $state = $zone['zone_code']; } $this->_upsOrigin(@constant('MODULE_SHIPPING_UPSXML_RATES_CITY_' . $vendors_id), @constant('MODULE_SHIPPING_UPSXML_RATES_STATEPROV_' . $vendors_id), @constant('MODULE_SHIPPING_UPSXML_RATES_COUNTRY_' . $vendors_id), @constant('MODULE_SHIPPING_UPSXML_RATES_POSTALCODE_' . $vendors_id)); $this->_upsDest($order->delivery['city'], $state, $order->delivery['country']['iso_code_2'], $order->delivery['postcode']); $productsArray = $cart->get_products(); if (DIMENSIONS_SUPPORTED) { // sort $productsArray according to ready-to-ship (first) and not-ready-to-ship (last) usort($productsArray, ready_to_shipCmp); // Use packing algoritm to return the number of boxes we'll ship $boxesToShip = $this->packProducts($productsArray); // Quote for the number of boxes for ($i = 0; $i < count($boxesToShip); $i++) { $this->_addItem($boxesToShip[$i]['length'], $boxesToShip[$i]['width'], $boxesToShip[$i]['height'], $boxesToShip[$i]['current_weight']); $totalWeight += $boxesToShip[$i]['current_weight']; } } else { // The old method. Let osCommerce tell us how many boxes, plus the weight of each (or total? - might be sw/num boxes) $this->items_qty = 0; //reset quantities for ($i = 0; $i < $shipping_num_boxes; $i++) { $this->_addItem (0, 0, 0, $shipping_weight); } } // BOF Time In Transit: comment out this section if you don't want/need to have // expected delivery dates $this->servicesTimeintransit = $this->_upsGetTimeServices($vendors_id); if ($this->logfile) { error_log("------------------------------------------\n", 3, $this->logfile); error_log("Time in Transit: " . $this->timeintransit . "\n", 3, $this->logfile); } // EOF Time In Transit $upsQuote = $this->_upsGetQuote($vendors_id); if ((is_array($upsQuote)) && (sizeof($upsQuote) > 0)) { if (DIMENSIONS_SUPPORTED) { $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)' ); } else { $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . $shipping_weight . ' ' . strtolower($this->unit_weight) . ' total)' ); } $methods = array(); for ($i=0; $i < sizeof($upsQuote); $i++) { list($type, $cost) = each($upsQuote[$i]); // BOF limit choices if (!exclude_choices($type, $vendors_id)) continue; // EOF limit choices if ( $method == '' || $method == $type ) { $_type = $type; if (isset($this->servicesTimeintransit[$type])) { $_type = $_type . ", ".$this->servicesTimeintransit[$type]["date"]; } // instead of just adding the expected delivery date as ", yyyy-mm-dd" // you might like to change this to your own liking for example by commenting the // three lines above this and uncommenting/changing the next: // START doing things differently /* if (isset($this->servicesTimeintransit[$type])) { $eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]); $months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $eta_arrival_date = $months[(int)$eta_array[1]]." ".$eta_array[2].", ".$eta_array[0]; $_type .= ", <acronym title='Estimated Delivery Date'>EDD</acronym>: ".$eta_arrival_date; } END of doing things differently: */ //MVS Start $vendors_data_query = tep_db_query("select handling_charge, handling_per_box, vendor_country, vendors_zipcode from " . TABLE_VENDORS . " where vendors_id = '" . (int)$vendors_id . "'" ); $vendors_data = tep_db_fetch_array($vendors_data_query); $country_name = tep_get_countries($vendors_data['vendor_country'], true); //MVS Start $handling_charge = $vendors_data['handling_charge']; $handling_per_box = $vendors_data['handling_per_box']; if ($handling_charge > $handling_per_box*$shipping_num_boxes) { $handling = $handling_charge; } else { $handling = $handling_per_box*$shipping_num_boxes; } //MVS End $handling_fee = constant('MODULE_SHIPPING_UPSXML_RATES_HANDLING_' . $vendors_id); $methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($handling_fee + $cost + $handling)); } } if ($this->tax_class($vendors_id) > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']); } $this->quotes['methods'] = $methods; } else { if ( $upsQuote != false ) { $errmsg = $upsQuote; } else { $errmsg = MODULE_SHIPPING_UPSXML_RATES_TEXT_UNKNOWN_ERROR; } $errmsg .= '<br>' . MODULE_SHIPPING_UPSXML_RATES_TEXT_IF_YOU_PREFER . ' ' . STORE_NAME.' via <a href="mailto:'.STORE_OWNER_EMAIL_ADDRESS.'"><u>Email</U></a>.'; $this->quotes = array('module' => $this->title, 'error' => $errmsg); } if (tep_not_null($this->icon)) { $this->quotes['icon'] = tep_image($this->icon, $this->title); } // echo '<br> the handling fee from UPS module: ' . $handling_fee; return $this->quotes; } Notice what was added, the query to get the handling charges from the vendor, and a new call to get the "handling_fee" from the module itself. Now you can use either one(or both) to add any charges you wish. I did not see any errors when testing this myself, but backup first to be safe. I am also sorry my involvement has been so spotty lately, just been swamped with work, got to make a living first. The amount of support everyone else has given is remarkable, and this re-enforces why I am involved in open source work, it is VERY rewarding! Craig :) Quote Happy Coding! Craig Garrison Sr Anything worth having, is worth working for. Multi Vendor Shipping V1.1 Demo Catalog 3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout. Multi Vendor Shipping V1.1 Demo Admin login: [email protected] pass: mvs_demo MVS Thread: Multi-Vendor Shipping My contribs: Download Multi Vendor Shipping V1.1 Vendor Email Vendor Info in easypopulate EZ Price Updater And more to come! Link to comment Share on other sites More sharing options...
♥cigarsforless Posted February 4, 2006 Share Posted February 4, 2006 First, I want to thank Marc for doing the roll-up, big help Marc, my time has been so stretched it isn't even funny anymore. :thumbsup: The handling fees are not being handled properly in the UPSXML module at all. For some reason, some of the functions that are supposed to pull information from the db as "constants" don't always work. Not sure why, but we have had this problem with a few others as well, some work, some don't. Been scratching my head on this one for quite a while. So, we need to make a change in the way the file calls for the data regarding the handling fees: Notice what was added, the query to get the handling charges from the vendor, and a new call to get the "handling_fee" from the module itself. Now you can use either one(or both) to add any charges you wish. I did not see any errors when testing this myself, but backup first to be safe. I am also sorry my involvement has been so spotty lately, just been swamped with work, got to make a living first. The amount of support everyone else has given is remarkable, and this re-enforces why I am involved in open source work, it is VERY rewarding! Craig :) WOO HOO! That did the trick!!! Thanks a million for your help on this Craig! Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
♥cigarsforless Posted February 4, 2006 Share Posted February 4, 2006 Any chance of getting usps.php and upsxml.php to add insurance to the quoted rates? Ideally I also like to add the fee for Signature Confirmation to any order over $200.00 as well have looked around other posts/contributions on this issue, but not 100% on how to make the changes needed specific to MVS as always, great contibution and any help on these issues would be greatly appreciated. PS: smoke cigars? check out my live store at http://www.internetcigarsales.com It's a VERY heavily modded osCommerce shop (with more mods yet to add!) Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
Guest Posted February 6, 2006 Share Posted February 6, 2006 OK I have some news for yas. I have added Craigs latest code plus some new code by JanZ for the standard UPSXML. I just tweaked it to work with MVS. This will provide a better packing algorythym, insurance option, changed dimensions support from super global to a per vendor option and fixes a bug in which items were being deleted from the db. I will send this to Craig to look over first and then post to the contributions section. I didn't write it, I just helped update it with the latest goodies and fixes. Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 10, 2006 Share Posted February 10, 2006 I've been fiddling with the UPS XML module forever now, trying to get it to display an EDD. I can't get it to display anything besides the service type. Right now the display looks like this : UPS Ground Next Day Air I know that it can look like this, or very similar at least (I've seen it before!): UPS Ground (EDD: 2/15/06) Next Day Air (EDD: 2/14/06) The code for transit time display is all there and it all looks beautiful to my eyes. Is there some weird dance I have to do to get this to work? Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2006 Share Posted February 13, 2006 Is this contrib ready for use in a production environment? Quote Link to comment Share on other sites More sharing options...
♥cigarsforless Posted February 13, 2006 Share Posted February 13, 2006 OK I have some news for yas. I have added Craigs latest code plus some new code by JanZ for the standard UPSXML. I just tweaked it to work with MVS. This will provide a better packing algorythym, insurance option, changed dimensions support from super global to a per vendor option and fixes a bug in which items were being deleted from the db. I will send this to Craig to look over first and then post to the contributions section. I didn't write it, I just helped update it with the latest goodies and fixes. Any idea when it will be posted in the contributions section? Would love to get my hands on it ASAP for the insurance option. Quote Jim Bullen - President The Cigar Hut Group of Companies Installed add-ons: (that now need to be upgraded to OSC CE Phoenix) PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more! Link to comment Share on other sites More sharing options...
Guest Posted February 13, 2006 Share Posted February 13, 2006 I haven't heard from either of them so I will wait one more week (February 21) and then I will upload it. I haven't fully tested it so, as they say, BACKUP, BACKUP, BACKUP and Kid's, don't try this at home! Use only with adult supervision. Do not use near fire or flame. No one under age 18 admitted without parent or guardian. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted February 14, 2006 Share Posted February 14, 2006 Is this contrib ready for use in a production environment? Yes. No. Maybe. Seriously, it depends on the user. This contribution is currently being used in a number of live stores. However, it is very complex to install. I recommend that anyone attempting this should be comfortable with making changes to osCommerce or should start with an unmodified store. If you don't feel comfortable with installing a very complex set of modifications, I would recommend that you get somebody else to do it for you. There may also still be some bugs in the code. There are enough people using it to have tested most of the code, but I suspect there are still some areas that have not been thoroughly tested. There are no guarantees. Back up absolutely everything before you start. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
djmonkey1 Posted February 14, 2006 Share Posted February 14, 2006 I haven't heard from either of them so I will wait one more week (February 21) and then I will upload it. I haven't fully tested it so, as they say, BACKUP, BACKUP, BACKUP and Kid's, don't try this at home! Use only with adult supervision. Do not use near fire or flame. No one under age 18 admitted without parent or guardian. Release it. I dare you. We can handle it. :) Quote Do, or do not. There is no try. Order Editor 5.0.6 "Ultra Violet" is now available! For support or to post comments, suggestions, etc, please visit the Order Editor support thread. Link to comment Share on other sites More sharing options...
ValleyRoaster Posted February 15, 2006 Share Posted February 15, 2006 My wife and business partner, she does the ordering and order updating, I do the web site maintenance and roast the coffee. Anyway, we have a couple of vendors who want the customers phone number, for shipping reasons. Has anyone looked into adding this to the email sent to the vendor? I did a quick search and didn't find anything. BTW: We have had the MVS running live for about 2 months and have had very few problems. A few minor Contrib bugs with combining Easypopulate and MVS, but minor ones. We are extremely Happy! I honestly believe it is ready for release, with a note, that it is an advanced contrib. Quote Life Is Too Short, Enjoy Your Coffee! Pete Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.