GaryPigott Posted September 19, 2002 Share Posted September 19, 2002 I currently currently just use the flat rate shipping module on my store (http://www.orlogix.com) which is fine for most of my orders which originate from western Europe. However a small percentage are from places like Mexico and Australia, and these shipments *cost*. I'd like to use the zone rates module, using 4 zones for European shipments (to match DHL's 4 shipping zones) and have a fifth zone for everywhere else. Here's the problem....the Shipping Zome module has a limit of 255 characters for each zone's country list. In theory I need to be able to ship anywhere. That leaves 225 countries in zone 5, which is 674 characters, which won't work. The other solution would be to use the flat rate module to cover zone 5. However the zone rates module messes this up too...If a country isn't specified, it lists a charge of $0.00 rather than not appearing at all. Any ideas? Idealy I need a way of extending the 255 character limit...This appears to be a limit in the PHP code, not the database, where the details of each country's coresponding zone is in a list in "zones_to_geo_zones" Gary "Verbogeny is one of the pleasurettes of a creatific thinkerizer." - Peter da Silva Link to comment Share on other sites More sharing options...
Ian Posted September 19, 2002 Share Posted September 19, 2002 Gary, What you could do is just define the 4 zones as you suggest, then alter the code in the zones class to give a catch all figure. At the moment the code gives azero cost and an error msg if the destination is not in any of the zones. if ($dest_zone == 0) { $shipping_zones_cost = 0; $shipping_zones_method = MODULE_SHIPPING_ZONES_INVALID_ZONE; return; } Just change this to something like if ($dest_zone == 0) { $shipping_zones_cost = 200; // cost for shipping everywhere else $shipping_zones_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country; return; } Should work. Trust me, I'm an Accountant. Link to comment Share on other sites More sharing options...
burt Posted September 19, 2002 Share Posted September 19, 2002 This is a MySQL database limitation. Easy to get around though :) Change from varchar(255) to longtext Sorted. HTH :) Link to comment Share on other sites More sharing options...
GaryPigott Posted September 19, 2002 Author Share Posted September 19, 2002 Hi Ian, I made the changes you suggested and it got me some of the way there....I sell software by download also, and so I use Linda McGrath's download controller mod. This has its own free shipping module for items of zero weight. It doesn't display anything in the checkout process if the item's weight > 0, however because there really is two shipping options, zone and free (hidden) there will always be a radio button next to the zone class....now here's the kicker...the radio button was unselected, so unless you selected it, no shipping gets charged....<boggle> Then I tried something silly....I disabled the free shipping class entirely and in the zone rates shipping module I added a rate for zero weigh shipments of $0.00 in zone 1 (just zone 1). If the weight is > 0 shipping is charged at the correct rate, and if the weight = 0 no shipping is charged, regardless of which zone the customer is in...so it now works...I don't know why. By the way Burt, checks the database...the countries in a particular zone are not stored in a single field so it's not a database limitation.... It?s not: zone countries 1 IE,UK 2 BE,FR,DE,NL... ... It?s: zone country 1 IE 1 UK 2 BE ... Gary (confused) "Verbogeny is one of the pleasurettes of a creatific thinkerizer." - Peter da Silva Link to comment Share on other sites More sharing options...
benspun Posted October 31, 2006 Share Posted October 31, 2006 This is a MySQL database limitation. Easy to get around though :)Change from varchar(255) to longtext Sorted. HTH :) I have currently having this shipping zone 255 character limitation issue, and I though of changing, as you suggested, from varchar(255) to longtext. But since this is the table configuration, with a lot of other entries, I am wondering if it will affect the good functionning of osCommerce in other ways, as all the entries will be changed from varchar(255) to longtext. And if it won't affect anything, then do you know for which reason it wasn't already put to longtext instead of a limitative 255 characters? Thanks for any reply (even though this thread is pretty old!) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.