Page 3 of 11 FirstFirst 12345 ... LastLast
Results 21 to 30 of 103
  1. #21
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    679
    Plugin Contributions
    8

    Default Re: USPS Shipping (RESTful) (USPSr)

    Quote Originally Posted by spyderrobotics View Post
    Using 1.5.7c and installed the non-encapsulated version. Couple of issues. In the admin panel the module didn't show and it gave an error because it was looking for uspsr.php in the languages>english>modules>shipping folder. The file is actually named lang.uspsr.php. So I just renamed it to uspsr.php and then the module showed up and I was able to configure it. The module works but it also is not grabbing some of the names correctly. For instance when you get a quote it would show MODULE_SHIPPING_USPSR_TEXT_SHORT_TITLE (Ground Advantage) to the user.

    I edited line 245 in the module and just changed it to $this->title = 'United States Postal Service';

    It does something similar with the name of the module under the admin>module>shipping.

    I was able to edit those to get things looking right. Not sure why its not getting the data from the other files. My issue is with the other usps module you could select the weight for each shipping type. For instance I only want up to 1 lb for ground advantage and priority limited to 1 lb or more. Is there a way to put that option back in or any idea where to edit the files to manually put that back in?
    Quote Originally Posted by lat9 View Post
    Right, the USPS/RESTful provides only new-style language files (i.e. lang.uspsr.php); that form of language-file was introduced in zc158.
    Yeah as lat9 said, I made this for 1.5.8 onward given that the older style of language files are being phased out. It CAN work with some muscle for 1.5.7, but I would have to rewrite all of the language files to do so.

  2. #22
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    679
    Plugin Contributions
    8

    Default Re: USPS Shipping (RESTful) (USPSr)

    Quote Originally Posted by retched View Post
    Yeah as lat9 said, I made this for 1.5.8 onward given that the older style of language files are being phased out. It CAN work with some muscle for 1.5.7, but I would have to rewrite all of the language files to do so.
    You SHOULD be able to use the following gists. Just be sure to put the languages file where necessary and rename them. (the admin.uspsr.php should be copied to /admin/includes/languages/english/extra_definitions/uspsr.php and the catalog.uspsr.php file should be copied to catalog\includes\languages\english\modules\shipping\ . Both should be named to JUST uspsr.php)

    https://gist.github.com/retched/bcf6...1e472bc741976a

  3. #23
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    679
    Plugin Contributions
    8

    Default Re: USPS Shipping (RESTful) (USPSr)

    Quote Originally Posted by spyderrobotics View Post
    My issue is with the other usps module you could select the weight for each shipping type
    Coming back in a later edit innately (probably the next edit once I fix the quote issue right now). The way I have to pull the JSON file presently is a bit cumbersome but I'm 95% sure it can be done to compare it against a maximum/minimum weight like before.

    There is a way to use an observer class (NOTIFY_USPS_UPDATE_OR_DISALLOW_TYPE) to in effect disable a shipping method. But that might be too cumbersome.

  4. #24
    Join Date
    Jul 2011
    Posts
    157
    Plugin Contributions
    4

    Default Re: USPS Shipping (RESTful) (USPSr)

    Quote Originally Posted by retched View Post
    You SHOULD be able to use the following gists. Just be sure to put the languages file where necessary and rename them. (the admin.uspsr.php should be copied to /admin/includes/languages/english/extra_definitions/uspsr.php and the catalog.uspsr.php file should be copied to catalog\includes\languages\english\modules\shipping\ . Both should be named to JUST uspsr.php)

    https://gist.github.com/retched/bcf6...1e472bc741976a
    Im in a similar situation where I will be stuck in with an older version of ZC until a complete tear down can happen. Which its going to be quite catastrophic since it a 15 year old cart that had been through as much as upgrades as reasonably can. In the light of the USPS api retirement notice, I'm interested to see if this would work reliably in a production environment that really can't be upgraded any further.

    Any efforts to provide some reasonable backward compatibility would be greatly appreciated.

  5. #25
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    679
    Plugin Contributions
    8

    Default Re: USPS Shipping (RESTful) (USPSr)

    Quote Originally Posted by chibipaw View Post
    Im in a similar situation where I will be stuck in with an older version of ZC until a complete tear down can happen. Which its going to be quite catastrophic since it a 15 year old cart that had been through as much as upgrades as reasonably can. In the light of the USPS api retirement notice, I'm interested to see if this would work reliably in a production environment that really can't be upgraded any further.

    Any efforts to provide some reasonable backward compatibility would be greatly appreciated.
    Which version of ZC are you on?

  6. #26
    Join Date
    Jul 2011
    Posts
    157
    Plugin Contributions
    4

    Default Re: USPS Shipping (RESTful) (USPSr)

    Quote Originally Posted by retched View Post
    Which version of ZC are you on?
    With munch embarrassment, 1.55f. Because too many active dependencies that are now abandonware, and this is a very active production site.

  7. #27
    Join Date
    Jun 2007
    Location
    Bronx, New York, United States
    Posts
    679
    Plugin Contributions
    8

    Default Re: USPS Shipping (RESTful) (USPSr)

    Wait you mean 1.5.5f right?

  8. #28
    Join Date
    Jul 2011
    Posts
    157
    Plugin Contributions
    4

    Default Re: USPS Shipping (RESTful) (USPSr)

    Yes, not by choice as mentioned.

  9. #29
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,337
    Plugin Contributions
    94

    Default Re: USPS Shipping (RESTful) (USPSr)

    FWIW, given my short code review, I believe that this version of USPS could be made usable on Zen Cart versions prior to 1.5.8 and PHP versions prior to 7.3/4 by
    - Providing a non-array-based language file, i.e. using the older define-statement method.
    - Changing the use of the null-coalesce operator (??) to use the older tertiary operator, e.g. if (($x ?? 7)) becomes if (isset($x) ? $x : 7).

  10. #30
    Join Date
    Jul 2011
    Posts
    157
    Plugin Contributions
    4

    Default Re: USPS Shipping (RESTful) (USPSr)

    If it's at all possible, that is very much appreciated. Im sure not just by me, but buy a lot of people who are kind of stuck in this situation.

 

 
Page 3 of 11 FirstFirst 12345 ... LastLast

Similar Threads

  1. PayPal RESTful API Payment Module
    By lat9 in forum PayPal RESTful support
    Replies: 261
    Last Post: 21 Apr 2025, 08:22 PM
  2. v158 UPS Shipping using RESTful/OAuth API [Support Thread]
    By lat9 in forum Addon Shipping Modules
    Replies: 147
    Last Post: 8 Mar 2025, 06:38 PM
  3. v155 USPS Shipping Module - We are unable to find a USPS shipping quote suitable....
    By jtovar in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 6 May 2019, 11:07 PM
  4. v155 V1.5.5D USPS Shipping module, I just noticed, no USPS retail Ground Displaying
    By WiccanWitch420 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 31 Mar 2018, 04:34 PM
  5. v139h Is the USPS shipping module required to ship with USPS?
    By yeahwhatever in forum Addon Shipping Modules
    Replies: 3
    Last Post: 14 Feb 2012, 12:58 AM

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