Maggilove Posted May 26, 2006 Share Posted May 26, 2006 Check that you have "vendor_order_info.php" on the server and that it is intact, and then check the mods in admin/includes/classes/order.php and admin/orders.php. These files are the ones involved in displaying all the MVS order data. One or more of them must be either corrupt or perhaps an accidental reversion to the original osC version. This will be where your issue is. Craig :) Thanks, Craig... but that was the second thing I checked. Even tried overwriting them with fresh copies from the working site, even though I had checked and the existing ones were uncorrupted. No joy. The information is in the database... the code that calls and displays the information is intact... but the information is not displayed. I am baffled, which is why I turned to you guys for help. Quote Link to comment Share on other sites More sharing options...
Bozmium Posted May 26, 2006 Share Posted May 26, 2006 Hi guys, Whoa - been some serious work going on here! See the new V1.1 is up - looks like i have some serious comparing to do as i am still running the beta versions (hacked to bits of course) - and yes still having shipping tax issues so might just find the problem in the new files. Just a quick one - has anyone got this working with the Ship In Cart (aka Shipping Estimator) v2.20 by Acheron? (Or any of its derivitives)? Used to have this working mighty fine with the standard shipping but of course now shes died as she knows not where to look for the info - have started to have a play amongst the code but would love to hear anything from someone who actually knows what they are doing. :blush: Keep up the good work guys - this is going to be the single biggest addition to OScomm in my opinion. :thumbsup: Cheers! Quote And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit: "The administrator has enabled flood control - please try again in 30 seconds." Never fails. Every time. Link to comment Share on other sites More sharing options...
Bozmium Posted May 26, 2006 Share Posted May 26, 2006 Hi guys, Whoa - been some serious work going on here! See the new V1.1 is up - looks like i have some serious comparing to do as i am still running the beta versions (hacked to bits of course) - and yes still having shipping tax issues so might just find the problem in the new files. Just a quick one - has anyone got this working with the Ship In Cart (aka Shipping Estimator) v2.20 by Acheron? (Or any of its derivitives)? Used to have this working mighty fine with the standard shipping but of course now shes died as she knows not where to look for the info - have started to have a play amongst the code but would love to hear anything from someone who actually knows what they are doing. :blush: Keep up the good work guys - this is going to be the single biggest addition to OScomm in my opinion. :thumbsup: Cheers! Quote And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit: "The administrator has enabled flood control - please try again in 30 seconds." Never fails. Every time. Link to comment Share on other sites More sharing options...
Bozmium Posted May 28, 2006 Share Posted May 28, 2006 Hi guys, Whoa - been some serious work going on here! See the new V1.1 is up - looks like i have some serious comparing to do as i am still running the beta versions (hacked to bits of course) - and yes still having shipping tax issues so might just find the problem in the new files. Just a quick one - has anyone got this working with the Ship In Cart (aka Shipping Estimator) v2.20 by Acheron? (Or any of its derivitives)? Used to have this working mighty fine with the standard shipping but of course now shes died as she knows not where to look for the info - have started to have a play amongst the code but would love to hear anything from someone who actually knows what they are doing. :blush: Keep up the good work guys - this is going to be the single biggest addition to OScomm in my opinion. :thumbsup: Cheers! OOps sorry for the double post there guys. Just for anyone else who has experienced tax issues - somehow/somewhere my tax zone id in my SQL database has been changed and not been repointed - i went into SQL and changed the tax zone id to match my Australia country code - and voila all my prices are now showing correctly - but still not on shipping taxes - im guessing thats a similar issue with the zones to geozeones or a tax rate id somewhere and will poke around in the database till i find it, but expect that once i do all my shipping will revert to normal and i can take out all my temporary hacks . :D Just for anyone else having tax issues with or without MVS. Cheers & thanks! Quote And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit: "The administrator has enabled flood control - please try again in 30 seconds." Never fails. Every time. Link to comment Share on other sites More sharing options...
Bozmium Posted May 28, 2006 Share Posted May 28, 2006 How to fix this Part Deux for dkalaszIn catalog/admin/vendors.php remove or comment out these lines: line 51 $num_tables = tep_db_prepare_input($HTTP_POST_VARS['num_tables']); // for mzmt shipping line 77 'num_tables' => $num_tables, // for mzmt shipping line 144 $num_tables = tep_db_prepare_input($HTTP_POST_VARS['num_tables']); // for mzmt shipping In line 156 replace $vendors_query = tep_db_query("select vendors_id, vendors_name, vendors_email, vendors_contact, vendors_phone1, vendors_email, vendors_send_email, vendors_status_send, vendor_street, vendor_city, vendor_state, vendors_zipcode, vendor_country, vendor_country, account_number, vendors_url, vendor_add_info, handling_charge, handling_per_box, tare_weight, percent_tare_weight, max_box_weight, num_tables, zones from " . TABLE_VENDORS . " where vendors_id = '" . (int)$HTTP_GET_VARS['vendors_id'] . "'"); with $vendors_query = tep_db_query("select vendors_id, vendors_name, vendors_email, vendors_contact, vendors_phone1, vendors_email, vendors_send_email, vendors_status_send, vendor_street, vendor_city, vendor_state, vendors_zipcode, vendor_country, vendor_country, account_number, vendors_url, vendor_add_info, handling_charge, handling_per_box, tare_weight, percent_tare_weight, max_box_weight, zones from " . TABLE_VENDORS . " where vendors_id = '" . (int)$HTTP_GET_VARS['vendors_id'] . "'"); and lastly, starting at or around 430 (probably line 426 if you are doing this step by step) remove or comment out this whole section <?php // for mzmt shipping ?> <tr> <td class="main"><?php echo TEXT_TABLES; ?></td> <td class="main"> <?php echo tep_draw_input_field('num_tables', $vInfo->num_tables, 'maxlength="32"'); ?> </td> </tr> <?php // end for mzmt shipping ?> and that's it! Ok a quicky for those familiar with the MZMT addon for MVS - i need to instigate a second instance of MZMT for a second vendor. Whats the easiest way to duplicate the MZMT.php file to create a second instance? The reason for this is i need another set of zones and tables for another courier and i have already customised the one existing MZMT language file in its current setup - so i basically need to be able to activate a seperate MZMT for another vendor. Anyone know the tweaks? Have tried by creating MZMT2_ in place of MZMT in all the calls and tables & renaming the file MZMT2.php but it sees it as an installed instance of the original - so i have missed something somewhere that im not seeing! Cheers & thanks! :) Quote And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit: "The administrator has enabled flood control - please try again in 30 seconds." Never fails. Every time. Link to comment Share on other sites More sharing options...
demon2lima Posted May 28, 2006 Share Posted May 28, 2006 I've been searching for a solution to my problem but I'm still stuck. I have MVS set up and it appears to be working except for the vendor e-mail portion. The only orders that are logged are Money order transactions and not PayPal. No vendor e-mails are generated so I can't even send them manualy. Any suggestions? Quote Link to comment Share on other sites More sharing options...
gotham Posted May 28, 2006 Share Posted May 28, 2006 The following error only seems to happen on one browser that I have found: Mac Firefox 1.5.0.3: Problem I've tested and found No Problem on: Mac Safari 2.0.3: No Problem Mac Internet Explorer 5.2: No Problem Win Firefox 1.0.4: No Problem Win Internet Explorer 6.0.2900...: No Problem So right now it just seems to be a Mac and Firefox issue. Problem: Normally a shipping method is automatically selected initially but not on some browsers where no shipping method is automatically selected. When that occurs then it is possible for a customer to press continue without selecting any method. If this is done then that customer gets a message "ERROR_NO_SHIPPING_SELECTED_SELECTED" that displays on a red background at the top of the page just below the "Top ? Catalog ? Checkout ? Shipping Method" grey band. Should this be a real message? Have I missed some code that defines ERROR_NO_SHIPPING_SELECTED_SELECTED as a text message that appears if the browser fails to preselect a method and the customer continues? It doesn't let you go on to Payment Information which prevents the cart from accepting a sale without a shipping method effectively, which is important, but this error is not quite customer friendly enough for some -- I suspect (although I've never gotten a complaint about it). The only place I have ERROR_NO_SHIPPING_SELECTED_SELECTED located in the code on line 19 of checkout_payment.php. Am I missing something? Is it just my code? I've got mvs 1.1 and most of the recent fixes including the Radio Button Selected issue fix on posts 2188 and 2191 (it seems to work well!). And some fixes I implemented to bring the code in line with all of the changes introduced with the osc ms 2.2 051113 release that seemed to be overlooked in the mvs 1.1 (but I'm no expert). Otherwise it is almost unchanged. You can check it out on my test site oscsecure.com (if you can find a browser that has this problem and the problem is not also happening on your installation too). You can duplicate the error by putting any item in the cart and not selecting a shipping method on the Delivery Information page (on a problematic browser only). This error does not happen on any earlier versions of mvs that I have installed (and are heavily modified) so it is either a new bug or a new bug in my new mvs 1.1 installation. I'm willing to try other peoples mvs 1.1 installations with the Mac/Firefox combo if you send me a link to your store. I could also create a screenshot if it would help anyone understand the problem. I know most of you probably don't use a Mac for programming like me but I hope that someone can help me get the code working on more browsers as not everyone uses the same operating system and browser combo. I'm trying to test as many aspects of mvs on as many browser/operating system combos as I can (so far everything else works well). Thanks, Kendall p.s. mvs is a great contribution! Quote Kendall Brooklyn, New York USA Link to comment Share on other sites More sharing options...
♥kymation Posted May 28, 2006 Share Posted May 28, 2006 The following error only seems to happen on one browser that I have found:Mac Firefox 1.5.0.3: Problem <snip> "That's not a bug, it's a feature." Well, sorta. The problem happens when no shipping method is selected for one or more vendors. If this is happening when the shipping page is first displayed, that indicates a Java error. Does your browser have the Java console? (Tools > JavaScript Console on the PC version of Firefox.) If it does, could you try checking in the console for errors on that page? Every other browser seems to handle the JavaScript on the shipping page without a problem, so it may just be the Mac version has a bug. If it truly is an error in the script then we need to fix it. As to the error message, that is somewhat intentional. It should be displaying the text value instead of the constant, which is what you are seeing. We probably should come up with a better way of doing this anyway. The idea is to get the customer to complete the page, not to scare them off. I'll see if I can come up with something. 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...
blucollarguy Posted May 29, 2006 Author Share Posted May 29, 2006 "That's not a bug, it's a feature." Well, sorta. The problem happens when no shipping method is selected for one or more vendors. If this is happening when the shipping page is first displayed, that indicates a Java error. Does your browser have the Java console? (Tools > JavaScript Console on the PC version of Firefox.) If it does, could you try checking in the console for errors on that page? Every other browser seems to handle the JavaScript on the shipping page without a problem, so it may just be the Mac version has a bug. If it truly is an error in the script then we need to fix it. As to the error message, that is somewhat intentional. It should be displaying the text value instead of the constant, which is what you are seeing. We probably should come up with a better way of doing this anyway. The idea is to get the customer to complete the page, not to scare them off. I'll see if I can come up with something. Regards Jim Here is the code that displays that message, some like it nice and bold, others will want it a little "nicer", easy enough. // MVS start if a shipping method has not been selected for all vendors, redirect the customer to the shipping method selection page if ( (SELECT_VENDOR_SHIPPING == 'true') && (($cart->content_type != 'virtual') || ($total_weight > 0 )) ){ // This test only works under MVS, but is skipped for virtual and/or zero weight if (!is_array ($shipping['vendor']) || count($shipping['vendor']) != count($cart->vendor_shipping)) { // No shipping selected or not all selected tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . ERROR_NO_SHIPPING_SELECTED_SELECTED, 'SSL')); } } // MVS end Rather than sending it back as an "error_message", one could send back in the "message_stack" which would be a "nicer" message. We could even write our own "error" class for this purpose as well. Not all that difficult, it just depends on the individual, some people have posted that they really like it as is, some don't, we need common ground, probably need to build in some options related to this. The define should be in the language file. 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...
keress Posted May 29, 2006 Share Posted May 29, 2006 I need to install a contribution that will allow my client to specify that certain of his products are to be sent flat rate, for other products they can choose between fedex and UPSP. Is this the best contribution to accomplish this? I see that you all have been working on this for an impressive length of time. Is it ready for "public consumption" by non-programmers like myself? Quote Link to comment Share on other sites More sharing options...
blucollarguy Posted May 29, 2006 Author Share Posted May 29, 2006 I need to install a contribution that will allow my client to specify that certain of his products are to be sent flat rate, for other products they can choose between fedex and UPSP. Is this the best contribution to accomplish this? I see that you all have been working on this for an impressive length of time. Is it ready for "public consumption" by non-programmers like myself? This is the only contribution that will do what you need. And it is usable by most anybody, but can be difficult to install because of so much code work. The checkout process is basically being re-written by MVS, so there is a lot to it. Just take your time, and be sure to back EVERY file before you start. I suggest using file differencing tool while installing as well, makes things easier in my opinion. I use WinMerge myself, but there are many available. Good luck, 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...
Bozmium Posted June 2, 2006 Share Posted June 2, 2006 Ok a quicky for those familiar with the MZMT addon for MVS - i need to instigate a second instance of MZMT for a second vendor. Whats the easiest way to duplicate the MZMT.php file to create a second instance? The reason for this is i need another set of zones and tables for another courier and i have already customised the one existing MZMT language file in its current setup - so i basically need to be able to activate a seperate MZMT for another vendor. Anyone know the tweaks? Have tried by creating MZMT2_ in place of MZMT in all the calls and tables & renaming the file MZMT2.php but it sees it as an installed instance of the original - so i have missed something somewhere that im not seeing! Cheers & thanks! :) No one done this before - hmmmmmm. The alternative is to create a heap of standard table rates (now those i do know how to duplicate no probs!) This would mean having about 14 seperate tables installed - 2 zones in each of 7 states - no big issue to do but would that entail any performance issues i should be aware of? My thinking was if i could make an instance of MZMT for each Vendor then it would be a way around this but seems not possible. Any tips from those in the know? :huh: Cheers! Quote And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit: "The administrator has enabled flood control - please try again in 30 seconds." Never fails. Every time. Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2006 Share Posted June 2, 2006 (edited) Hi, I am lurking MSV for a while. Craig provided me access and it really help me to decide. Thanks Craig :thumbsup: I still one issue before installing MSV. One of my vendor has multi-store for local pick-up. How can my customer select the proper strore (from a list) to pick-up? is it possible to add under, pick at the store option, a list of all brick-and-mortar with address to pick-up? if Yes, is it possible to send fax directly the the selected brick-and-mortar shop? Example: Brick-and-mortar shops vendor sell the same product "A" in 10 different location, different Province in Canada. The way I see it, the customer will buy product A and later decided which store to pick-up product "A". How can I do it with MSV? Thanks for contribution, Luc Edited June 2, 2006 by aad665 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 2, 2006 Share Posted June 2, 2006 (edited) Hi, I am lurking MSV for a while. Craig provided me access and it really help me to decide. Thanks Craig :thumbsup: I still one issue before installing MSV. One of my vendor has multi-store for local pick-up. How can my customer select the proper strore (from a list) to pick-up? is it possible to add under, pick at the store option, a list of all brick-and-mortar with address to pick-up? if Yes, is it possible to send fax directly the the selected brick-and-mortar shop? Example: Brick-and-mortar shops vendor sell the same product "A" in 10 different location, different Province in Canada. The way I see it, the customer will buy product A and later decided which store to pick-up product "A". How can I do it with MSV? Like: Store Pick at Vendor ABC inc. Select Store: Select 1.Store A, 123 street, Quebec, Quebec X 2. Store B: 4567 bld X, Toronto, Ontario X 3. Store C: 865 street, Vancouver, BC X Thanks for contribution, Luc Edited June 2, 2006 by aad665 Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 3, 2006 Share Posted June 3, 2006 Order Editor for MVS! I have released an Order Editor for MVS: http://www.oscommerce.com/community/contributions,4285 This contribution has its own support thread: http://www.oscommerce.com/forums/index.php?showtopic=212433 Please hurl insults at me there; Jim and Craig probably have enough to deal with already. 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...
Bozmium Posted June 4, 2006 Share Posted June 4, 2006 No one done this before - hmmmmmm. The alternative is to create a heap of standard table rates (now those i do know how to duplicate no probs!) This would mean having about 14 seperate tables installed - 2 zones in each of 7 states - no big issue to do but would that entail any performance issues i should be aware of? My thinking was if i could make an instance of MZMT for each Vendor then it would be a way around this but seems not possible. Any tips from those in the know? :huh: Cheers! Just a quicky in addition to this - i am looking at installing the individual prices addon to handle a couple of my heavy items but wanted to confirm: If there is no individual price specified on an item will it default back to the tables or does a value have to be input for every item? i.e. Does it work in addition to, or as a replacement for the tables? Any clarification appreciated! Quote And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit: "The administrator has enabled flood control - please try again in 30 seconds." Never fails. Every time. Link to comment Share on other sites More sharing options...
sumaprojekt Posted June 4, 2006 Share Posted June 4, 2006 I have MVS (and other stuff) installed and everything works great, except... Items can have 2 different tax values/zones: 10% and 20% (ex.: books have 10% tax, clothes have 20% tax). Shipping allways has 20% tax. If I order an items with 20% tax everything is OK. If I order an items with 10% tax than the 20% tax from shipping is not added to the total order value. I guess that since there are no 20% tax items on order, it skips adding the 20% tax from shipping, but I am not sure where/how to force OSC to add this 20% tax from shipping. Any ideas? Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted June 4, 2006 Share Posted June 4, 2006 The following error only seems to happen on one browser that I have found:Mac Firefox 1.5.0.3: Problem I've tested and found No Problem on: Mac Safari 2.0.3: No Problem Mac Internet Explorer 5.2: No Problem Win Firefox 1.0.4: No Problem Win Internet Explorer 6.0.2900...: No Problem I don't think it's related to this problem but the code I posted for the radio select issue in post #2191 is not as cross-browser compatible as it could be. In checkout_shipping.php I recommend changing the top half of the javascript to this: <?php if (SELECT_VENDOR_SHIPPING == 'true') { ?> function selectRowEffect(object, buttonSelect, vendor) { var test='defaultSelected_' + vendor;//set aside defaultSelected_' . $vendor_id . ' if (document.getElementsByTagName) { var el=document.getElementsByTagName('tr');//all the tr elements } else { var el=document.all.tags('tr');//all the tr elements } for(var i=0;i<el.length;i++){ var p=el[i].id.replace(test,'').replace(/\d/g,'');//strip the $radio_buttons value if(p=='_'){//the only thing left is an underscore el[i].className = "moduleRow";//make the matching elements normal } } object.className = "moduleRowSelected";//override el[i].className and highlight the clicked row if (document.getElementById) { var field = document.getElementById('shipping_radio_' + buttonSelect + '_' + vendor); } else { var field = document.all['shipping_radio_' + buttonSelect + '_' + vendor]; } if (field) field.checked=true;//fill in the button in the clicked row if it exists } <?php } else { ?> This should work with IE back to IE4, all versions of Mozilla, all versions of Safari, NN4, and NN6+. If anyone knows some JavaScript tricks to get the missing NN's and IE's to work that would be great. 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...
redgorilla Posted June 5, 2006 Share Posted June 5, 2006 (edited) Hello. Is anybody there use any shipping estimator module with MVS? I have installed http://www.oscommerce.com/community/contri...timate+shipping one before MVS and it's not working with MVS. Any ideas? Edited June 5, 2006 by redgorilla Quote Link to comment Share on other sites More sharing options...
zookun Posted June 6, 2006 Share Posted June 6, 2006 I've installed MVS. It looks like what I need. But I need to have the individual administrator for each vendor. e.g. super-admin full control of all vendors admin-A administrate only vendor-A admin-B administrate only vendor-B Now I?m seeking solution. Do you have any plan to add that kind of function (multiple administrator) in the future? I?m sorry my English is poor. I hope you will find out what I mean. Thanks. Quote Link to comment Share on other sites More sharing options...
demon2lima Posted June 7, 2006 Share Posted June 7, 2006 does anyone have any ideas as to why MVS only reacts to Money Order sales and not PayPal? I really need some help with this. I am using the PayPal IPN contrib created by the DEV team. Quote Link to comment Share on other sites More sharing options...
Bozmium Posted June 7, 2006 Share Posted June 7, 2006 Ok heres one for one of the authors or someone more familiar with MVS. Trying to get the TNT shipping module working in MVS - this one here: TNT Aus based shipping on PCode I have followed the modules.txt rundown included with MVS on how to modify modules and think ive almost got it pegged. Unfortunately it keeps throwing this error up at me when in the Vendor manager window: Parse error: syntax error, unexpected $end in /home/bozcorpt/public_html/includes/modules/vendors_shipping/tntzipzonesroad.php on line 182 So i have missed or mucked something somewhere - line 182 incidentally is the very last line and is simply the closing php tag ?>. My parser is telling me that <?php is expected?! If there is anyone here who would be kind enough to have a quick look over this module and maybe point out where i have mucked up i would be very grateful. This can then be thrown onto the download page to join the other shipping modules already ported. This module is designed for Aus based TNT but no reason why it couldnt be altered easily via the rate tables and language files to be applicable anywhere. Here we go: <?php /* Released under the GNU General Public License */ class tntzipzonesroad { var $code, $title, $description, $enabled, $num_zones, $surcharge_factor, $sort_order, $vendors_id; // class constructor: function tntzipzonesroad() { global $order, $vendors_id; $this->vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id']; $this->code = 'tntzipzonesroad'; $this->title = MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE; $this->description = MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION; $this->icon = DIR_WS_ICONS . ''; // $this->enabled = MODULE_SHIPPING_TNTZIPZONESROAD_STATUS; // Customize this setting for the number of zones needed (no change required by default) // $this->num_zones = 1; function num_zones($vendors_id='1') { $this->num_zones = constant('1' . $vendors_id); return $this->num_zones; } //More options can be added later for Express, Overnight etc when someone codes it. $this->types = array('TNT Off-Peak' => 'std'); // Change this surcharge factor to increase your profit margin on freight // $this->surcharge_factor = 1.1; function surcharge_factor($vendors_id='1') { $this->surcharge_factor = constant('1.1' . $vendors_id); return $this->surcharge_factor; } function sort_order($vendors_id='1') { $sort_order = 'MODULE_SHIPPING_TNTZIPZONESROAD_SORT_ORDER_' . $vendors_id; if (defined($sort_order)) { $this->sort_order = constant($sort_order); } else { $this->sort_order = '-'; } return $this->sort_order; } function tax_class($vendors_id='1') { $this->tax_class = constant('MODULE_SHIPPING_TNTZIPZONESROAD_CLASS_' . $vendors_id); return $this->tax_class; } function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_' . $vendors_id); if (isset ($status) && $status != '') { $this->enabled = (($status == 'True') ? true : false); } return $this->enabled; } function zones($vendors_id='1') { if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_TNTZIPZONESROAD_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_TABLE_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } //if }//while if ($check_flag == false) { $this->enabled = false; }//if }//if return $this->enabled; } // class methods function quote($method = '', $module = '', $vendors_id = '1') { global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes, $cart; // First get the dest zip and check the db for our dest zone $zip = $order->delivery['postcode']; if ( $zip == '' ){ // Something is wrong, we didn't find any zone if ($this->enabled($vendors_id) < 1) { $this->quotes['error'] = MODULE_SHIPPING_TNTZIPZONESROAD_NO_ZIPCODE_FOUND; return $this->quotes; } $sql = "SELECT * FROM tnt_zones WHERE $zip >= t_postcode and $zip <= t_postcode"; $qResult = tep_db_query($sql); // run the query $rec = tep_db_fetch_array($qResult); // get the first row of the result $zone_id = $rec['t_zone']; if ( $zone_id == '' ){ // Something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_TNTZIPZONESROAD_NO_ZONE_FOUND; return $this->quotes; } $sql = "SELECT t_rate FROM tnt_rates_road WHERE t_zone_id = '$zone_id'"; $qResult = tep_db_query($sql); while ($rec = tep_db_fetch_array($qResult)) {$retArr[] = $rec;} foreach($retArr as $aquote){ $cost = $aquote['t_rate']; } // Consignment charge insertion start $sql = "SELECT t_ccharge FROM tnt_rates_road WHERE t_zone_id = '$zone_id'"; $qResult = tep_db_query($sql); while ($rec = tep_db_fetch_array($qResult)) {$retArr[] = $rec;} foreach($retArr as $aquote){ $ccharge = $aquote['t_ccharge']; // Consignment charge insertion end } $vendors_data_query = tep_db_query("select handling_charge, handling_per_box, vendor_country 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); $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; } if ($shipping_weight <= '15') { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE, 'methods' => array(array('id' => $this_code, 'title' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION, // 'cost' => ((($ccharge)*1.10)* $this->surcharge_factor)+ MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING))); 'cost' => $shipping + $handling)));} else { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE, 'methods' => array(array('id' => $this_code, 'title' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION, // 'cost' => ((($cost * ($shipping_weight - 15) + $ccharge)*1.10)* $this->surcharge_factor)+ MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING))); 'cost' => $shipping + $handling)));} //1.10 added to calculate 10% GST on freight in Australia // if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_TNTLZIPZONES_INVALID_ZONE; return $this->quotes; } // function check() { function check($vendors_id='1') { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . "where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_".$vendors_id . "'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } // function install() { function install($vendors_id='1') { tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) VALUES ('Enable TNT Postcode Zones Method', 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_" . $vendors_id . "', '1', 'Do you want to offer TNT postcode/zone rate shipping?', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Handling Fee', 'MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING_" . $vendors_id . "', '0', 'Handling Fee for this shipping method', '6', '0', now(), '" . $vendors_id . "')"); } // function remove() { function remove($vendors_id) { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')"); } function keys($vendors_id) { $keys = array( 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_'. $vendors_id, 'MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING_' . $vendors_id ); return $keys; } } ?> Any help appreciated! Quote And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit: "The administrator has enabled flood control - please try again in 30 seconds." Never fails. Every time. Link to comment Share on other sites More sharing options...
Foxtel Posted June 7, 2006 Share Posted June 7, 2006 Ok heres one for one of the authors or someone more familiar with MVS. Trying to get the TNT shipping module working in MVS - this one here: TNT Aus based shipping on PCode I have followed the modules.txt rundown included with MVS on how to modify modules and think ive almost got it pegged. Unfortunately it keeps throwing this error up at me when in the Vendor manager window: Parse error: syntax error, unexpected $end in /home/bozcorpt/public_html/includes/modules/vendors_shipping/tntzipzonesroad.php on line 182 So i have missed or mucked something somewhere - line 182 incidentally is the very last line and is simply the closing php tag ?>. My parser is telling me that <?php is expected?! If there is anyone here who would be kind enough to have a quick look over this module and maybe point out where i have mucked up i would be very grateful. This can then be thrown onto the download page to join the other shipping modules already ported. This module is designed for Aus based TNT but no reason why it couldnt be altered easily via the rate tables and language files to be applicable anywhere. Here we go: <?php /* Released under the GNU General Public License */ class tntzipzonesroad { var $code, $title, $description, $enabled, $num_zones, $surcharge_factor, $sort_order, $vendors_id; // class constructor: function tntzipzonesroad() { global $order, $vendors_id; $this->vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id']; $this->code = 'tntzipzonesroad'; $this->title = MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE; $this->description = MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION; $this->icon = DIR_WS_ICONS . ''; // $this->enabled = MODULE_SHIPPING_TNTZIPZONESROAD_STATUS; // Customize this setting for the number of zones needed (no change required by default) // $this->num_zones = 1; function num_zones($vendors_id='1') { $this->num_zones = constant('1' . $vendors_id); return $this->num_zones; } //More options can be added later for Express, Overnight etc when someone codes it. $this->types = array('TNT Off-Peak' => 'std'); // Change this surcharge factor to increase your profit margin on freight // $this->surcharge_factor = 1.1; function surcharge_factor($vendors_id='1') { $this->surcharge_factor = constant('1.1' . $vendors_id); return $this->surcharge_factor; } function sort_order($vendors_id='1') { $sort_order = 'MODULE_SHIPPING_TNTZIPZONESROAD_SORT_ORDER_' . $vendors_id; if (defined($sort_order)) { $this->sort_order = constant($sort_order); } else { $this->sort_order = '-'; } return $this->sort_order; } function tax_class($vendors_id='1') { $this->tax_class = constant('MODULE_SHIPPING_TNTZIPZONESROAD_CLASS_' . $vendors_id); return $this->tax_class; } function enabled($vendors_id='1') { $this->enabled = false; $status = @constant('MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_' . $vendors_id); if (isset ($status) && $status != '') { $this->enabled = (($status == 'True') ? true : false); } return $this->enabled; } function zones($vendors_id='1') { if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_TNTZIPZONESROAD_ZONE_' . $vendors_id) > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_TABLE_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } //if }//while if ($check_flag == false) { $this->enabled = false; }//if }//if return $this->enabled; } // class methods function quote($method = '', $module = '', $vendors_id = '1') { global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes, $cart; // First get the dest zip and check the db for our dest zone $zip = $order->delivery['postcode']; if ( $zip == '' ){ // Something is wrong, we didn't find any zone if ($this->enabled($vendors_id) < 1) { $this->quotes['error'] = MODULE_SHIPPING_TNTZIPZONESROAD_NO_ZIPCODE_FOUND; return $this->quotes; } $sql = "SELECT * FROM tnt_zones WHERE $zip >= t_postcode and $zip <= t_postcode"; $qResult = tep_db_query($sql); // run the query $rec = tep_db_fetch_array($qResult); // get the first row of the result $zone_id = $rec['t_zone']; if ( $zone_id == '' ){ // Something is wrong, we didn't find any zone $this->quotes['error'] = MODULE_SHIPPING_TNTZIPZONESROAD_NO_ZONE_FOUND; return $this->quotes; } $sql = "SELECT t_rate FROM tnt_rates_road WHERE t_zone_id = '$zone_id'"; $qResult = tep_db_query($sql); while ($rec = tep_db_fetch_array($qResult)) {$retArr[] = $rec;} foreach($retArr as $aquote){ $cost = $aquote['t_rate']; } // Consignment charge insertion start $sql = "SELECT t_ccharge FROM tnt_rates_road WHERE t_zone_id = '$zone_id'"; $qResult = tep_db_query($sql); while ($rec = tep_db_fetch_array($qResult)) {$retArr[] = $rec;} foreach($retArr as $aquote){ $ccharge = $aquote['t_ccharge']; // Consignment charge insertion end } $vendors_data_query = tep_db_query("select handling_charge, handling_per_box, vendor_country 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); $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; } if ($shipping_weight <= '15') { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE, 'methods' => array(array('id' => $this_code, 'title' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION, // 'cost' => ((($ccharge)*1.10)* $this->surcharge_factor)+ MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING))); 'cost' => $shipping + $handling)));} else { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_TITLE, 'methods' => array(array('id' => $this_code, 'title' => MODULE_SHIPPING_TNTZIPZONESROAD_TEXT_DESCRIPTION, // 'cost' => ((($cost * ($shipping_weight - 15) + $ccharge)*1.10)* $this->surcharge_factor)+ MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING))); 'cost' => $shipping + $handling)));} //1.10 added to calculate 10% GST on freight in Australia // if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_TNTLZIPZONES_INVALID_ZONE; return $this->quotes; } // function check() { function check($vendors_id='1') { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . "where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_".$vendors_id . "'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } // function install() { function install($vendors_id='1') { tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) VALUES ('Enable TNT Postcode Zones Method', 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_" . $vendors_id . "', '1', 'Do you want to offer TNT postcode/zone rate shipping?', '6', '0', now(), '" . $vendors_id . "')"); tep_db_query("insert into " . TABLE_VENDOR_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Handling Fee', 'MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING_" . $vendors_id . "', '0', 'Handling Fee for this shipping method', '6', '0', now(), '" . $vendors_id . "')"); } // function remove() { function remove($vendors_id) { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')"); } function keys($vendors_id) { $keys = array( 'MODULE_SHIPPING_TNTZIPZONESROAD_STATUS_'. $vendors_id, 'MODULE_SHIPPING_TNTZIPZONESROAD_HANDLING_' . $vendors_id ); return $keys; } } ?> Any help appreciated! Bozmium, Took a quick look and from what I can see the class tntzipzonesroad { definition is missing the ending }. Also the function tntzipzonesroad() { looks to be missing the ending }. -Foxtel Quote Link to comment Share on other sites More sharing options...
♥kymation Posted June 7, 2006 Share Posted June 7, 2006 The function tntzipzonesroad is missing its ending }, as Foxtel said. The function sort_order is missing both the opening { and the ending }. The function quote is missing its ending }. There may be more that show up after these are fixed. You would be able to find this sort of thing easier if you use an editor that highlights matching pairs. I use PHP Designer, but there are many more excellent editors that will do this for you. Keeping the code neat and following the coding standards also help to make it easier to spot errors. 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...
blucollarguy Posted June 7, 2006 Author Share Posted June 7, 2006 does anyone have any ideas as to why MVS only reacts to Money Order sales and not PayPal? I really need some help with this. I am using the PayPal IPN contrib created by the DEV team. Do you mean the one by the osC team? That one should work just fine. If you are using one of the other versions, the problem is simple: you must install the MVS code from "checkout_process.php" into "includes\modules\payment\paypal\catalog\checkout_process.inc.php". A pain in the @%#! If it is the one from the osC team, then there is something else going on, as it is fully compatible with the structure that MVS was designed around. 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...
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.