Results 1 to 4 of 4
  1. #1
    Join Date
    May 2008
    Location
    Kenilworth Qld Australia
    Posts
    21
    Plugin Contributions
    0

    Default Zone awareness causes my module to go red

    I am writing a courier shipping module for e-go.com.au and all seems to be working OK, except:-

    When I added geo zone awareness by copying the code from the flat module, changing the constant to match my new modules naming convention, added the setting to the install function and keys function, the coloured circle in the admin panel goes red if I select a shipping zone. If I leave it as -none-, then the circle goes green.

    The same shipping zone settings in the flat or item shipping modules do not have this effect. So I am guessing it is not something to do with the zone settings in the DB. But I could be wrong.

    Even though the circle is red when a zone is set (in my e-go module), if I change my shipping address between Australia and USA then the correct behaviour happens. By this I mean that only modules whose zones have been set to USA or -none- show up in the checkout and shipping estimator when I set my address to USA. Similarly, only modules (including my e-go one) that have Australia zone selected or -none- show up when the address is Australia.

    But I really like things to work properly, so need to track down why the module seems to enable and disable itself properly, but still have the circle red.

    I have searched here and in Google for a couple of hours now to no avail.
    Cheers, Graham

  2. #2
    Join Date
    May 2008
    Location
    Kenilworth Qld Australia
    Posts
    21
    Plugin Contributions
    0

    Default Re: Zone awareness causes my module to go red

    I figured it out.

    I was setting $this->sort_order after the zone check code in the class init function.
    The zone checking test runs in admin when it does not have the $order available. So therefore sets $this->enabled to false.

    So I moved the sort_order to above the zone checking and the icon went yellow.

    This is still not ideal as I think that yellow means installed but not enabled. The icon goes green when no shipping zone is set, and yellow when it is. BTW, the flat rate and per item do the same.

    So the answer was to add a condition in the zone check for IS_ADMIN_FLAG != true so it does not do this check in admin.

    All good now I think.
    Cheers, Graham

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Zone awareness causes my module to go red

    Yellow also means you set a Zone on a module ... so that doesn't mean it isn't enabled ...

    If it isn't working, check the Zone Definition and check its DETAILS ...
    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!]
    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!

  4. #4
    Join Date
    May 2008
    Location
    Kenilworth Qld Australia
    Posts
    21
    Plugin Contributions
    0

    Default Re: Zone awareness causes my module to go red

    Thanks for pointing that out Linda. I'll take out that "is not admin" check so it goes yellow when a zone is set. That is a useful visual aid when looking at the shipping module list.
    Cheers, Graham

 

 

Similar Threads

  1. Zone Rates Module causes blank Checkout
    By Callum H in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 4 Aug 2011, 08:57 AM
  2. Adding a zone in Zone Rates module
    By ampm11 in forum General Questions
    Replies: 2
    Last Post: 13 Dec 2010, 05:18 PM
  3. Custom Zone Definitions, ISO Code, and the Zone Rate Module
    By coffeefan in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 16 Jul 2009, 10:47 PM
  4. FedEx module causes my ZC1.3.8 cart to hang
    By DMSerley in forum Built-in Shipping and Payment Modules
    Replies: 15
    Last Post: 8 Apr 2008, 03:30 AM

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