Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2005
    Posts
    55
    Plugin Contributions
    0

    Default Deactivate shipping table mod when weight > 100lbs

    Hi everyone :)

    I have a small problem with shipping module

    I have to deactivate table shipping module when order weight is more then 100 lbs

    less then 100 lbs table module working and gives client shipping option
    more then 100 lbs table module its deactivated to the client

    If anyone know how to do it please help .

    Pawel

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Deactivate shipping table mod when weight > 100lbs

    You could make a function similar to the function zen_get_shipping_enabled

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

    The function for the Admin returns true so that it is always enabled ... and the function for the Catalog checks the weight in the cart ...
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Jan 2005
    Posts
    55
    Plugin Contributions
    0

    Default Re: Deactivate shipping table mod when weight > 100lbs

    I added that code :

    PHP Code:
       if ($_SESSION['cart']->show_weight()>100) { 
          
    $this->enabled false
        } 
    under

    PHP Code:
     if (zen_get_shipping_enabled($this->code)) {
          
    $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true false);
        } 
    and in the store everything its working but i have the problem in the admin>modules>shipping

    Fatal error: Call to a member function on a non-object in /home/tropic1/public_html/includes/modules/shipping/table.php on line 64


    :):)

  4. #4
    Join Date
    Jan 2004
    Posts
    58,458
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Deactivate shipping table mod when weight > 100lbs

    Try this, assuming you're using v1.3.x:

    PHP Code:
    if (IS_ADMIN_FLAG !== true && $_SESSION['cart']->show_weight()>100) { 
          
    $this->enabled false
        } 
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.

  5. #5
    Join Date
    Jan 2005
    Posts
    55
    Plugin Contributions
    0

    Default Re: Deactivate shipping table mod when weight > 100lbs

    Yeah its working thank you very much :) im runing 1.3.5 :)

    Pawel

  6. #6
    Join Date
    Dec 2005
    Location
    Portishead, UK
    Posts
    36
    Plugin Contributions
    0

    Default Re: Deactivate shipping table mod when weight > 100lbs

    Is there any way of doing this using overrides? I'm very conscious of the difficulty in upgrading when overwriting files... In fact, I'm trying NOT to change any core files if at all possible.
    Any help would be greatly appreciated.
    Thanks,
    Glenn
    ...there is nothing worse than aggresive stupidity...

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Deactivate shipping table mod when weight > 100lbs

    The Modules for Payment, Shipping and Order Totals only utilize overrides for the text, not for the code ...
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  8. #8
    Join Date
    Dec 2005
    Location
    Portishead, UK
    Posts
    36
    Plugin Contributions
    0

    Default Re: Deactivate shipping table mod when weight > 100lbs

    Quote Originally Posted by Ajeh View Post
    The Modules for Payment, Shipping and Order Totals only utilize overrides for the text, not for the code ...
    That's what I thought, Thanks for clearing that up...
    ...there is nothing worse than aggresive stupidity...

 

 

Similar Threads

  1. Replies: 37
    Last Post: 7 Jul 2008, 07:17 PM
  2. Shipping Weight ?
    By Ms. Balla in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 29 Sep 2006, 05:21 AM
  3. advice on shipping table costs needed please
    By toffee in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 10 Jun 2006, 04:03 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
  •