Hendriks Posted January 27, 2005 Share Posted January 27, 2005 Ah sorry, I forgot to put in multi package support. It should be fixed now: http://www.oscommerce.com/community/contributions,2571 <{POST_SNAPBACK}> Thanks Dreamscape for this wonderful contribution. It was just what I needed. The multipackage bugfix fixed the shipping costs, which are OK now. However, during checkout I want to display the right weigth and right now it shows only half the weight. I can't figure out where OSC calculates the $shipping_weight. Does anybody have an idea how to fix this? Thanks a lot. Jeroen Quote Link to comment Share on other sites More sharing options...
JoeMcManus Posted January 27, 2005 Share Posted January 27, 2005 Goedenavond Jeroen, I happened to have hacked my way through what I asked just above and have found solutions to most of my 'issues' with this contributions. Haven't got round to the postcode referencing but I did code a 'free delivery per product' work around. By doing this I found out where the weight is calculated. in includes/modules/shipping/mzmt.php do a search for $shipping_weight and you'll find it. It gets it from the $orders. Part is done in classes/shipping.php but I believe the chosen module overrides this. You might want to have a look though. If it only shows half; are you sure you gave each and every item a weight? Did you add $shipping_weight to the globals like: // class methods function quote($method = '') { global $order, $shipping_weight; in that same file? By doing so it will actually display it, makes it easier for debugging. admin/configuration/shipping max weight gave me some strange behaviour. It added the percentage even when I set the max weight to 10000000. You might want to set the percentage to 0 to see if it helps. Quote Johan a.k.a. T0PS3O elsewhere. Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though... Link to comment Share on other sites More sharing options...
Hendriks Posted January 27, 2005 Share Posted January 27, 2005 Goedenavond Jeroen, I happened to have hacked my way through what I asked just above and have found solutions to most of my 'issues' with this contributions. Haven't got round to the postcode referencing but I did code a 'free delivery per product' work around. By doing this I found out where the weight is calculated. in includes/modules/shipping/mzmt.php do a search for $shipping_weight and you'll find it. It gets it from the $orders. Part is done in classes/shipping.php but I believe the chosen module overrides this. You might want to have a look though. If it only shows half; are you sure you gave each and every item a weight? Did you add $shipping_weight to the globals like: // class methods ? ?function quote($method = '') { ? ? ?global $order, $shipping_weight; in that same file? By doing so it will actually display it, makes it easier for debugging. admin/configuration/shipping max weight gave me some strange behaviour. It added the percentage even when I set the max weight to 10000000. You might want to set the percentage to 0 to see if it helps. <{POST_SNAPBACK}> Hello Joe, Thanks for your quick reply. The shipping weight is displayed (i had already made $shipping_weight global). Everything is OK until the weigth of the order exceeds the max weight set in ADMIN. OSC then splits the weight in two equal parts and sets the number of packages to 2. From that moment on $shipping_weight is half the actual weight. The MZMT module then multiplies this with the number of packages (this is the section you're referring to, if i'm not mistaken). My idea was to prevent OSC from splitting the $shipping_weight at all and use the actual weight all the time (and let MZMT *divide* this amount by the number of packages when calculating the shipping costs). This seems more reliable to me than working with a wrong weight... This is why I would like to find out where OSC manipulates this $shipping_weight. Excuse me if my English explanation is a bit fuzzy, I hope you understand what i mean... :unsure: Regards, Jeroen Quote Link to comment Share on other sites More sharing options...
JoeMcManus Posted January 28, 2005 Share Posted January 28, 2005 You will probably have to look at line 60 in includes/classes/shipping.php. That's where it splits it. Quote Johan a.k.a. T0PS3O elsewhere. Contributed Barclay's ePDQ Payment Module though not originally mine. Made it work though... Link to comment Share on other sites More sharing options...
dreamscape Posted January 28, 2005 Author Share Posted January 28, 2005 Where it displays the $shipping_weight to the user, change it to ($shipping_weight * $shipping_num_boxes) You'll need to add $shipping_num_boxes to the global for the quote function as well. Sorry about that. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
Hendriks Posted January 28, 2005 Share Posted January 28, 2005 Where it displays the $shipping_weight to the user, change it to ($shipping_weight * $shipping_num_boxes) You'll need to add $shipping_num_boxes to the global for the quote function as well. Sorry about that. <{POST_SNAPBACK}> Hi Dreamscape, Thanks a lot. It works like a charm.. Once again, great contibution! Quote Link to comment Share on other sites More sharing options...
iecwillow Posted February 1, 2005 Share Posted February 1, 2005 I was trying to add 2 more geo zones, so I uninstalled MultiGeoZone MultiTable Shipping Module first, and then modified mzmt.php in catalog\includes\languages\english\modules\shipping: <?php /* $Id: mzmt.php,v 1.000 2004-10-29 Josh Dechant Exp $ Copyright (c) 2004 Josh Dechant osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Protions Copyright (c) 2003 osCommerce Released under the GNU General Public License *//* Create text & icons for geo zones and their tables following template below where $n = geo zone number (in the shipping module) and $j = table number MODULE_SHIPPING_MZMT_GEOZONE_$n_TEXT_TITLE MODULE_SHIPPING_MZMT_GEOZONE_$n_ICON MODULE_SHIPPING_MZMT_GEOZONE_$n_TABLE_$j_TEXT_WAY Sample is setup for a 3x3 table (3 Geo Zones with 3 Tables each) */ define('MODULE_SHIPPING_MZMT_TEXT_TITLE', 'MultiGeoZone MultiTable'); define('MODULE_SHIPPING_MZMT_TEXT_DESCRIPTION', 'Multiple geo zone shipping with multiple tables to each geo zone.'); define('MODULE_SHIPPING_MZMT_GEOZONE_1_TEXT_TITLE', 'United States Postal Service (USPS)'); define('MODULE_SHIPPING_MZMT_GEOZONE_1_ICON', ''); define('MODULE_SHIPPING_MZMT_GEOZONE_1_TABLE_1_TEXT_WAY', 'Insured First Class Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_1_TABLE_2_TEXT_WAY', 'Insured Priority Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_1_TABLE_3_TEXT_WAY', 'Insured Express Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_2_TEXT_TITLE', 'United States Postal Service (USPS)'); define('MODULE_SHIPPING_MZMT_GEOZONE_2_ICON', ''); define('MODULE_SHIPPING_MZMT_GEOZONE_2_TABLE_1_TEXT_WAY', 'Insured Priority Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_2_TABLE_2_TEXT_WAY', 'Insured Express Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_2_TABLE_3_TEXT_WAY', ''); define('MODULE_SHIPPING_MZMT_GEOZONE_3_TEXT_TITLE', 'United States Postal Service (USPS)'); define('MODULE_SHIPPING_MZMT_GEOZONE_3_ICON', ''); define('MODULE_SHIPPING_MZMT_GEOZONE_3_TABLE_1_TEXT_WAY', 'Insured Priority Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_3_TABLE_2_TEXT_WAY', 'Insured Express Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_3_TABLE_3_TEXT_WAY', ''); define('MODULE_SHIPPING_MZMT_GEOZONE_4_TEXT_TITLE', 'United States Postal Service (USPS)'); define('MODULE_SHIPPING_MZMT_GEOZONE_4_ICON', ''); define('MODULE_SHIPPING_MZMT_GEOZONE_4_TABLE_1_TEXT_WAY', 'Global Priority Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_4_TABLE_2_TEXT_WAY', 'Registered Airmail'); define('MODULE_SHIPPING_MZMT_GEOZONE_4_TABLE_3_TEXT_WAY', 'Global Express Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_5_TEXT_TITLE', 'United States Postal Service (USPS)'); define('MODULE_SHIPPING_MZMT_GEOZONE_5_ICON', ''); define('MODULE_SHIPPING_MZMT_GEOZONE_5_TABLE_1_TEXT_WAY', 'Global Priority Mail'); define('MODULE_SHIPPING_MZMT_GEOZONE_5_TABLE_2_TEXT_WAY', 'Registered Airmail'); define('MODULE_SHIPPING_MZMT_GEOZONE_5_TABLE_3_TEXT_WAY', 'Global Express Mail'); ?> After uploaded and re-installed MultiGeoZone MultiTable Shipping Module, there are still only 3 geo zones shows in Admin/Modules/Shipping. Am I missing anything or did anything wrong? Please help. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
dreamscape Posted February 1, 2005 Author Share Posted February 1, 2005 After uploaded and re-installed MultiGeoZone MultiTable Shipping Module, there are still only 3 geo zones shows in Admin/Modules/Shipping. Am I missing anything or did anything wrong? Please help. Thanks in advance. <{POST_SNAPBACK}> The language file does not tell the module how many geo zones you have. You have to define this in Admin -> Configuration -> MultiGeoZone MultiTable Shipping Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
iecwillow Posted February 1, 2005 Share Posted February 1, 2005 Thanks for the promptly support and thanks for the great contribution. Quote Link to comment Share on other sites More sharing options...
loveacrossborders Posted February 12, 2005 Share Posted February 12, 2005 (edited) Oh boy, We've run into a major snag using MultiGeoZone MultiTable Shipping Module. First, I will admit that it's completely our fault :(. We spent WEEKS compiling all of the shipping information that we needed to build shipping rates for every country. See, we're planning to ship from Thailand, where we live, and the rates vary greatly from country to country. Here is an example table: 10:.65,50:.65,75:.88,100:1.11,125:1.34,150:1.57,175:1.8,200:2.03,225:2.26,250:2.49,275:2.72,300:2.95,325:3.18,350:3.41,375:3.64,400:3.87,425:4.1,450:4.33,475:4.56,500:4.79,525:5.02,550:5.25,575:5.48,600:5.78,625:5.94,650:6.17,675:6.4,700:6.63,725:6.86,750:7.19,775:7.42,800:7.65,825:7.78,850:8.01,875:8.24,900:8.47,925:8.7,950:8.93,975:9.33,1000:9.39,1025:9.62,1050:10.00,1100:10.46,1125:10.70,1150:10.94,1175:11.17,1200:11.40,1225:11.63,1250:11.86,1275:12.09,1300:475,1325:12.32,1350:12.55,1375:13.04,1400:13.28,1425:13.51,1450:13.74,1475:13.97,1500:14.2,1525:14.43,1550:14.66,1575:14.89,1600:15.12,1625:15.35,1650:15.58,1675:15.81,1700:16.04,1725:16.27,1750:16.5,1775:16.73,1800:16.96,1825:17.19,1850:17.42,1875:17.65,1900:17.95,1925:18.18,1950:18.41,1975:18.90,2000:19.20,2001:24.5,3001:27.7,4001:31.4,5000:31.4 Now, what I didn't realize is that we'd be limited in how long the shipping table can be. So, if I enter the table above into MTMZ, it gets cut off at around 775:7.42 :(. I'm hoping (praying even) that there's some way, some option to extend the length of the table. We've worked so hard to give up now :(. I'm still learning my way around MySQl and php, but I'm getting pretty familiar with things. How could I alter the length of how long the MTMZ tables are allowed to be? Is there something that I can change in the MySQL database or in MTMZ.php? Shaun and Nat [email protected] AIM - applesbliss YIM - loveacrossborders Edited February 12, 2005 by loveacrossborders Quote Link to comment Share on other sites More sharing options...
Chuckler Posted February 13, 2005 Share Posted February 13, 2005 I'm having a prob with the way MZMT (I think it's MZMT) calculates the shipping tax. eg. Item 1 ... $452.60 Shipping .$ 9.90 Subtotal . $461.60 Tax.........$ 42.05 Total.......$462.50 In this example, Item 1 is $452.60 including 10% tax. Shipping is $9.90 including 10% tax. The subtotal should be $462.50, and the Tax should be $42.95. Am I correct that this is a MZMT problem? I just guessed because the missing amount in both columns is the tax on the shipping. :-" I've also applied dman_3021's fix from this thread: http://www.oscommerce.com/forums/index.php?showtopic=74679&hl to make the subtotal tax inclusive, so maybe it's there. ?? Quote Link to comment Share on other sites More sharing options...
dreamscape Posted February 13, 2005 Author Share Posted February 13, 2005 The shipping module itself does not calculate tax. MZMT is setup to have tax applied like any other shipping module, if you have selected a tax class for it, but it does not do the calculation itself. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
loveacrossborders Posted February 13, 2005 Share Posted February 13, 2005 Hi dreamscape, I wonder if you know of a solution to our problem at the bottom of page three. Cheers! Quote Link to comment Share on other sites More sharing options...
dreamscape Posted February 13, 2005 Author Share Posted February 13, 2005 (edited) Hi dreamscape, I wonder if you know of a solution to our problem at the bottom of page three. Cheers! <{POST_SNAPBACK}> Check your PM box. Edited February 13, 2005 by dreamscape Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
WebPixie Posted February 21, 2005 Share Posted February 21, 2005 Check your PM box. <{POST_SNAPBACK}> This mod is exactly what my shop needed, but I was wondering if anyone had gotten it to work with "ship in cart". I would like to show in the cart what the shipping would be for my default country. Seems like it should be so easy since it's just based on the total price or item number..... but ship in cart mod just shows the Geo Zone 3 no matter what. Anyone know how to get it to use Geo Zone 1 for those customers who aren't logged in yet? Quote Link to comment Share on other sites More sharing options...
tonyClifton Posted March 2, 2005 Share Posted March 2, 2005 Hi everyone, new here, but long time instaling and developing osComerce. I installed this great contribution (Thanks dreamscape!) but I found the following, i have read the entire post and it looks it only happens to me :-( so I think I'm doing something wrong... If I set the shipping by weight everything works fine, but if I do it by price no shipping costs are displayed nor added to the order. I think I'm doing everything right, this is the shipping costs table I have configured: .5:5.97,1:6.96,1.5:7.95,2:8.94,2.5:0 Thanks in advance! Quote Link to comment Share on other sites More sharing options...
dreamscape Posted March 2, 2005 Author Share Posted March 2, 2005 tonyClifton, your table is setup that if anyone buys something that costs $2.50 or more, they are not charged for shipping. Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
puckett_jw Posted March 2, 2005 Share Posted March 2, 2005 Rate based on weight. We are considering using the weight fiield to base shipping on, but mirror the cost value into the weight field, except for a few items that we want to ship for free (I posted about this a while back). Anyhow, in doing some testing, there is a rounding issue that is driving us nuts. We have set the package weight to 0 & the maximum package weight through the roof, but it system (OSC or MZMT?) is rounding the wieght to the nearest whole number, which puts some orders in the wrong shipping bracket. Anyone have any suggestions? Quote Link to comment Share on other sites More sharing options...
tonyClifton Posted March 2, 2005 Share Posted March 2, 2005 >_< Doh! I changed it, 29.99:9.00,30.00:0. If I choose weight it works fine, but I have the same problem. If you choose count or price no shipping costs are displayed on the checkout shipping page nor added to the order total (checkout_shipping.php). tonyClifton, your table is setup that if anyone buys something that costs $2.50 or more, they are not charged for shipping. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
artifex_canada Posted March 5, 2005 Share Posted March 5, 2005 Same problem here. And I've uninstalled and reinstalled the module just to be sure. I'm only working with 2 zones (Canada, USA) USA 17:15,10000:0 Canada 39:9,10000:0 Essentially a minimum order amount for free shipping, but the minimum varies depending on if you're from the US or Canada. I can get it to work with the default "table method" shipping, but that's only good for one zone. >_< Doh!I changed it, 29.99:9.00,30.00:0. If I choose weight it works fine, but I have the same problem. If you choose count or price no shipping costs are displayed on the checkout shipping page nor added to the order total (checkout_shipping.php). <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
dreamscape Posted March 5, 2005 Author Share Posted March 5, 2005 USA17:15,10000:0 Canada 39:9,10000:0 Essentially a minimum order amount for free shipping, but the minimum varies depending on if you're from the US or Canada. I can get it to work with the default "table method" shipping, but that's only good for one zone. <{POST_SNAPBACK}> The required amount for free shipping is the same on both of those: 10000 Assuming this is weight, and taking your USA table, what you have put it 17 or more pounds, charge $15. 10,000 or more pounds, give free shipping. If a person's order is less than 17 pounds, it will not calculate, because according to your table, there is nothing to calculate for under 17 pounds. I do not do my tables the same as the default osCommerce table module does... it does the dumb "up to but not including x amount:charge". I make mine so they work like "x amount or more:charge" I have explained that in the instructions, which it always helps to read carefully when you have a problem ;) Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
artifex_canada Posted March 5, 2005 Share Posted March 5, 2005 <light goes on> You only notice these things AFTER you click "Post" and are making that final check after having already previewed it. This mod works opposite to the built-in "table method" which reads "17:15,10000:0" as "up to 17 dollars is a 15 dollar shipping charge... 17.01 to 10,000 dollars is free shipping". The same setup with this mod (for price) would be written as "0.01:15,17.01:0" or "orders of value greater than or equal to $0.01 but less than the [next value] are $15 shipping, orders greater than or equal to $17.01 [which is the aforementioned 'next value'] are free shipping". Clear as mud? I'm terrible at explaining things to anyone but myself... Same problem here. And I've uninstalled and reinstalled the module just to be sure. I'm only working with 2 zones (Canada, USA) USA 17:15,10000:0 Canada 39:9,10000:0 Essentially a minimum order amount for free shipping, but the minimum varies depending on if you're from the US or Canada. I can get it to work with the default "table method" shipping, but that's only good for one zone. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
dreamscape Posted March 5, 2005 Author Share Posted March 5, 2005 >_< Doh!I changed it, 29.99:9.00,30.00:0. If I choose weight it works fine, but I have the same problem. If you choose count or price no shipping costs are displayed on the checkout shipping page nor added to the order total (checkout_shipping.php). <{POST_SNAPBACK}> Under the counting method that table reads as 29.99 or more items, charge $9. 30 or more items, free shipping. The only way to be charged for shipping would be to have between 29.99 and 30 items in the cart... how can you have .001 of an item? Less than 29.99 items, there is nothing in the table for that, so there will be no quotes displayed. Under price, it reads the same. $29.99 or more charge $9. $30 or more, give free shipping. Less than $29.99 is not accounted for, and therefore, no quotes will be displayed if the cost is less than $29.99. And it is free for $30 or more. So according to your table, the only way to be charged for shipping is if your cart subtotal is exactly $29.99 Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
dreamscape Posted March 5, 2005 Author Share Posted March 5, 2005 (edited) The same setup with this mod (for price) would be written as "0.01:15,17.01:0" or "orders of value greater than or equal to $0.01 but less than the [next value] are $15 shipping, orders greater than or equal to $17.01 [which is the aforementioned 'next value'] are free shipping". That is really a complicated way to think about it. Using that table, if you read it as "1 or more cents, charge $17.... $17.01 or more, give free shipping," you will save yourself from becoming confused ;) I have also made it so that you can put $$ signs in the table to make it easier to read at a glance.... like: .01:$15,17.01:$0 Edited March 5, 2005 by dreamscape Quote The only thing necessary for evil to flourish is for good men to do nothing - Edmund Burke Link to comment Share on other sites More sharing options...
artifex_canada Posted March 6, 2005 Share Posted March 6, 2005 Well semantics really. "1 or more cents" did confuse me, because it doesn't tell me where it stops. $17.01 is still, technically, more than one cent. That is really a complicated way to think about it. Using that table, if you read it as "1 or more cents, charge $17.... $17.01 or more, give free shipping," you will save yourself from becoming confused ;) I have also made it so that you can put $$ signs in the table to make it easier to read at a glance.... like: .01:$15,17.01:$0 <{POST_SNAPBACK}> 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.