Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 38
  1. #11
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,498
    Plugin Contributions
    88

    Default Re: Stamps.com setting error while importing.

    I've reported this issue to stamps.com (and included the suggested correction). There are 3 areas to be changed:
    Line 776:
    Code:
                    $comments = /*mysql_escape_string($_REQUEST['comments'])*/ $db->prepare_input ($_REQUEST['comments']);  //-20150917-lat9  *** 1 of 3 ***
    Line 828
    Code:
                                    /*mysql_real_escape_string($country_name)*/ $db->prepare_input ($country_name));  //-20150917-lat9  *** 2 of 3 ***
    Lines 854-856
    Code:
                    $qry = sprintf("select zone_code from ". TABLE_ZONES. " where zone_country_id = '%s' and zone_name = '%s'",
                                    /*mysql_real_escape_string($country_id)*/ $db->prepare_input ($country_id),
                                    /*mysql_real_escape_string($state_name)*/ $db->prepare_input ($state_name));  //-20150917-lat9  *** 3 of 3 ***

  2. #12
    Join Date
    Apr 2010
    Posts
    265
    Plugin Contributions
    1

    Default Re: Stamps.com setting error while importing.

    Thank you, that fixed it.

  3. #13
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,498
    Plugin Contributions
    88

    Default Re: Stamps.com setting error while importing.

    Excellent! According to the customer-care email that I received from stamps.com, they should have those changes incorporated real-soon-now.

  4. #14
    Join Date
    Apr 2010
    Posts
    265
    Plugin Contributions
    1

    Default Re: Stamps.com setting error while importing.

    You mean, two years from now, right?

  5. #15
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,498
    Plugin Contributions
    88

    Default Re: Stamps.com setting error while importing.

    Quote Originally Posted by vanhorn_s View Post
    You mean, two years from now, right?
    We'll see; they were quite responsive to the email query that I sent in. Since they've got the fix, "all" they need to do is re-validate and release!

  6. #16
    Join Date
    Apr 2010
    Posts
    265
    Plugin Contributions
    1

    Default Re: Stamps.com setting error while importing.

    The last time I emailed them a fix, they told me they would implement it, but they never did.

  7. #17
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Stamps.com setting error while importing.

    And people ask why we switched from the Stamps.com interface to

    ShipStation.com interface with is owned by Stamps.com but easier to implement, more functionality and includes a better rate discount for PriorityMail through an ExpressONE account running parallel to Stamps.com account.

    I did receive a notice a few months ago that a priority issue/trouble ticket generated 18 months ago was finally patched.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  8. #18
    Join Date
    Apr 2010
    Posts
    265
    Plugin Contributions
    1

    Default Re: Stamps.com setting error while importing.

    I tried shipstation last time there was a serious issue, and It works great, but I didn't want to pay the extra amount.
    I figured out what the problem was, and that was the one they never fixed, after I emailed it to them.
    https://www.zen-cart.com/showthread....th-1-5-3/page2

  9. #19
    Join Date
    Dec 2012
    Posts
    68
    Plugin Contributions
    0

    Default Re: stamps.com help

    Quote Originally Posted by tonyreynolds View Post
    OK, So I got 1 hit when I searched both on the Admin/Catalog, but zero hits when I searched Catalog only. The stamps.php file is in the catalog root directory. I take the search to mean that the function is not available from the catalog root directory.
    I will research to insure the stamps.php file is in the correct location.


    TR
    The stamps.php file was in the wrong place. It should be in the admin folder and updated to the correct path in the stamps.com software.
    Thanks everybody for their help. I learned a new Zen tool as well!

    TR

  10. #20
    Join Date
    Jul 2014
    Location
    New Jersey
    Posts
    17
    Plugin Contributions
    1

    Default Re: stamps.com no longer working with 1.5.3

    I was able to get stamps.com integration to work with 1.5.5e with this version where I made a few edits to the file to account for the Mysql depreciated functions and replaced them with MySqli equivalents. I am quite sure there are more elegant ways to get this fixed but for now I would like some comments from the other programmers if this compromises security doing it this way.

    I modified the original function:
    Code:
    // Returns the zen country id for the given named country
            function GetCountryID($country_name)
            {
                    global $db;
                    $qry = sprintf("select countries_id from ". TABLE_COUNTRIES. " where countries_name = '%s'",
                                    mysql_real_escape_string($country_name));
    
                    $countryQuery = $db->Execute($qry);
                    if ($countryQuery->RecordCount() == 0)
                    {
                            return $country_name;
                    }
                    else
                    {
                            return $countryQuery->fields['countries_id'];
                    }
            }
    and changed it to look like this since the mysqli_real_escape_string() requires a connection string as the first parameter:

    Code:
     // Returns the zen country id for the given named country
            function GetCountryID($country_name)
            {
                    global $db;
    				$mysqli = new mysqli('DB_SERVER' , 'DB_SERVER_USERNAME' , 'DB_SERVER_PASSWORD' , 'DB_DATABASE' );
                    $qry = sprintf("select countries_id from ". TABLE_COUNTRIES. " where countries_name = '%s'",
                                    mysqli_real_escape_string($mysqli, $country_name));
    								
    
                    $countryQuery = $db->Execute($qry);
                    if ($countryQuery->RecordCount() == 0)
                    {
                            return $country_name;
                    }
                    else
                    {
                            return $countryQuery->fields['countries_id'];
                    }
            }
    I did the same for three other functions that were using similar code see the attached updated stamps module if you wish to see the all the changes.
    Attached Files Attached Files

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v138a Stamps.com: How do I prevent Non-shippable items from batch importing?
    By gachogavacho in forum Addon Shipping Modules
    Replies: 14
    Last Post: 20 Aug 2014, 08:07 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