Results 1 to 10 of 440

Threaded View

  1. #11
    Join Date
    Apr 2019
    Posts
    299
    Plugin Contributions
    0

    Default Re: USPS Shipping Module [Support Thread]

    Quote Originally Posted by HeleneWallis View Post
    Our usps.php is highly customized to restrict customers from choosing inappropriate shipping services for certain products (won't fit in padded envelope, for example). Each of the past updates has included an entry point for this custom code, so I was able to just transfer it from whatever current version we were using. But it's no longer there in the newest update, and I have not been able to determine where to insert our code. I finally just had to take the website down so people wouldn't have to choose a higher cost service if the item would ship in the former First Class.

    The previous entry point for custom code read "// *** Customizations once per display ***." That no longer appears, and the code is so changed that I can't find the correct point at which to insert our restrictions on which services can be selected for certain products. It used to be after the section that began with

    PHP Code:
            if ($this->is_us_shipment) {
                
    $PackageSize count($uspsQuote['Package']);
                
    // if object has no legitimate children, turn it into a firstborn:
                
    if (isset($uspsQuote['Package']['ZipDestination']) && !isset($uspsQuote['Package'][0]['Postage'])) {
                    
    $uspsQuote['Package'][] = $uspsQuote['Package'];
                    
    $PackageSize 1;
                }
            } else {
                
    $PackageSize count($uspsQuote['Package']['Service']);
            } 
    I see that this section has been greatly expanded now, but I do not see precisely where to add our code. Should it go after
    PHP Code:
                if ($cost == 0) {
                    continue;
                } 
    There is another section of added code later in the program, and I haven't even begun to look for where that needs to go.

    Can you help, Cindy?


    Your first section of PHP code is located near line 547 and 583 in k11i file. Not exactly the same but very similar.

    "Try and error" is your good friend...Good luck.
    Last edited by njcyx; 18 Jul 2023 at 09:17 PM.

 

 

Similar Threads

  1. MultiSite Module Support Thread
    By Gerome in forum All Other Contributions/Addons
    Replies: 2239
    Last Post: 21 May 2025, 02:07 PM
  2. Optional Shipping Insurance Module [Support Thread]
    By jettrue in forum Addon Shipping Modules
    Replies: 414
    Last Post: 20 Mar 2025, 01:39 PM
  3. Replies: 29
    Last Post: 24 Sep 2014, 09:59 PM
  4. Replies: 335
    Last Post: 1 Aug 2013, 08:54 PM
  5. PC Configurator Module [Support Thread]
    By lebrand2006 in forum All Other Contributions/Addons
    Replies: 254
    Last Post: 22 Aug 2012, 03:52 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