Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by JTCasinoGames View Post
    /shop/includes/modules/shipping/usps.php on line 56
    Where did you get your usps.php shipping module from?
    What's *on* line 56 of that file?
    If you turn off the USPS module, do things work properly?

    Quote Originally Posted by JTCasinoGames View Post
    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
    What's on line 120 ?

    In the master version of this module, those lines aren't trying to load any other files, and they aren't attempting to use external objects.
    So, you've got something messed up in that file.


    Furthermore, the code edit I offered you earlier has nothing to do with USPS, and making that change *only in the file I instructed* shouldn't have any effect on USPS.
    .

    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.

  2. #12
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by DrByte View Post
    Where did you get your usps.php shipping module from?
    What's *on* line 56 of that file?
    If you turn off the USPS module, do things work properly?



    What's on line 120 ?

    In the master version of this module, those lines aren't trying to load any other files, and they aren't attempting to use external objects.
    So, you've got something messed up in that file.


    Furthermore, the code edit I offered you earlier has nothing to do with USPS, "and making that change *only in the file I instructed* shouldn't have any effect on USPS.

    I asked the guy who is setting up my site:
    He said:

    "The usps.php file is the default one that came with zencart. Also, even if I try to put it on the flat.php (flat rate shipping), it's throwing the same error "

  3. #13
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by JTCasinoGames View Post
    ... Also, even if I try to put it on the flat.php (flat rate shipping), it's throwing the same error "
    What does he mean by "put it on the flat.php" ?
    And does "throwing the same error" mean it's *exactly* the same, or just similar? Post the new error.
    .

    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.

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

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by DrByte View Post
    What does he mean by "put it on the flat.php" ?
    And does "throwing the same error" mean it's *exactly* the same, or just similar? Post the new error.
    we were trying to get a flat rate for a item that would ship with a USPS flat rate box. The error messages we got were:

    in zen cart when you select, modules then shipping we got:


    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




    on the website, when the customer opened the shipping estimator AND when they went to checkout, it showed the error:

    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




    These are the two errors we got.
    Someone suggested that the general.php file might be missing. It was not.

  5. #15
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by JTCasinoGames View Post
    in zen cart when you select, modules then shipping we got:

    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
    Please post line 120 of that file. In fact, please zip up that file and post it as an attachment here.

    Quote Originally Posted by JTCasinoGames View Post
    on the website, when the customer opened the shipping estimator AND when they went to checkout, it showed the error:

    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
    It doesn't make any sense that the code would reference any admin files from the storefront. This suggests some odd customizations to your shipping module. Posting the file, as mentioned above, may help figure out what's happening.

    By what method are you implementing code changes? Do you edit on a PC and then upload the changes via FTP? Which editor?
    Or are you editing directly on the website with some sort of tool? Which tool?
    .

    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. #16
    Join Date
    Sep 2007
    Posts
    14
    Plugin Contributions
    0

    Default Re: Fixed Rate for light carts

    Quote Originally Posted by DrByte View Post
    Please post line 120 of that file. In fact, please zip up that file and post it as an attachment here.

    It doesn't make any sense that the code would reference any admin files from the storefront. This suggests some odd customizations to your shipping module. Posting the file, as mentioned above, may help figure out what's happening.

    By what method are you implementing code changes? Do you edit on a PC and then upload the changes via FTP? Which editor?
    Or are you editing directly on the website with some sort of tool? Which tool?

    Here is is response:
    "I do it both ways, sometimes directly on the server (notepad type) or sometimes notepad on my pc then upload...for some reason it's not seeing the other functions/classes it needs to function eventhough the setup is a default setup..."
    Attached Files Attached Files

  7. #17
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Fixed Rate for light carts

    Um ... well ... that can't be the right file.

    Line 120 is ... well ... blank.

    and ... so is line 56.


    There is some "difference" in line-endings around the line-120 mark, so I suppose it's possible that something's awry in the file. Reloading the original might help.

    I'd be inclined to be reloading the files from the /includes/modules/shipping and /includes/languages/english/modules/shipping folders,
    ... and MAKE SURE you don't have extra unused files sitting in those folders, since they are "autoload"-type folders ... anything ending in .php will be run, even if the files are old, backups, testing, etc. So, don't keep backups in there. Keep them somewhere else.
    .

    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.

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

    help question Re: Fixed Rate for light carts: Revisited

    OK... got things back to the way they were. No more errors...
    Gonna try this one more time if someone could help.

    Here is what we are trying to do:

    I enabled the Table Weight option.

    I have it set that if the customers cart weighs 1 pound or LESS, they have the option of selecting a Table Rate Shipping fee of $6.

    What I want to happen is if the cart is OVER 1 pound, I want this table rate option NOT to appear as a selection, leaving only the UPS shipping options I have already defined.

    Thank you again for any help.. I am a total noob at this stuff...

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

    Default Re: Fixed Rate for light carts

    bump

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

    Default Re: Fixed Rate for light carts

    Ok.
    Just had my guy put the following line into my flat.php as Dr. Byte recomended.

    if ($_SESSION['cart']->show_weight() > 2) $this->enabled = false

    His response back to me was

    "doesn't work still....the moment i add even this $_SESSION['cart']->show_weight() and try to open the control panel ->shipping area, it stops loading...I even uploaded a fresh flat.php and tried on another fresh install of the latest zencart but no luck...ask them where the calculate() function is, as it might not be called inside flat.php, the show_weight function/class is just running that function...."

    Dr. Byte? or anyone else have a thought.

 

 
Page 2 of 3 FirstFirst 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