Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 05-08-2018 11:41:56

polarize
Member
Registered: 11-15-2004
Posts: 227

UPS Negotiated Rates Not Showing

Hello,

We are trying to get our UPS Negotiated Rates to show up in the shipping estimator and orders.  We have all of the shipping settings in place such as account number and the option to show negotiated rates set to YES.  For pulling rates we use a custom script so that we can pull UPS, USPS and flat rate shipping options up.

Our UPS account rep has ensured that our negotiated rates are turned on for use through the API and they do show up in our internal order management software yet not in CCP.  This leads me to wonder if by using a custom shipping script that it somehow overrides settings in CCP.

Is there a direct call that may be missing from this script that should call for negotiated rates in estimate shipping and orders?

Code:

<?php 

$info               = $this->globals('ecom.customship');
$custom             = array();
$usps_weight_cutoff = 51;

$shipmethod         = 'USPS, UPSTOOLS';

if ($info['weight'] >= $usps_weight_cutoff) {$shipmethod = 'UPSTOOLS';}

//
// Static Ship Price Lookup
// 

$DB =& $this->quick_object('CORE_DB','core','CORE_DB_1');

if (!(empty($info['delitems']))) {

     $sql = 'SELECT id, shiponename, shiponeprice, shiptwoname, shiptwoprice, shipthreename, shipthreeprice FROM ecom_prod WHERE ';

     foreach ($info['delitems'] as $diid => $diquan) {$sql .= 'id=' . $DB->quote($diid) . ' OR ';}

     $sql = preg_replace('/ OR $/','',$sql);

     $res = $DB->sql_do(array('table' => 'ecom_prod', 'sql' => $sql, 'order' => array('id' => 'ASC')));

     if ((!($this->isError($res))) && (!(empty($res)))) {

          foreach ($res as $num => $data) {

               // ShipOnePrice

               if ((!(empty($data['shiponename']))) && ($data['shiponeprice'] > 0) && (!(empty($info['delitems'][$data['id']])))) {

                    if (!(isset($custom[$data['shiponename']]))) {$custom[$data['shiponename']] = 0;} 

                    $custom[$data['shiponename']] += ($data['shiponeprice'] * $info['delitems'][$data['id']]);

               } // End of if statement.

               // ShipTwoPrice

               if ((!(empty($data['shiptwoname']))) && ($data['shiptwoprice'] > 0) && (!(empty($info['delitems'][$data['id']])))) {

                    if (!(isset($custom[$data['shiptwoname']]))) {$custom[$data['shiptwoname']] = 0;} 

                    $custom[$data['shiptwoname']] += ($data['shiptwoprice'] * $info['delitems'][$data['id']]);

               } // End of if statement.

               // ShipThreePrice

               if ((!(empty($data['shipthreename']))) && ($data['shipthreeprice'] > 0) && (!(empty($info['delitems'][$data['id']])))) {

                    if (!(isset($custom[$data['shipthreename']]))) {$custom[$data['shipthreename']] = 0;} 

                    $custom[$data['shipthreename']] += ($data['shipthreeprice'] * $info['delitems'][$data['id']]);

               } // End of if statement.

          } // End of foreach statement.

     } // End of fif statement.

} // End of if statement.

//
// Realtime Rates
// 

$delinfo = array('stateprov'     => $info['stateprov'],
                 'country'       => $info['country'],
                 'postalcode'    => $info['postalcode'],
                 'rescom'        => $info['rescom'],
                 'shipstateprov' => $info['shipstateprov'],
                 'shipcountry'   => $info['shipcountry'],
                 'shipzip'       => $info['shipzip'],
                 'shipmethods'   => $shipmethod,
                 'shiptype'      => 'R');

$result = $this->include_namespace('ecom','shiprealtime',array('delinfo'  => $delinfo, 'packages' => $info['packages']));

foreach ($result as $num => $service) {

     if (preg_match('/UPS/',$service['name'])) {

          $custom[$service['name']] = $service['amount'] + ($service['amount'] * 0.00);

     } else {

          $custom[$service['name']] = $service['amount'] + ($service['amount'] * 0.00);

     } // End of if statement.

} // End of if statement.

$this->globals('ecom.customship_response',$custom);

?>

Thank you in advance for your assistance! :)


ClickCartPro Groupie! smile


Previous Versions:
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#2 05-09-2018 08:30:51

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19124
Website

Re: UPS Negotiated Rates Not Showing

It sounds like you hit everything (UPS OnlineTools is activated, UPS account number is entered correctly and negotiated rates are turned on under UPS OnlineTools Settings, Custom script looks good and has no bearing on this).  Use System / Database / Raw Database Admin to execute the following Raw SQL Statement:

Code:

SELECT username, connectkey FROM ecom_shiprealtime WHERE id='UPSTOOLS'

Then send the username and connection key (API key) to your rep to verify that those are the ones they turned on the negotiated rates for.


Nick Hendler

Offline

 

#3 06-19-2018 18:31:43

polarize
Member
Registered: 11-15-2004
Posts: 227

Re: UPS Negotiated Rates Not Showing

It turns out that that combination is not what they have for us.  Do we need to ask them to activate this username and access key combination to get these rates to work?


ClickCartPro Groupie! smile


Previous Versions:
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#4 06-20-2018 06:47:30

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19124
Website

Re: UPS Negotiated Rates Not Showing

Do we need to ask them to activate this username and access key combination to get these rates to work?

Yes.


Nick Hendler

Offline

 

#5 06-22-2018 11:17:53

polarize
Member
Registered: 11-15-2004
Posts: 227

Re: UPS Negotiated Rates Not Showing

We have been working with UPS and they said that the Username, password and access key that is applied for on your website is not associated with our account so negotiated rates will not show using those credentials.  What we are supposed to use is our login username and password for ups.com and the access key they have already assigned to us for our order management system.

This issue remains that in CCP8 the access key is encrypted so we would need to be able to encrypt our key to see if this resolves the issue.  We experimented with the information already there and a decrypted access key turns off UPS rating in the software so the value apparently needs to be encrypted but we are not sure how to do this for our website.  Please advise.

UPS also made a note about the registration process as cut and pasted below.....

UPS Ready Developer Kit API Providers: Discontinued support of Register XML API
Our records show a few requests using the UPS Developer Kit API:  Register XML under your Developer Key.
As of July, 2018 this API will no longer be available.
The Registration Web Services API must be used for all requests before July to avoid outages.

Thanks smile


ClickCartPro Groupie! smile


Previous Versions:
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#6 06-25-2018 09:40:15

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19124
Website

Re: UPS Negotiated Rates Not Showing

Please submit a support ticket for this issue here:

https://kryptronic.com/Form/TECHTICKET

Our K9 software uses the new methodology.  V8 and lower need keys manually encrypted.  Thank you.


Nick Hendler

Offline

 

Board footer