Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2005
    Posts
    114
    Plugin Contributions
    0

    Default zones particular setup

    Hello,

    I've successfully duplicated zones.php to zones1.php (from includes/modules/shipping/) an also successfully duplicated the languages.

    All works fine except for one thing : this new zones is for package under 2kg.

    I want when the customer cart goes over 2kg this second shipping option disappears.

    thank you

  2. #2
    Join Date
    Jul 2005
    Posts
    114
    Plugin Contributions
    0

    Default Re: zones particular setup

    I think by tweaking something here I could achieve what I want (I tried some things but it never worked) :

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_ZONES1_STATUS == 'True') ? true : false);
    }

    All I want is to make my zones shipping clone disappear when the package weight exceed 2kg.

    thank you very much

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

    Default Re: zones particular setup

    That would be the section to address ... if the weight is > 2 then don't enable it ...
    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!

  4. #4
    Join Date
    Jul 2005
    Posts
    114
    Plugin Contributions
    0

    Default Re: zones particular setup

    Another question, I see what you mean but I don't find the right code to tell zen 'weight'.
    I think that >= 2 zen would understand this.

    thank you

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: zones particular setup

    Try something like this:
    Code:
          global $shipping_weight;
          if ($shipping_weight >= 2) {
            $this->enabled = false;
          }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jul 2005
    Posts
    114
    Plugin Contributions
    0

    Default Re: zones particular setup

    I tried many setups with this code here :

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
    $this->enabled = ((MODULE_SHIPPING_ZONES1_STATUS == 'True') ? true : false);
    }

    But it still don't works

    I tried to replace original part of code with yours, don't works, putting above, nothing, below nothing and some tweaks that didn't works ;(

    thank you

  7. #7
    Join Date
    May 2008
    Posts
    96
    Plugin Contributions
    0

    Default Re: zones particular setup

    Was a solution found for this?

    I been trying to put that code in but the cart will end up either a white page or no effect

  8. #8
    Join Date
    May 2008
    Posts
    96
    Plugin Contributions
    0

    Default Re: zones particular setup

    Nvm found the answer:

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code) and $_SESSION['cart']->show_weight() <= 2) {
    $this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
    }

  9. #9
    Join Date
    May 2008
    Posts
    96
    Plugin Contributions
    0

    Default Re: zones particular setup

    crap now the admin module is screwed up

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

    Default Re: zones particular setup

    The $_SESSION['cart']->show_weight() does not exist in the Admin so it gives the error ...

    You need to test if you are in the admin and if so, don't do that check, otherwise, do the check ...
    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!

 

 

Similar Threads

  1. Particular product visible to a particular group only
    By aditya369 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 19 Apr 2012, 07:47 AM
  2. UK zones setup
    By pringle in forum General Questions
    Replies: 1
    Last Post: 20 Aug 2010, 06:33 PM
  3. All Zones EXCEPT particular one
    By PJD in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 25 Apr 2008, 07:15 AM
  4. Disable a particular sidebox for a particular page?
    By surabisantosh in forum Basic Configuration
    Replies: 1
    Last Post: 22 Nov 2007, 08:04 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