insaini Posted July 20, 2007 Share Posted July 20, 2007 (edited) If what you're working on is an update to Step by Step Manual Order Entry or some similar contribution (you mentioned Manual Order Creator but I couldn't find that in the contributions section) I would recommend posting it as an update to that package, not Order Editor. Order Editor has always been a stand-alone contribution and it seems, to me at least, that merging the two and calling it "Order Editor" would be confusing, in as much as many people would be getting a lot more than they were expecting. Also, as luck would have it, I am nearing completion on my own update to Order Editor that I was referring to privately as 4.0. It looks like both will be released at about the same time and I imagine that given the nature of the project as a whole the best features of the two will be merged into a later, final version. But, since both will probably still be in the alpha/beta range of testing, how about if we use code names instead of version numbers? For some reason I've also been calling my update "Party All the Time". :) heh well I guess I should have read this post before posting :blink: I just finished uploading it as 4.0 Alpha http://www.oscommerce.com/community/contributions,1435 no upgrade documentation has been included as of yet. This release assumes a fresh install of OSC 2.2RC1 The Manual Order Maker (sorry not Creator) was combined because it seemed to make sense that both really do go hand in hand.. but i guess thats open to interpretation. I look forward to your version and definitely would be best to merge the best features of each. =D J Edited July 20, 2007 by insaini Quote Link to comment Share on other sites More sharing options...
analli Posted July 20, 2007 Share Posted July 20, 2007 heh well I guess I should have read this post before posting :blink: I just finished uploading it as 4.0 Alpha http://www.oscommerce.com/community/contributions,1435 no upgrade documentation has been included as of yet. This release assumes a fresh install of OSC 2.2RC1 The Manual Order Maker (sorry not Creator) was combined because it seemed to make sense that both really do go hand in hand.. but i guess thats open to interpretation. I look forward to your version and definitely would be best to merge the best features of each. =D J Man, if these two guys get together we're all in for a MAJOR treat! Good luck guys! Anthony Quote Link to comment Share on other sites More sharing options...
insaini Posted July 20, 2007 Share Posted July 20, 2007 I did some minor corrections to the code and slight updates. Im done at 4.0.1.1. Check the contribution page. Ive also included the upgrade documentation. Would appreciate testing by anyone. Thanks J Quote Link to comment Share on other sites More sharing options...
djmonkey1 Posted July 20, 2007 Share Posted July 20, 2007 Man, if these two guys get together we're all in for a MAJOR treat! Good luck guys! Anthony Well, they're wildly different, I can tell you that much... :) 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...
mkestphenson Posted July 20, 2007 Share Posted July 20, 2007 I did some minor corrections to the code and slight updates. Im done at 4.0.1.1. Check the contribution page. Ive also included the upgrade documentation. Would appreciate testing by anyone. Thanks J I am having an issue after fresh install. From the admin panel I get error when I try to "Edit" any order: Warning: shipping(includes/languages/english/modules/shipping/flat.php) [function.shipping]: failed to open stream: No such file or directory in /home/noiselea/public_html/sect9/shop/includes/classes/shipping.php on line 36 Warning: shipping() [function.include]: Failed opening 'includes/languages/english/modules/shipping/flat.php' for inclusion (include_path='.:/usr/lib/php') in /home/noiselea/public_html/sect9/shop/includes/classes/shipping.php on line 36 Warning: shipping(includes/modules/shipping/flat.php) [function.shipping]: failed to open stream: No such file or directory in /home/noiselea/public_html/sect9/shop/includes/classes/shipping.php on line 37 Warning: shipping() [function.include]: Failed opening 'includes/modules/shipping/flat.php' for inclusion (include_path='.:/usr/lib/php') in /home/noiselea/public_html/sect9/shop/includes/classes/shipping.php on line 37 Fatal error: Cannot instantiate non-existent class: flat in /home/noiselea/public_html/sect9/shop/includes/classes/shipping.php on line 39 Do I need a custom shipping module installed to use this Order Edito module? I have checked and all the .php files are in the correct place. Any response is greatly appreciated. _mike Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 I am having an issue after fresh install. From the admin panel I get error when I try to "Edit" any order:Do I need a custom shipping module installed to use this Order Edito module? I have checked and all the .php files are in the correct place. Any response is greatly appreciated. _mike Hi Mike, yeah I guess I should have put this in the install.txt as well.. you need to copy over the shipping modules from catalog/includes/modules/shipping to admin/includes/modules/shipping there is no directory for shipping modules under admin so just copy the whole shipping folder into admin/includes/modules likewise copy over all the language files for the shipping modules from catalog/includes/languages/english/modules/shipping to admin/includes/languages/english/modules/shipping This should fix the error. J Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 Im pretty sure that was the problem.. infact it looks like you only really need the flat.php shipping module because you seem to have that installed... but again.. any shipping module you install needs to be installed in both Admin and Catalog if you want to use the shipping module with the order editor Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 Well, they're wildly different, I can tell you that much... :) I hope I didnt trash the code too much B) Quote Link to comment Share on other sites More sharing options...
cgmaster Posted July 21, 2007 Share Posted July 21, 2007 so far so good... everything was going fine until i upgraded to the latest 4.0.1 and i hit the shipping error... thanks for the previous post that now works, however i have the following error and i am stumped, any help on this would be really appreciated... Fatal error: Class 'orderCart' not found in /home/kanguru/public_html/store/admin/edit_orders.php on line 47 // create the order cart & fix the cart if necesary if (tep_session_is_registered('cart') && is_object($cart)) { if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new orderCart((int)$_GET['oID']); $cart->unserialize($broken_cart); } else { $cart = new orderCart((int)$_GET['oID']); } } else { tep_session_register('cart'); $cart = new orderCart((int)$_GET['oID']); } Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 so far so good... everything was going fine until i upgraded to the latest 4.0.1 and i hit the shipping error... thanks for the previous post that now works, however i have the following error and i am stumped, any help on this would be really appreciated... Fatal error: Class 'orderCart' not found in /home/kanguru/public_html/store/admin/edit_orders.php on line 47 // create the order cart & fix the cart if necesary if (tep_session_is_registered('cart') && is_object($cart)) { if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new orderCart((int)$_GET['oID']); $cart->unserialize($broken_cart); } else { $cart = new orderCart((int)$_GET['oID']); } } else { tep_session_register('cart'); $cart = new orderCart((int)$_GET['oID']); } seems like you didnt copy the order_cart.php file to your admin/includes/classes folder check to see if its there.. that should resolve this issue. Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 so far so good... everything was going fine until i upgraded to the latest 4.0.1 and i hit the shipping error... thanks for the previous post that now works, however i have the following error and i am stumped, any help on this would be really appreciated... Fatal error: Class 'orderCart' not found in /home/kanguru/public_html/store/admin/edit_orders.php on line 47 // create the order cart & fix the cart if necesary if (tep_session_is_registered('cart') && is_object($cart)) { if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new orderCart((int)$_GET['oID']); $cart->unserialize($broken_cart); } else { $cart = new orderCart((int)$_GET['oID']); } } else { tep_session_register('cart'); $cart = new orderCart((int)$_GET['oID']); } DOH! I missed a crucial edit I had this in application_top.php under admin/includes should have been placed in the edit_orders.php file.. look for require(DIR_WS_FUNCTIONS . 'oe_functions.php'); require(DIR_WS_CLASSES . 'oe_order.php'); around line 24 and place this below it // include order cart class require(DIR_WS_CLASSES . 'order_cart.php'); this should resolve that issue.. sorry about that guys. Quote Link to comment Share on other sites More sharing options...
cgmaster Posted July 21, 2007 Share Posted July 21, 2007 DOH! I missed a crucial edit I had this in application_top.php under admin/includes should have been placed in the edit_orders.php file.. look for require(DIR_WS_FUNCTIONS . 'oe_functions.php'); require(DIR_WS_CLASSES . 'oe_order.php'); around line 24 and place this below it // include order cart class require(DIR_WS_CLASSES . 'order_cart.php'); this should resolve that issue.. sorry about that guys. and that it did!! sweet, thanks for that!!! However!! now i can get to the order edit page..... i have all shipping modules etc installed as previously directed although only 3 + other show up and i get a message ERROR: The delivery rate for this option cannot be determined at this time If you prefer to use this option as your shipping method, please contact the store owner. this error only happens in the admin edit side and is working perfectly well in the customer process side of the cart, 1 - i selected Request Real-Time Shipping Quotes: ticked 2 - now regardless of whether i update or exit & return to the edit page for the order the error msg still shows under the heading Shipping Service... 3 - at the top of the edit order page i have <!---- BEGIN SHIPPING MODULE BLOCK ----------> across the page, maybe this has something to do with receiving the error messages... any ideas on this??? btw... cant thank you enough for the work you have put into this contribution... makes my life much easier :) cheers Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 and that it did!! sweet, thanks for that!!! However!! now i can get to the order edit page..... i have all shipping modules etc installed as previously directed although only 3 + other show up and i get a message ERROR: The delivery rate for this option cannot be determined at this time If you prefer to use this option as your shipping method, please contact the store owner. this error only happens in the admin edit side and is working perfectly well in the customer process side of the cart, 1 - i selected Request Real-Time Shipping Quotes: ticked 2 - now regardless of whether i update or exit & return to the edit page for the order the error msg still shows under the heading Shipping Service... 3 - at the top of the edit order page i have <!---- BEGIN SHIPPING MODULE BLOCK ----------> across the page, maybe this has something to do with receiving the error messages... any ideas on this??? btw... cant thank you enough for the work you have put into this contribution... makes my life much easier :) cheers Great, believe it or not I knew you would get this error. It seems that the developers didnt consider it a possibility that in the admin section you would ever create orders or update any shipping methods or need real-time quotes. So you have inconsistent functions between catalog/includes/general.php and admin/includes/general.php for example in catalog/includes/general.php you have a function which returns the country with its iso code.. the same function in admin doesnt.. this is the problem. I have added the custom function in admin/includes/oe_functions.php the function is tep_get_countries_iso you have to go into your shipping module (the ones that keep saying cannot determine or calculate) ... go to the quote method in the module and find this bit of code $country_name = tep_get_countries(STORE_COUNTRY, true); $this->_canadapostOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']); $this->_canadapostDest($order->delivery['city'], $order->delivery['state'], $order->delivery['country']['countries_iso_code_2'],$order->delivery['postcode']); and change it to $country_name = tep_get_countries_iso(STORE_COUNTRY, true); $dest_country_name = tep_get_countries_iso(tep_get_country_id($order->delivery['country']), true); $this->_canadapostOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']); $this->_canadapostDest($order->delivery['city'], $order->delivery['state'], $dest_country_name['countries_iso_code_2'],$order->delivery['postcode']); (the canadapost is specific to my canada post module hence you have it there) .. you will need to change this accordingly to shipping modules) and again.. that should do it =D J Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 (edited) Slight update guys you can choose to do it or not it doesnt change anything besides cut down on some sql queries.. Fine near line 1826 <td class="dataTableContent" valign="top"><?php echo tep_draw_pull_down_menu('update_customer_country_id', tep_get_countries(), tep_get_country_id($order->customer['country']), 'onchange="update_zone(this.form, \'update_customer_country_id\', \'update_customer_zone_id\', \'customerStateInput\', \'customerStateMenu\');"'); ?></td> Change to: <td class="dataTableContent" valign="top"><?php echo tep_draw_pull_down_menu('update_customer_country_id', tep_get_countries(), $order->customer['country_id'], 'onchange="update_zone(this.form, \'update_customer_country_id\', \'update_customer_zone_id\', \'customerStateInput\', \'customerStateMenu\');"'); ?></td> ------------------------------------------------------ The change? tep_get_country_id($order->customer['country']) => $order->customer['country_id'] no need for that function call when the id already exists.. better to just use it.. there are two other places this occurs.. so just do a search and change it up.. they all happen below line 1826 again upto you if you want to or not... but better that you do imo J Edited July 21, 2007 by insaini Quote Link to comment Share on other sites More sharing options...
cgmaster Posted July 21, 2007 Share Posted July 21, 2007 Great, believe it or not I knew you would get this error. It seems that the developers didnt consider it a possibility that in the admin section you would ever create orders or update any shipping methods or need real-time quotes. So you have inconsistent functions between catalog/includes/general.php and admin/includes/general.php for example in catalog/includes/general.php you have a function which returns the country with its iso code.. the same function in admin doesnt.. this is the problem. I have added the custom function in admin/includes/oe_functions.php the function is tep_get_countries_iso you have to go into your shipping module (the ones that keep saying cannot determine or calculate) ... go to the quote method in the module and find this bit of code $country_name = tep_get_countries(STORE_COUNTRY, true); $this->_canadapostOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']); $this->_canadapostDest($order->delivery['city'], $order->delivery['state'], $order->delivery['country']['countries_iso_code_2'],$order->delivery['postcode']); and change it to $country_name = tep_get_countries_iso(STORE_COUNTRY, true); $dest_country_name = tep_get_countries_iso(tep_get_country_id($order->delivery['country']), true); $this->_canadapostOrigin(SHIPPING_ORIGIN_ZIP, $country_name['countries_iso_code_2']); $this->_canadapostDest($order->delivery['city'], $order->delivery['state'], $dest_country_name['countries_iso_code_2'],$order->delivery['postcode']); (the canadapost is specific to my canada post module hence you have it there) .. you will need to change this accordingly to shipping modules) and again.. that should do it =D J im glad someone knows whats going on!! well I looked for the above function call tep_get_countries and the austpost modules have this: class auspostair { var $code, $title, $description, $icon, $enabled; // class constructor function auspostair() { global $order; $this->code = 'auspostair'; $this->title = MODULE_SHIPPING_AUSPOSTAIR_TEXT_TITLE; $this->description = MODULE_SHIPPING_AUSPOSTAIR_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_AUSPOSTAIR_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'auspost_air.gif'; $this->tax_class = MODULE_SHIPPING_AUSPOSTAIR_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_AUSPOSTAIR_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_AUSPOSTAIR_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_AUSPOSTAIR_ZONE . "' 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 ($check_flag == false) { $this->enabled = false; } } } // class methods function quote($method = '') { global $order, $cart, $shipping_weight, $shipping_num_boxes, $total_weight; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; // ONLY Other countries AUS HIDE if ($order->delivery['country']['iso_code_2'] <> 'AU') { // ONLY SHOWN IF LESS OR EQUAL TO MAX WEIGHT if ($shipping_weight <= MODULE_SHIPPING_AUSPOSTAIR_MAX_WEIGHT ) { $frompcode = MODULE_SHIPPING_AUSPOSTAIR_SPCODE; $topcode = $order->delivery['postcode']; $dest_country=$order->delivery['country']['iso_code_2']; $sweight = $shipping_weight*1000; $swidth = MODULE_SHIPPING_AUSPOSTAIR_SWIDTH; $sheight = MODULE_SHIPPING_AUSPOSTAIR_SHEIGHT; $slength = MODULE_SHIPPING_AUSPOSTAIR_SDEPTH; $error = false; as you can see its nothing like what you posted, can this be amended to be made compatible with OE, really hope so!! :) Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 // class methods function quote($method = '') { global $order, $cart, $shipping_weight, $shipping_num_boxes, $total_weight; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; // ONLY Other countries AUS HIDE if ($order->delivery['country']['iso_code_2'] <> 'AU') { // ONLY SHOWN IF LESS OR EQUAL TO MAX WEIGHT if ($shipping_weight <= MODULE_SHIPPING_AUSPOSTAIR_MAX_WEIGHT ) { $frompcode = MODULE_SHIPPING_AUSPOSTAIR_SPCODE; $topcode = $order->delivery['postcode']; $dest_country=$order->delivery['country']['iso_code_2']; $sweight = $shipping_weight*1000; $swidth = MODULE_SHIPPING_AUSPOSTAIR_SWIDTH; $sheight = MODULE_SHIPPING_AUSPOSTAIR_SHEIGHT; $slength = MODULE_SHIPPING_AUSPOSTAIR_SDEPTH; $error = false; as you can see its nothing like what you posted, can this be amended to be made compatible with OE, really hope so!! :) yup.. do you see the part above $dest_country = $order->delivery['country']['iso_code_2']; change that to $dest_country_array = tep_get_countries_iso($order->delivery['country_id'], true); $dest_country = $dest_country_array['iso_code_2']; -------------------- change this // ONLY Other countries AUS HIDE if ($order->delivery['country']['iso_code_2'] <> 'AU') { to // ONLY Other countries AUS HIDE if ($dest_country_array['iso_code_2'] <> 'AU') { ------------------- Find this $frompcode = MODULE_SHIPPING_AUSPOSTAIR_SPCODE; $topcode = $order->delivery['postcode']; $dest_country=$order->delivery['country']['iso_code_2']; AND remove the last line (just delete that last line) ------------- ALSO in your class function at the top you have this line near the middle MODULE_SHIPPING_AUSPOSTAIR_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); Change this to MODULE_SHIPPING_AUSPOSTAIR_ZONE . "' and zone_country_id = '" . $order->delivery['country_id'] . "' order by zone_id"); basically you change $order->delivery['country']['id] to $order->delivery['country_id'] ----------------- it seems like there may be a bit more code in your quote function that might need to be changed.. Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 Sorry change all those 'iso_code_2' to 'countries_iso_code_2' everywhere Quote Link to comment Share on other sites More sharing options...
cgmaster Posted July 21, 2007 Share Posted July 21, 2007 Sorry change all those 'iso_code_2' to 'countries_iso_code_2' everywhere ok getting somewhere... dont get the error message anymore under 3. Shipping Service I get Completed: Order has been successfully updated. after update but still get this msg at top of page, <!---- BEGIN SHIPPING MODULE BLOCK ----------> and can tick live update & select shipping mode, but doesn't give a Real-Time Shipping Quote Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 ok getting somewhere... dont get the error message anymore under 3. Shipping Service I get Completed: Order has been successfully updated. after update but still get this msg at top of page, <!---- BEGIN SHIPPING MODULE BLOCK ----------> and can tick live update & select shipping mode, but doesn't give a Real-Time Shipping Quote Are you testing this with a domestic delivery or international delivery? according to the code sample you posted the last bit was just for international so i dont know if you modified the bit for domestic or not.. can you post the entire Quote function from your shipping module so I can have a closer look.. a screen shot of what you are seeing would be helpful as well Quote Link to comment Share on other sites More sharing options...
cgmaster Posted July 21, 2007 Share Posted July 21, 2007 Are you testing this with a domestic delivery or international delivery? according to the code sample you posted the last bit was just for international so i dont know if you modified the bit for domestic or not.. can you post the entire Quote function from your shipping module so I can have a closer look.. a screen shot of what you are seeing would be helpful as well just working on international file atm... // class methods function quote($method = '') { global $order, $cart, $shipping_weight, $shipping_num_boxes, $total_weight; //$dest_country = $order->delivery['country']['iso_code_2']; $dest_country_array = tep_get_countries_iso($order->delivery['country_id'], true); $dest_country = $dest_country_array['countries_iso_code_2']; $dest_zone = 0; $error = false; // ONLY Other countries AUS HIDE if ($dest_country_array['countries_iso_code_2'] <> 'AU') { // ONLY Other countries AUS HIDE // if ($order->delivery['country']['iso_code_2'] <> 'AU') { // ONLY SHOWN IF LESS OR EQUAL TO MAX WEIGHT if ($shipping_weight <= MODULE_SHIPPING_AUSPOSTAIR_MAX_WEIGHT ) { $frompcode = MODULE_SHIPPING_AUSPOSTAIR_SPCODE; $topcode = $order->delivery['postcode']; //$dest_country=$order->delivery['country']['iso_code_2']; $sweight = $shipping_weight*1000; $swidth = MODULE_SHIPPING_AUSPOSTAIR_SWIDTH; $sheight = MODULE_SHIPPING_AUSPOSTAIR_SHEIGHT; $slength = MODULE_SHIPPING_AUSPOSTAIR_SDEPTH; $error = false; // If Insurance option selected - calculate insurance cost if (MODULE_SHIPPING_AUSPOSTAIR_INS_STATUS == 'True') { // Start with Base Cost $insurance = MODULE_SHIPPING_AUSPOSTAIR_INS_BASE ; if ($order->info['subtotal'] > MODULE_SHIPPING_AUSPOSTAIR_INS_UNIT) { $how_often = ceil((($order->info['subtotal'] - MODULE_SHIPPING_AUSPOSTAIR_INS_UNIT)/MODULE_SHIPPING_AUSPOSTAIR_INS_UNIT)); $insurance =+ MODULE_SHIPPING_AUSPOSTAIR_INS_BASE + ($how_often * MODULE_SHIPPING_AUSPOSTAIR_INS_ADD) ; } } // End calculating Insurance $url = "http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=$frompcode&Destination_Postcode=$topcode&Country=$dest_country&Weight=$sweight&Service_Type=AIR&Height=$sheight&Width=$swidth&Length=$slength&Quantity=$shipping_num_boxes"; $myfile = file($url); foreach($myfile as $vals) { $bits = split("=", $vals); $$bits[0] = $bits[1]; } if ($charge <= 0) { $error = true; } else { $handling = MODULE_SHIPPING_AUSPOSTAIR_HANDLING; if ($handling >0) { $handling_details = " $" . MODULE_SHIPPING_AUSPOSTAIR_HANDLING . " " .MODULE_SHIPPING_AUSPOSTAIR_TEXT_HANDLING; } else { $handling_details = ""; } if ($insurance >0) { $insurance_details = " $" .$insurance . " " .MODULE_SHIPPING_AUSPOSTAIR_TEXT_INSURANCE; } else { $insurance_details = ""; } if ($insurance == 0 && $handling == 0) { $auspostair_addons = ""; } else { $auspostair_addons = " (" . MODULE_SHIPPING_AUSPOSTAIR_TEXT_INCLUDE . $handling_details . $insurance_details . ") "; } $shipping_auspostair_method = MODULE_SHIPPING_AUSPOSTAIR_TEXT_WAY. " <b>" . $topcode . "</b> - " . $days . " " . MODULE_SHIPPING_AUSPOSTAIR_TEXT_SHIPPINGDAYS . "<br>" .$shipping_num_boxes . " " .MODULE_SHIPPING_AUSPOSTAIR_TEXT_BOXES . " " . $total_weight . MODULE_SHIPPING_AUSPOSTAIR_TEXT_UNITS . $auspostair_addons; $shipping_auspostair_cost = (($charge/1.1)* $shipping_num_boxes); } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_AUSPOSTAIR_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_auspostair_method, 'cost' => ($shipping_auspostair_cost + MODULE_SHIPPING_AUSPOSTAIR_HANDLING) + $insurance))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_AUSPOSTAIR_TEXT_ERROR; return $this->quotes; } } } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_AUSPOSTAIR_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } Quote Link to comment Share on other sites More sharing options...
insaini Posted July 21, 2007 Share Posted July 21, 2007 just working on international file atm... // class methods function quote($method = '') { global $order, $cart, $shipping_weight, $shipping_num_boxes, $total_weight; //$dest_country = $order->delivery['country']['iso_code_2']; $dest_country_array = tep_get_countries_iso($order->delivery['country_id'], true); $dest_country = $dest_country_array['countries_iso_code_2']; $dest_zone = 0; $error = false; // ONLY Other countries AUS HIDE if ($dest_country_array['countries_iso_code_2'] <> 'AU') { // ONLY Other countries AUS HIDE // if ($order->delivery['country']['iso_code_2'] <> 'AU') { // ONLY SHOWN IF LESS OR EQUAL TO MAX WEIGHT if ($shipping_weight <= MODULE_SHIPPING_AUSPOSTAIR_MAX_WEIGHT ) { $frompcode = MODULE_SHIPPING_AUSPOSTAIR_SPCODE; $topcode = $order->delivery['postcode']; //$dest_country=$order->delivery['country']['iso_code_2']; $sweight = $shipping_weight*1000; $swidth = MODULE_SHIPPING_AUSPOSTAIR_SWIDTH; $sheight = MODULE_SHIPPING_AUSPOSTAIR_SHEIGHT; $slength = MODULE_SHIPPING_AUSPOSTAIR_SDEPTH; $error = false; // If Insurance option selected - calculate insurance cost if (MODULE_SHIPPING_AUSPOSTAIR_INS_STATUS == 'True') { // Start with Base Cost $insurance = MODULE_SHIPPING_AUSPOSTAIR_INS_BASE ; if ($order->info['subtotal'] > MODULE_SHIPPING_AUSPOSTAIR_INS_UNIT) { $how_often = ceil((($order->info['subtotal'] - MODULE_SHIPPING_AUSPOSTAIR_INS_UNIT)/MODULE_SHIPPING_AUSPOSTAIR_INS_UNIT)); $insurance =+ MODULE_SHIPPING_AUSPOSTAIR_INS_BASE + ($how_often * MODULE_SHIPPING_AUSPOSTAIR_INS_ADD) ; } } // End calculating Insurance $url = "http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=$frompcode&Destination_Postcode=$topcode&Country=$dest_country&Weight=$sweight&Service_Type=AIR&Height=$sheight&Width=$swidth&Length=$slength&Quantity=$shipping_num_boxes"; $myfile = file($url); foreach($myfile as $vals) { $bits = split("=", $vals); $$bits[0] = $bits[1]; } if ($charge <= 0) { $error = true; } else { $handling = MODULE_SHIPPING_AUSPOSTAIR_HANDLING; if ($handling >0) { $handling_details = " $" . MODULE_SHIPPING_AUSPOSTAIR_HANDLING . " " .MODULE_SHIPPING_AUSPOSTAIR_TEXT_HANDLING; } else { $handling_details = ""; } if ($insurance >0) { $insurance_details = " $" .$insurance . " " .MODULE_SHIPPING_AUSPOSTAIR_TEXT_INSURANCE; } else { $insurance_details = ""; } if ($insurance == 0 && $handling == 0) { $auspostair_addons = ""; } else { $auspostair_addons = " (" . MODULE_SHIPPING_AUSPOSTAIR_TEXT_INCLUDE . $handling_details . $insurance_details . ") "; } $shipping_auspostair_method = MODULE_SHIPPING_AUSPOSTAIR_TEXT_WAY. " <b>" . $topcode . "</b> - " . $days . " " . MODULE_SHIPPING_AUSPOSTAIR_TEXT_SHIPPINGDAYS . "<br>" .$shipping_num_boxes . " " .MODULE_SHIPPING_AUSPOSTAIR_TEXT_BOXES . " " . $total_weight . MODULE_SHIPPING_AUSPOSTAIR_TEXT_UNITS . $auspostair_addons; $shipping_auspostair_cost = (($charge/1.1)* $shipping_num_boxes); } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_AUSPOSTAIR_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_auspostair_method, 'cost' => ($shipping_auspostair_cost + MODULE_SHIPPING_AUSPOSTAIR_HANDLING) + $insurance))); if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_AUSPOSTAIR_TEXT_ERROR; return $this->quotes; } } } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_AUSPOSTAIR_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } ok first find this if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } and change to if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country_id'], $order->delivery['zone_id']); } --------------- it seems I also am not setting the $total_weight correctly.. its a global variable but doesnt appear until after the code has requested a quote.. open your edit_orders.php file and place this under line 37 if (isset($_POST['total_order_weight'])) { $total_weight = $_POST['total_order_weight']; } else { $total_weight = 0; } Let me know how this works out. J Quote Link to comment Share on other sites More sharing options...
cgmaster Posted July 21, 2007 Share Posted July 21, 2007 Hey J, updated code.. but still not calculating any shipping cost even adding a new item and updating had no result, also noticed no handling fee being read, i do have a handling fee assigned in the customer side and all working fine there. You mentioned before re: functions in the catalog/includes/general.php etc would these maybe need to be mirrored in the admin side??? would that help or hinder??? just a thought Quote Link to comment Share on other sites More sharing options...
onkel_tom Posted July 22, 2007 Share Posted July 22, 2007 Hi Stew! I tried several times to edit the order editor Version 3.0.2.1 as you wrote for some other Users with the Contrib "ot_netto" installed but I didn't success with it. My problem is that the shipping costs are shown including tax (7,70€) but must be calculaed to the ot_netto wihtout tax (6.47€) but still added with 7,70€ (incl. tax) when I push update in the order editor. orders_total looks this way: ot_shipping => sort_order 1 ot_netto => sort_order 2 ot_tax => sort_order 3 ot_total => sort_order 4 These are the correct values when update button of order editor isn't klicked and this is the output when update button of order editor was klicked (without changing anything!) any idea what must be changed? Quote Link to comment Share on other sites More sharing options...
mkestphenson Posted July 22, 2007 Share Posted July 22, 2007 Im pretty sure that was the problem.. infact it looks like you only really need the flat.php shipping module because you seem to have that installed... but again.. any shipping module you install needs to be installed in both Admin and Catalog if you want to use the shipping module with the order editor Thanks for the response. That fixed the first error. I then got the error @ line 47 in the edit_orders.php file and I added include declaration you pointed out on page 104 of this thread: // include order cart class require(DIR_WS_CLASSES . 'order_cart.php'); Now I get this when I click the Edit button from the admin section (or the Confirm button when I try to create an order from admin section): 1054 - Unknown column 'p.products_weight_type' in 'field list' SELECT op.orders_products_id, op.products_name, op.products_model, op.products_price, op.products_tax, op.products_quantity, op.final_price, p.products_tax_class_id, p.products_weight, p.products_weight_type, p.products_dim_type, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, p.products_id FROM orders_products op INNER JOIN products p ON op.products_id = p.products_id WHERE orders_id = '16' ORDER BY op.orders_products_id [TEP STOP] Any suggestions greatly appreciated. _mike Quote Link to comment Share on other sites More sharing options...
insaini Posted July 22, 2007 Share Posted July 22, 2007 Thanks for the response. That fixed the first error. I then got the error @ line 47 in the edit_orders.php file and I added include declaration you pointed out on page 104 of this thread: // include order cart class require(DIR_WS_CLASSES . 'order_cart.php'); Now I get this when I click the Edit button from the admin section (or the Confirm button when I try to create an order from admin section): Any suggestions greatly appreciated. _mike Hi Mike, this was something I forgot to remove which was specific to my shipping module. edit oe_order.php you will see online 113 (around there) p.products_weight_type, p.products_dim_type, p.products_length, p.products_width, p.products_height, p.products_ready_to_ship, remove this section as well as on line 136 (around there) 'weight_type' => $products['products_weight_type'], 'dim_type' => $products['products_dim_type'], 'length' => $products['products_length'], 'width' => $products['products_width'], 'height' => $products['products_height'], 'ready_to_ship' => $products['products_ready_to_ship'], remove this section as well Quote 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.