Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2018
    Location
    Buenos Aires
    Posts
    10
    Plugin Contributions
    0

    Default zones and shipment

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]
    Hello everyone:
    My site is:http://www.schlabs.com.ar/sales2/
    Is a fresh install and i can say that until now is working ofline.
    I am stuck into some that must be simple, but i cant find how do:
    I dont know how configure the following shipping table cost. Based in the following zone:

    Live in Buenos Aires city: u$s 10
    Live in Buenos Aires nearby: u$s 12
    Live inside Argentine: u$s 15 up to 5kg u$s 20 up to 20kg.
    North and south America: u$s 30 up to 0.5kg, u$s60 up to 10kg
    Europe: u$s 35 up to 0.5kg, u$s60 up to 10kg
    Asia,Africa,Oceania: u$s45 up to 0.5kg, u$s70 up to 10kg

    I apreciate any help, and thanks in advance

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,474
    Plugin Contributions
    6

    Default Re: zones and shipment

    Make sure that Zone Rate is not installed ...

    Edit the file and around line 174 change the 3 to the number of Zone Definitions that you need:
    Code:
        $this->num_zones = 3;
    Now you can define the Zones, such as:
    Such as:

    2 code Country, is you need more than one country in a zone, separate by commas ...

    Shipping rates to Zone 1 destinations based on a group of maximum order weights/prices.
    Example: 3:8.50,25:5.50,10000:3.00
    Weight/Price/Item count less than or equal to 3 would cost 8.50 4-25 would cost 5.50 and 26+ would cost 3.00 to ship for Zone 1 destinations.
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Apr 2018
    Location
    Buenos Aires
    Posts
    10
    Plugin Contributions
    0

    Default Re: zones and shipment

    Thanks you !!!, i will do this.
    One aditional question is need add country by country (are more than 200).....
    one las question: Where i get the country number list?
    hehehe i will do a script

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,474
    Plugin Contributions
    6

    Default Re: zones and shipment

    Check the countries list and you will see the 2 code ISO 2 Codes ...

    If you need another definition for all other countries, add another definition and make the last one read:
    00

    and that will cover all countries not already listed ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Apr 2018
    Location
    Buenos Aires
    Posts
    10
    Plugin Contributions
    0

    Default Re: zones and shipment

    Thanks you.
    Now i leave a little contribution, is a little script that show the countrys by continent.
    Code:
    #!/usr/bin/perl
    $data_start = tell DATA;
    continent("AF"); #list Africa countrys
    continent("NA"); #list north America countrys
    continent("SA"); #list south America countrys
    continent("AS"); #list Asian countrys
    continent("EU"); #list European countrys
    continent("OC"); #list Oceany countrys
    
    sub continent{
        $cont=$_[0];
        $cont=~tr/a~z/A~Z/;
        my $line="";
        seek DATA, $data_start, 0;
        while(<DATA>){
            $reng=$_;
            chomp $reng;
            if(substr($reng,0,2)eq "#END"){last;};
            $cd=substr($reng,3,2);
    #        print "$reng -> $cd & $cont\n";
            if($cd eq $cont){
                $line=$line."".substr($reng,0,3);
     #           print "match $line\n";
            }
        }
        $line=substr($line,0,length($line)-1);
        print "Continent=$cont\n$line\n";
    }
    __END__
    #list obtained from https://dev.maxmind.com/geoip/legacy/codes/country_continent/
    __DATA__
    AD,EU
    AE,AS
    AF,AS
    AG,NA
    AI,NA
    AL,EU
    AM,AS
    AN,NA
    AO,AF
    AP,AS
    AQ,AN
    AR,SA
    AS,OC
    AT,EU
    AU,OC
    AW,NA
    AX,EU
    AZ,AS
    BA,EU
    BB,NA
    BD,AS
    BE,EU
    BF,AF
    BG,EU
    BH,AS
    BI,AF
    BJ,AF
    BL,NA
    BM,NA
    BN,AS
    BO,SA
    BR,SA
    BS,NA
    BT,AS
    BV,AN
    BW,AF
    BY,EU
    BZ,NA
    CA,NA
    CC,AS
    CD,AF
    CF,AF
    CG,AF
    CH,EU
    CI,AF
    CK,OC
    CL,SA
    CM,AF
    CN,AS
    CO,SA
    CR,NA
    CU,NA
    CV,AF
    CX,AS
    CY,AS
    CZ,EU
    DE,EU
    DJ,AF
    DK,EU
    DM,NA
    DO,NA
    DZ,AF
    EC,SA
    EE,EU
    EG,AF
    EH,AF
    ER,AF
    ES,EU
    ET,AF
    EU,EU
    FI,EU
    FJ,OC
    FK,SA
    FM,OC
    FO,EU
    FR,EU
    FX,EU
    GA,AF
    GB,EU
    GD,NA
    GE,AS
    GF,SA
    GG,EU
    GH,AF
    GI,EU
    GL,NA
    GM,AF
    GN,AF
    GP,NA
    GQ,AF
    GR,EU
    GS,AN
    GT,NA
    GU,OC
    GW,AF
    GY,SA
    HK,AS
    HM,AN
    HN,NA
    HR,EU
    HT,NA
    HU,EU
    ID,AS
    IE,EU
    IL,AS
    IM,EU
    IN,AS
    IO,AS
    IQ,AS
    IR,AS
    IS,EU
    IT,EU
    JE,EU
    JM,NA
    JO,AS
    JP,AS
    KE,AF
    KG,AS
    KH,AS
    KI,OC
    KM,AF
    KN,NA
    KP,AS
    KR,AS
    KW,AS
    KY,NA
    KZ,AS
    LA,AS
    LB,AS
    LC,NA
    LI,EU
    LK,AS
    LR,AF
    LS,AF
    LT,EU
    LU,EU
    LV,EU
    LY,AF
    MA,AF
    MC,EU
    MD,EU
    ME,EU
    MF,NA
    MG,AF
    MH,OC
    MK,EU
    ML,AF
    MM,AS
    MN,AS
    MO,AS
    MP,OC
    MQ,NA
    MR,AF
    MS,NA
    MT,EU
    MU,AF
    MV,AS
    MW,AF
    MX,NA
    MY,AS
    MZ,AF
    NA,AF
    NC,OC
    NE,AF
    NF,OC
    NG,AF
    NI,NA
    NL,EU
    NO,EU
    NP,AS
    NR,OC
    NU,OC
    NZ,OC
    O1,--
    OM,AS
    PA,NA
    PE,SA
    PF,OC
    PG,OC
    PH,AS
    PK,AS
    PL,EU
    PM,NA
    PN,OC
    PR,NA
    PS,AS
    PT,EU
    PW,OC
    PY,SA
    QA,AS
    RE,AF
    RO,EU
    RS,EU
    RU,EU
    RW,AF
    SA,AS
    SB,OC
    SC,AF
    SD,AF
    SE,EU
    SG,AS
    SH,AF
    SI,EU
    SJ,EU
    SK,EU
    SL,AF
    SM,EU
    SN,AF
    SO,AF
    SR,SA
    ST,AF
    SV,NA
    SY,AS
    SZ,AF
    TC,NA
    TD,AF
    TF,AN
    TG,AF
    TH,AS
    TJ,AS
    TK,OC
    TL,AS
    TM,AS
    TN,AF
    TO,OC
    TR,EU
    TT,NA
    TV,OC
    TW,AS
    TZ,AF
    UA,EU
    UG,AF
    UM,OC
    US,NA
    UY,SA
    UZ,AS
    VA,EU
    VC,NA
    VE,SA
    VG,NA
    VI,NA
    VN,AS
    VU,OC
    WF,OC
    WS,OC
    YE,AS
    YT,AF
    ZA,AF
    ZM,AF
    ZW,AF
    #END

  6. #6
    Join Date
    Apr 2018
    Location
    Buenos Aires
    Posts
    10
    Plugin Contributions
    0

    Default Re: zones and shipment

    Sorry, for refloat this post. But i still not sucess configuring shipping rates:
    Please look the following destination that i want:
    1) Buenos Aires
    2) Buenos Aires Nearby
    3) Argetine indoor
    4) America ( north&south)
    5) Europe
    6) Africa
    7) Asia
    8) Oceany

    NOTE1: removed cost to be more clear.
    Note 2: The zone 1,2,3 are domestic of ARgentine ( AR).
    Note 3: zones 4,5,6,7,8 are international. And do not care the province ( sub zone or region) because Fedex have the same cost for all country.
    Note 4: Argentinian law say that the prices must be showed with all taxes included. So my products have all argentinian taxes included, no extra calculation required: the showed is the paid.

    I try to setup zones.php
    Enable Zones Method: True
    Calculation Method: Weight
    Tax Class :Tax included

    Tax Basis Shipping
    Sort Order 0
    Skip Countries, use a comma separated list of the two character ISO country codes


    Zone 1 Countries
    AG,AI,AN,AW,BB,BL,BM,BS,BZ,CA,CR,CU,DM,DO,GD,GL,GP,GT,HN,HT,JM,KN,KY,LC,MF,MQ,MS ,MX,NI,PA,PM,PR,SV,TC,TT,US,VC,VG,VI,AR,BO,BR,CL,CO,EC,FK,GF,GY,PE,PY,SR,UY,VE
    Zone 1 Shipping Table
    0.5,31:1.0,35:1.5,38:2.0,43:2.5,47
    Zone 1 Handling Fee 0
    Handling Per Order or Per Box Zone 1 (when by weight) Order

    Zone 2 Countries
    AD,AL,AT,AX,BA,BE,BG,BY,CH,CZ,DE,DK,EE,ES,EU,FI,FO,FR,FX,GB,GG,GI,GR,HR,HU,IE,IM ,IS,IT,JE,LI,LT,LU,LV,MC,MD,ME,MK,MT,NL,NO,PL,PT,RO,RS,RU,SE,SI,SJ,SK,SM,TR,UA,V A
    Zone 2 Shipping Table
    0.5,36:1.0,48:1.5,52:2.0,57:2.5,65

    Zone 2 Handling Fee 0
    Handling Per Order or Per Box Zone 2 (when by weight) Order

    Zone 3 Countries
    AE,AF,AM,AP,AZ,BD,BH,BN,BT,CC,CN,CX,CY,GE,HK,ID,IL,IN,IO,IQ,IR,JO,JP,KG,KH,KP,KR ,KW,KZ,LA,LB,LK,MM,MN,MO,MV,MY,NP,OM,PH,PK,PS,QA,SA,SG,SY,TH,TJ,TL,TM,TW,UZ,VN,Y E
    Zone 3 Shipping Table
    0.5,47:1.0,54:1.5,60:2.0,67:2.5:73

    Zone 3 Handling Fee 0
    Handling Per Order or Per Box Zone 3 (when by weight) Order

    Zone 4 Countries
    AS,AU,CK,FJ,FM,GU,KI,MH,MP,NC,NF,NR,NU,NZ,PF,PG,PN,PW,SB,TK,TO,TV,UM,VU,WF,WS
    Zone 4 Shipping Table
    0.5,40:1.0,54:1.5,60:2.0,67:2.5:73

    Zone 4 Handling Fee 0
    Handling Per Order or Per Box Zone 4 (when by weight) Order

    Zone 5 Countries
    AO,BF,BI,BJ,BW,CD,CF,CG,CI,CM,CV,DJ,DZ,EG,EH,ER,ET,GA,GH,GM,GN,GQ,GW,KE,KM,LR,LS ,LY,MA,MG,ML,MR,MU,MW,MZ,NA,NE,NG,RE,RW,SC,SD,SH,SL,SN,SO,ST,SZ,TD,TG,TN,TZ,UG,Y T,ZA,ZM,ZW

    Zone 5 Shipping Table
    0.5,40:1.0,54:1.5,60:2.0,67:2.5:73

    Zone 5 Handling Fee 0
    Handling Per Order or Per Box Zone 5 (when by weight) Order

    Zone 6 Countries
    AR

    Zone 6 Shipping Table
    3:8.50,7:10.50,99:20.00
    As you can see in the attached snapshot the shipping cost result is zero.
    At this point i am lost completely lost. I appreciate any help.

    Best Regards to everyone
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screenshot_20180421_155634.jpg 
Views:	39 
Size:	51.5 KB 
ID:	17811   Click image for larger version. 

Name:	Screenshot_20180421_155936.jpg 
Views:	23 
Size:	51.8 KB 
ID:	17812  

  7. #7
    Join Date
    Jul 2012
    Posts
    14,383
    Plugin Contributions
    17

    Default Re: zones and shipment

    The first entry of each of your zone price list items essentially evaluates to 0, although also is not in the format that is expected throughout.
    Code:
    0.5,36:1.0,48:1.5,52:2.0,57:2.5,65
    Items to price should be a number followed by a colon followed by the price that should be charged for items that are less than or equal to the criteria. In the above example, weight is used. Therefore the first entry 0.5 is like saying anything that weighs 0.5 or less is free. Anything then greater than 0.5 but less than 30 is charged 1. I'm not able to clearly see the information of the image so can not tell what the weight of the item is to determine what fee should be attempted let alone knowing to which region it was attempted, just that it resolves to 0.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  8. #8
    Join Date
    Apr 2018
    Location
    Buenos Aires
    Posts
    10
    Plugin Contributions
    0

    Default Re: zones and shipment

    Thans you.
    I was inspecting zones.php and add DBG MESSAGES:
    DBG:dest_country= US (received as parameter)
    DBG:dest_zone=1 (was finded US in the zone 1, GREAT)
    DBG:box_weight=4 (received as global variable) ERROR, the shipment weight is 1kg.
    zones_cost=0.00:31 , 0.5:31 , 1.0:35 , 1.5:38 , 2.0:43 , 2.5:47 , 100:47
    DBG:weight= 0.5, price=31 (test if is weight is lower than 0.5)
    DBG:weight= 1.0, price=35
    DBG:weight= 1.5, price=38
    DBG:weight= 2.0, price=43
    DBG:weight= 2.5, price=47
    DBG:weight= 100, price=47
    DBG:weight= 100, price=47 MATCH (4lbs match into this scale)

    Result on screen $47.

    Where the system calculate shipment weight? where the system convert 1kg to 4kg package?
    Note: if i take a shipment of 0.5kg the zones.php search for 3.5. As conclusion i can say that the system search 3kg+shipment _weight

    Thanks you all

  9. #9
    Join Date
    Jul 2012
    Posts
    14,383
    Plugin Contributions
    17

    Default Re: zones and shipment

    Suggest looking at this FAQ about how weight is off by a value of 3: https://www.zen-cart.com/content.php...unds-too-heavy
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  10. #10
    Join Date
    Apr 2018
    Location
    Buenos Aires
    Posts
    10
    Plugin Contributions
    0

    Default Re: zones and shipment

    Dear:
    Many thanks for all help. I have zones.php almost working.

    Now, the module is capable to find the destination country, calculate the weight and calculate the shipping.
    BUT, still cant manage the domestic shipment ( based in zones).
    I only split 3 zones:
    zone 1: My city ( i go with the box)
    zone 2: Near to my city (i go with the box but at more cost)
    zone 3: Out of my radious (normally pay on destination)

    the 3 zones have flat cost under the own zone.
    As i can find into the zones.php the search is only on destination country but i cant split the same country.
    I try to add the internally defined zones to the module taking:
    $order->delivery['zone_id']

    But i see that when is a registered customer no zone to edit.

    Any help will be appreciated?

    Contribution with software: i found that the zones have not name. So i modify zones.php to add a name to each zone. For example: zone 1 name = "FedEx to Europe"
    Code:
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Zone " . $i ." name', 'MODULE_SHIPPING_ZONES_NAMES_" . $i ."', 'Example Shipper company', 'text to show to the customer about zone " . $i . ".<br />Example: Mail to Africa.', '6', '0', 'zen_cfg_textarea(', now())");
    I cannot attach the zones.php but i can contribute with them.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Zones, Sub Zones and Zone Rates
    By jagall in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 7 May 2011, 12:44 AM
  2. Multiple shipment origins- CA and US.??? Possible???
    By northlandlodge in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 9 Jun 2007, 04:21 AM
  3. product and shipment in different currencies
    By leticia2602 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 25 May 2007, 11:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR