Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Fixed Rate for light carts

    I want to offer a fixed rate of $6.00 for all carts who's weight is under 2 pounds. If over 2 pounds, I want to only offer UPS shipping.

    How do I get the fixed rate NOT to appear as a choice for carts over 2 pounds.?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Fixed Rate for light carts

    You'll have to edit code.

    /includes/modules/shipping/flat.php
    around line 55, you'll see this section. Add the line as shown:
    Code:
            if ($check_flag == false) {
              $this->enabled = false;
            }
          }
          if ($_SESSION['cart']->show_weight() > 2) $this->enabled = false;
        }
    
    // class methods
        function quote($method = '') {
    .

    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.

  3. #3
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Fixed Rate for light carts

    figures..
    I am a TOTAL NOOB with this stuff.. I wouldn't even know where to start...

  4. #4
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Fixed Rate for light carts

    Actually DrByte said it clear enough, read everything very carefully. If you still don't know what to do, you will have to get someone do it for you (a friend, or some freelancer)
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #5
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by yellow1912 View Post
    Actually DrByte said it clear enough, read everything very carefully. If you still don't know what to do, you will have to get someone do it for you (a friend, or some freelancer)
    Would I be using the flat rate module or the table rate module?
    Seems like the table rate module allows input of cart weight..

    As for editing the code, I don't even know how to access the code to edit it.

  6. #6
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by DrByte View Post
    You'll have to edit code.

    /includes/modules/shipping/flat.php
    around line 55, you'll see this section. Add the line as shown:
    Code:
            if ($check_flag == false) {
              $this->enabled = false;
            }
          }
          if ($_SESSION['cart']->show_weight() > 2) $this->enabled = false;
        }
    
    // class methods
        function quote($method = '') {

    Ok.. I was able to add Dr. Bytes code in and it seems to work but although it works, I get the following error message in the Estimate Shipping Pop-up window when the user checks shipping costs... ( I notice it when using Internet explorer but have not noticed it using firefox.)

    The error is:

    Warning: usps(../admin/includes/functions/general.php): failed to open stream: No such file or directory in /hsphere/local/home/jtcasino/jtcasinogames.com/shop/includes/modules/shipping/usps.php on line 56 Warning: usps(): Failed opening '../admin/includes/functions/general.php' for inclusion (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/jtcasino/jtcasinogames.com/shop/includes/modules/shipping/usps.php on line 56

  7. #7
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Fixed Rate for light carts

    Check if this file exists:
    admin/includes/functions/general.php

    Reuploaded it if needed.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  8. #8
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by yellow1912 View Post
    Check if this file exists:
    admin/includes/functions/general.php

    Reuploaded it if needed.
    Yes.... That file is indeed there already

  9. #9
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by yellow1912 View Post
    Check if this file exists:
    admin/includes/functions/general.php

    Reuploaded it if needed.

    Yes, that file is there...

    ALSO...
    I notice in zen cart, I click on modules, then shipping and I get this error:

    Fatal error: Call to a member function on a non-object in /hsphere/local/home/jtcasino/jtcasinogames.com/shop/includes/modules/shipping/usps.php on line 120

  10. #10
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Fixed Rate for light carts

    To take this a step further... I just learned that my cart has not been accepting any orders ups, usps or any thing else since I put the suggested code in... Had to remove it all today so I am back to where I began...

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Flat Rate & Free shipping not working? (yellow light)
    By milli in forum Customization from the Admin
    Replies: 1
    Last Post: 22 Jan 2011, 10:35 PM
  2. Rate Table HELP!! amber light???
    By kitcorsa in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 2 May 2008, 10:36 AM
  3. Fixed-rate shipping with different cost for US and Canada
    By bacibacio in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 5 Mar 2008, 04:42 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