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 03-14-2016 21:55:28

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

USPS Domestic mail - Regional Box A and Box B

How do we modify the v 8 shopping cart so it supports the USPS Priority Mail Regional Box A and USPS Priority Mail Regional Box B?   There is often a significant cut in shipping costs when those two Box types are used to ship goods to customers.   The current shopping cart software doesn't seem to support those USPS shipping options for domestic mail.

Offline

 

#2 03-16-2016 06:41:08

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

Re: USPS Domestic mail - Regional Box A and Box B

Add appropriate entries for them based on other USPS entries using Store > Shipping > Realtime Services.


Nick Hendler

Offline

 

#3 03-16-2016 11:54:23

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

I tried that and it doesn't seem to work.

ID:  USPS-US-Priority Mail 1-Day Regional Rate Box A 
Description: Priority Mail 1-Day Regional Rate Box A
I made sure the entry was activated in the Realtime Services table.

The shopping cart checkout shows everything but the "Priority Mail 1-Day Regional Rate Box A".

  USPS First-Class Mail Parcel® - $6.24
  USPS Priority Mail 1-Day Flat Rate Envelope® - $9.95
  USPS Priority Mail 1-Day® - $9.95
  USPS Priority Mail 1-Day Legal Flat Rate Envelope® - $9.95
  FedEx Home Delivery® - $14.03
  USPS Priority Mail 1-Day Medium Flat Rate Box® - $16.95
  FedEx Express Saver® - $18.28
  FedEx 2 Day® - $18.92
  USPS Priority Mail 1-Day Large Flat Rate Box® - $22.25
  FedEx Standard Overnight® - $24.79
  USPS Priority Mail Express 1-Day® - $26.45
  FedEx Priority Overnight® - $26.46
  FedEx First Overnight® - $61.24

Offline

 

#4 03-16-2016 14:56:35

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

Re: USPS Domestic mail - Regional Box A and Box B

Do you have the name entered exactly as USPS has it?  Turning on debugging will show what they send back and you can see if there are any issues with what you've entered.


Nick Hendler

Offline

 

#5 03-17-2016 12:02:15

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

I turned on debug, displayed the cart to trace the program, turned off debug, moved the debug list to my pc, searched the trace for the keyword: regional, and it is not in the trace.   This means the table entry for

ID:  USPS-US-Priority Mail 1-Day Regional Rate Box A 
Description: Priority Mail 1-Day Regional Rate Box A

is not being picked up by the program and sent out to USPS.   Why isn't the shopping cart program picking up the "Priority Mail 1-Day Regional Rate Box A" out of the Real Time Services table?  It picked up the other "Priority Mail 1-Day..." shipping options but not the "Priority Mail 1-Day Regional Rate Box A" shipping option.

Offline

 

#6 03-18-2016 07:03:03

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

Re: USPS Domestic mail - Regional Box A and Box B

It means USPS is not sending a service back with 'regional' in the name.


Nick Hendler

Offline

 

#7 03-18-2016 08:49:54

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

I don't see anything in the debug list where the cart is sending anything to the USPS all I see is information of the cart formatting the shopping cart display of all the shippers.   I see no evidence a call is even being done to the USPS system.   This doesn't make any sense at all to me.   What should I be seeing to know that a call was even executed to request anything from the USPS system?   There's no evidence of such a call even being made in the debug list.

Offline

 

#8 03-21-2016 07:10:34

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

Re: USPS Domestic mail - Regional Box A and Box B

Shipping rates are cached, so the best way to debug this is to activate the shipping estimator, activate debug, and on the shopping cart page, look at debug right after making a cart update, while you have an address in the shipping estimator.


Nick Hendler

Offline

 

#9 05-01-2016 20:19:27

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

I finally got a good trace showing everything coming back from the USPS and there is no Regional Box A or Regional Box B present.   I wonder if USPS forgot to put those into the list of MailServices that are being sent back? 

Below is a list of the MailServices from the trace.  Maybe it takes some other kind of call to USPS in order to get the Regional A and Regional B boxes supported?

<MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</MailService><Rate>33.45</Rate></Postage><Postage CLASSID="2">
<MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Hold For Pickup</MailService><Rate>33.45</Rate></Postage><Postage CLASSID="13">
<MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Flat Rate Envelope</MailService><Rate>22.95</Rate></Postage><Postage CLASSID="27">
<MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Flat Rate Envelope Hold For Pickup</MailService><Rate>22.95</Rate></Postage><Postage CLASSID="30">
<MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Legal Flat Rate Envelope</MailService><Rate>22.95</Rate></Postage><Postage CLASSID="31">
<MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Legal Flat Rate Envelope Hold For Pickup</MailService><Rate>22.95</Rate></Postage><Postage CLASSID="62">
<MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Padded Flat Rate Envelope</MailService><Rate>22.95</Rate></Postage><Postage CLASSID="63">
<MailService>Priority Mail Express 2-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Padded Flat Rate Envelope Hold For Pickup</MailService><Rate>22.95</Rate></Postage><Postage CLASSID="1">
<MailService>Priority Mail 3-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</MailService><Rate>7.05</Rate></Postage><Postage CLASSID="22">
<MailService>Priority Mail 3-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Large Flat Rate Box</MailService><Rate>18.75</Rate></Postage><Postage CLASSID="17">
<MailService>Priority Mail 3-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Medium Flat Rate Box</MailService><Rate>13.45</Rate></Postage><Postage CLASSID="16">
<MailService>Priority Mail 3-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Flat Rate Envelope</MailService><Rate>6.45</Rate></Postage><Postage CLASSID="44">
<MailService>Priority Mail 3-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Legal Flat Rate Envelope</MailService><Rate>6.45</Rate></Postage><Postage CLASSID="29">
<MailService>Priority Mail 3-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Padded Flat Rate Envelope</MailService><Rate>6.80</Rate></Postage><Postage CLASSID="38">
<MailService>Priority Mail 3-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Gift Card Flat Rate Envelope</MailService><Rate>6.45</Rate></Postage><Postage CLASSID="40">
<MailService>Priority Mail 3-Day&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt; Window Flat Rate Envelope</MailService><Rate>6.45</Rate></Postage><Postage CLASSID="0">
<MailService>First-Class Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Parcel</MailService><Rate>3.78</Rate></Postage><Postage CLASSID="0">
<MailService>First-Class Mail&amp;lt;sup&amp;gt;&amp;#174;&amp;lt;/sup&amp;gt; Large Envelope</MailService><Rate>2.83</Rate></Postage><Postage CLASSID="4">
<MailService>USPS Retail Ground&amp;lt;sup&amp;gt;&amp;#8482;&amp;lt;/sup&amp;gt;</MailService><Rate>7.04</Rate></Postage><Postage CLASSID="6">
<MailService>Media Mail Parcel</MailService><Rate>2.61</Rate></Postage><Postage CLASSID="7">
<MailService>Library Mail Parcel</MailService><Rate>2.48</Rate></Postage></Package></RateV4Response>

Offline

 

#10 05-02-2016 02:21:20

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

When I look at the API Price Calculator users guide on page 43, it looks like the Regional A, and Regional B boxes do not appear when the service is "Priority Mail", but they do appear when the service is "Priority Mail Commercial".  The shopping cart is sending the service out as "Priority Mail".    Yet, when one uses the usps.com web site to calculate a price the Regional A and Regional B boxes show up there as is shown below.   With this last postage increase, the post office doesn't seem to be extending commercial rates to anyone anymore.   It looks like you folks at Krptronics need to get hold of the post office and tell them to put the Regional A and Regional B boxes in the return info when the service is "Priority Mail".   


Domestic Services
Display All Options  Display a as Print Friendly page. 
Package, weight 5 lb 0 oz (2.268 kg), mailed on May 2 after 8:00 AM
from SPOKANE WA 99205 to TOUCHET WA 99360

Priority Mail Express™ Options - Money Back Guarantee >> Click to View these Mailing Options 
More info about Priority Mail Express 1-Day™
Priority Mail Express™ Hold For Pickup Options - Money Back Guarantee >> Click to View these Mailing Options 
More info about Priority Mail Express 1-Day™
Priority Mail® Options Expected Delivery Day Retail Click-N-Ship®
Priority Mail 2-Day™More info about Priority Mail 2-Day™
Wed, May 4
$9.85
$9.85
Priority Mail 2-Day™ Large Flat Rate Box
More info about Priority Mail 2-Day™ Large Flat Rate Box
USPS-Produced Box: 23-11/16" x 11-3/4" x 3" or 12" x 12" x 5-1/2"
Wed, May 4
$18.75
$18.75
Priority Mail 2-Day™ Medium Flat Rate Box
More info about Priority Mail 2-Day™ Medium Flat Rate Box
USPS-Produced Box: 13-5/8" x 11-7/8" x 3-3/8" or 11" x 8-1/2" x 5-1/2"
Wed, May 4
$13.45
$13.45
Priority Mail 2-Day™ Small Flat Rate Box
More info about Priority Mail 2-Day™ Small Flat Rate Box
USPS-Produced Box: 8-5/8" x 5-3/8" x 1-5/8"
Wed, May 4
$6.80
$6.80
Priority Mail 2-Day™ Regional Rate Box A
More info about Priority Mail 2-Day™ Regional Rate Box A
USPS-Produced Box: 12-13/16" x 10-15/16" x 2-3/8" or 10" x 7" x 4-3/4"
Wed, May 4
Not available
$6.01
Priority Mail 2-Day™ Regional Rate Box B
More info about Priority Mail 2-Day™ Regional Rate Box B
USPS-Produced Box: 15-7/8" x 14-3/8" x 2-7/8" or 12" x 10-1/4" x 5"
Wed, May 4
Not available
$6.71
Priority Mail® Hold For Pickup Options >> Click to View these Mailing Options 
More info about Priority Mail 2-Day™
More info about Priority Mail 2-Day™ Large Flat Rate Box
More info about Priority Mail 2-Day™ Medium Flat Rate Box
More info about Priority Mail 2-Day™ Small Flat Rate Box
More info about Priority Mail 2-Day™ Regional Rate Box A
More info about Priority Mail 2-Day™ Regional Rate Box B
Other Options >> Click to View these Mailing Options 
More info about Media Mail®
Product Selected
Price Description
Retail
Click-N-Ship®
No Product Selected

Offline

 

#11 05-02-2016 07:30:34

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

Re: USPS Domestic mail - Regional Box A and Box B

Would passing Priority Mail Commercial when the destination address is commercial work?


Nick Hendler

Offline

 

#12 05-02-2016 09:15:34

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

I think all you have to do is change <Service>ALL</Service> to be <Service>Online</Service>.   That returns everything we need including the Regional A and Regional B boxes.   

I ran the following (I x'ed out my userid) and it returned everything we need.   It displays the postage as <CommercialRate>6.45</CommercialRate>, so your program needs to be changed to recognize those tags in order to pick up the postage amount.   When you use <Service>ALL</Service> the postage rate is returned like this: <Rate>6.45</Rate>. 

http://production.shippingapis.com/Ship … eV4Request USERID="xxxxxxxxxxxx">
<Package ID="0">
<Service>Online</Service>
<ZipOrigination>99205</ZipOrigination>
<ZipDestination>99203</ZipDestination>
<Pounds>0</Pounds>
<Ounces>10</Ounces>
<Container>VARIABLE</Container>
<Size>Regular</Size>
<Width>6</Width>
<Length>6</Length>
<Height>1</Height>
<Girth>14</Girth>
<Machinable>True</Machinable>
</Package>

</RateV4Request>

This is what was returned:

<?xml version="1.0" encoding="UTF-8"?>

-<RateV4Response>


-<Package ID="0">

<ZipOrigination>99205</ZipOrigination>

<ZipDestination>99203</ZipDestination>

<Pounds>0</Pounds>

<Ounces>10</Ounces>

<Size>REGULAR</Size>

<Machinable>TRUE</Machinable>

<Zone>1</Zone>


-<Postage CLASSID="3">

<MailService>Priority Mail Express 1-Day&lt;sup&gt;™&lt;/sup&gt;</MailService>

<Rate>22.95</Rate>

<CommercialRate>20.66</CommercialRate>

</Postage>


-<Postage CLASSID="2">

<MailService>Priority Mail Express 1-Day&lt;sup&gt;™&lt;/sup&gt; Hold For Pickup</MailService>

<Rate>22.95</Rate>

<CommercialRate>20.66</CommercialRate>

</Postage>


-<Postage CLASSID="13">

<MailService>Priority Mail Express 1-Day&lt;sup&gt;™&lt;/sup&gt; Flat Rate Envelope</MailService>

<Rate>22.95</Rate>

<CommercialRate>20.66</CommercialRate>

</Postage>


-<Postage CLASSID="27">

<MailService>Priority Mail Express 1-Day&lt;sup&gt;™&lt;/sup&gt; Flat Rate Envelope Hold For Pickup</MailService>

<Rate>22.95</Rate>

<CommercialRate>20.66</CommercialRate>

</Postage>


-<Postage CLASSID="30">

<MailService>Priority Mail Express 1-Day&lt;sup&gt;™&lt;/sup&gt; Legal Flat Rate Envelope</MailService>

<Rate>22.95</Rate>

<CommercialRate>20.66</CommercialRate>

</Postage>


-<Postage CLASSID="31">

<MailService>Priority Mail Express 1-Day&lt;sup&gt;™&lt;/sup&gt; Legal Flat Rate Envelope Hold For Pickup</MailService>

<Rate>22.95</Rate>

<CommercialRate>20.66</CommercialRate>

</Postage>


-<Postage CLASSID="62">

<MailService>Priority Mail Express 1-Day&lt;sup&gt;™&lt;/sup&gt; Padded Flat Rate Envelope</MailService>

<Rate>22.95</Rate>

<CommercialRate>20.66</CommercialRate>

</Postage>


-<Postage CLASSID="63">

<MailService>Priority Mail Express 1-Day&lt;sup&gt;™&lt;/sup&gt; Padded Flat Rate Envelope Hold For Pickup</MailService>

<Rate>22.95</Rate>

<CommercialRate>20.66</CommercialRate>

</Postage>


-<Postage CLASSID="1">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt;</MailService>

<Rate>6.45</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="33">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="22">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Large Flat Rate Box</MailService>

<Rate>18.75</Rate>

<CommercialRate>16.35</CommercialRate>

</Postage>


-<Postage CLASSID="34">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Large Flat Rate Box Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>16.35</CommercialRate>

</Postage>


-<Postage CLASSID="17">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Medium Flat Rate Box</MailService>

<Rate>13.45</Rate>

<CommercialRate>11.95</CommercialRate>

</Postage>


-<Postage CLASSID="35">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Medium Flat Rate Box Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>11.95</CommercialRate>

</Postage>


-<Postage CLASSID="47">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Regional Rate Box A</MailService>

<Rate>0.00</Rate>

<CommercialRate>6.01</CommercialRate>

</Postage>


-<Postage CLASSID="48">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Regional Rate Box A Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>6.01</CommercialRate>

</Postage>


-<Postage CLASSID="49">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Regional Rate Box B</MailService>

<Rate>0.00</Rate>

<CommercialRate>6.71</CommercialRate>

</Postage>


-<Postage CLASSID="50">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Regional Rate Box B Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>6.71</CommercialRate>

</Postage>


-<Postage CLASSID="16">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Flat Rate Envelope</MailService>

<Rate>6.45</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="37">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Flat Rate Envelope Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="44">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Legal Flat Rate Envelope</MailService>

<Rate>6.45</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="45">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Legal Flat Rate Envelope Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="29">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Padded Flat Rate Envelope</MailService>

<Rate>6.80</Rate>

<CommercialRate>6.10</CommercialRate>

</Postage>


-<Postage CLASSID="46">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Padded Flat Rate Envelope Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>6.10</CommercialRate>

</Postage>


-<Postage CLASSID="38">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Gift Card Flat Rate Envelope</MailService>

<Rate>6.45</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="39">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Gift Card Flat Rate Envelope Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="40">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Window Flat Rate Envelope</MailService>

<Rate>6.45</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="41">

<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Window Flat Rate Envelope Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>5.75</CommercialRate>

</Postage>


-<Postage CLASSID="0">

<MailService>First-Class Mail&lt;sup&gt;®&lt;/sup&gt; Parcel</MailService>

<Rate>3.78</Rate>

</Postage>


-<Postage CLASSID="0">

<MailService>First-Class Mail&lt;sup&gt;®&lt;/sup&gt; Large Envelope</MailService>

<Rate>2.83</Rate>

</Postage>


-<Postage CLASSID="61">

<MailService>First-Class&lt;sup&gt;™&lt;/sup&gt; Package Service</MailService>

<Rate>0.00</Rate>

<CommercialRate>3.35</CommercialRate>

</Postage>


-<Postage CLASSID="53">

<MailService>First-Class&lt;sup&gt;™&lt;/sup&gt; Package Service Hold For Pickup</MailService>

<Rate>0.00</Rate>

<CommercialRate>3.35</CommercialRate>

</Postage>


-<Postage CLASSID="6">

<MailService>Media Mail Parcel</MailService>

<Rate>2.61</Rate>

</Postage>


-<Postage CLASSID="7">

<MailService>Library Mail Parcel</MailService>

<Rate>2.48</Rate>

</Postage>

</Package>

</RateV4Response>

Offline

 

#13 05-02-2016 09:19:07

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

Note that both <Rate>2.48</Rate> and <CommercialRate>3.35</CommercialRate> are being returned to display the postage rates.   Look at the First Class Mail returns for example.

Offline

 

#14 06-06-2016 18:58:50

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

What is the name of the program that issues the call to the USPS to get the quotes back on the various shipping options?   That program is going to need some changes so the "online" service call can be made and to pick out the commercialrate for Regional Box A and Regional Box B.   It may need modification to pick out the "rate" amounts for the other postal options.   If you are going to do this for the version 9 software, I'll not try this program mod now, but if it's not going to be placed into version 9, I'll do this now so I can get this working for my customers.

Offline

 

#15 06-07-2016 07:05:07

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

Re: USPS Domestic mail - Regional Box A and Box B

I'll make sure this gets into V9.  Is the preference to use the commercial rates all the time, only when regular rates are zero, when a commercial address is used by the customer, etc?  I assume based on customer address (commercial vs. residential) and return only items/rates with greater than zero pricing.


Nick Hendler

Offline

 

#16 06-07-2016 15:04:11

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

Look at Postage CLASSID 47 in a previous message where I show what is returned by the USPS API when the service=online.    Two rates are returned for CLASSID 47:  <Rate>0.00</Rate>  <CommercialRate>6.01</CommercialRate>.   You SHOULD NOT tie the <Rate> value to a customer who designates their account as "residential" and you should not tie the <CommercialRate> value to a customer who designates their account as "commercial".   
The post office displays two kinds of rates:  Retail, or Commercial.   
When I purchase postage using the click and ship function of the post office, I am presented with the "retail" postage rates.   The <Rate>2.48</Rate> in the API return signifies that rate.   Regional Rate A and Regional Rate B show <Rate>0.00</Rate> which means there is no retail postage rate for those two mailservice options.    There is only a commercial rate available for those two options Regional options,  <CommercialRate>6.71</CommercialRate>.   So your program has to look for the <Commercialrate>n.nn</CommercialRate> tags to get the postage amount for Regional A or Regional B.
When I as a business, purchase postage online using the usps click and ship, I am seeing only the retail rates, not the commercial rates for postage.   I can't print any postage via click-and-ship that is commercial postage which ordinarily businesses can do.   That was taken away from Click-And-Ship early in 2016.   The only exception is the Regional A and Regional B are being displayed in Click-and-Ship with the commercial rate postage amounts.   
If I as a business owner want to get at the commercial postage rate amounts, I have to have a postage meter, or go through a third party service like Stamps.Com or Endica.com in order to print postage that has commercial postage rate present.  That allows a business to buy and print postage at the commercial rates.
This "Retail" or "Commercial" is not tied to the shopping cart customer designating residential or commercial as far as the USPS is concerned.  The commercial designation as far as the USPS is concerned means I as a business can get the commercial postage rates if I use a postage meter or a third party "postage dealer".   I can't get those commercial rates through Click-And-Ship any longer with the exception of the Regional A and Regional B boxes.   
For shopping cart owners, the <Service>Online</Service> option has to be coded in the api call in order to get the Regional A and Regional B boxes to be returned and the code must get the postage from the <CommercialRate>6.71</CommercialRate> data stream configuration.   I would not display any other <MailService> commercial rates in the shopping cart.   
"Retail" to the USPS means I as a business am using NON-Commercial Rates.   This business of Retail or CommercialRate is not tied to the customer designating residential or commercial on their shopping cart account.   For FedEx and other shippers, that designation is important on the customers shopping cart account.
I hope this all makes sense to you.   If not, give me a call at 509-327-7670.   It's complicated and you really do need to understand how we have to do business with the USPS before you make changes in your program.

Offline

 

#17 06-08-2016 09:05:12

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

Re: USPS Domestic mail - Regional Box A and Box B

So this is very much akin to getting negotiated rates via UPS.  You get a better rate when it comes back with a commercial node, so we should use that rate if you have what we'd call 'negotiated rates' enabled.  Correct?


Nick Hendler

Offline

 

#18 06-08-2016 10:07:32

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

webmaster wrote:

So this is very much akin to getting negotiated rates via UPS.  You get a better rate when it comes back with a commercial node, so we should use that rate if you have what we'd call 'negotiated rates' enabled.  Correct?

That could be an option.   But, we also need the option where we are displaying "retail rates" and include the commercial rates for Regional A and Regional B as being part of those retail rates.

Even though I am using a third party postage service and am purchasing and printing postage at the "commercial rate" I actually charge the customer the "retail rates".   I don't want to show the commercial rates on the shopping cart, except when Regional A and Regional B are displayed on the shopping cart.   Other shopping cart owners could use that feature so that only the commercial USPS rates are displayed in the shopping cart.   When I purchase the postage, I get the commercial rates for everything, but I charge the customer "retail rates" for postage.   I use the difference in the cost between retail and commercial to pay for the third party service.   When we have a lot of parcels going out, the cost differential eventually results in a small profit because it exceeds the monthly charge for the third party service.  Using the third party service I can also print the postage for First Class Mail Package and have a tracking number issued.  You can't print that kind of postage out online with the post office.  That means you have to stand in line at the post office to get that postage on your First Class Parcels if you are not using a postage meter or third party software to print the postage.

This is a little bit tricky because when we are displaying the retail rates, we want the Regional A and Regional B commercial rates to display in the shopping cart.  To do that, we have to use a service of "online" instead of a service of "all".   Online will return the Regional A and Regional B, but a service of "all" will not return Regional A and Regional B.

Offline

 

#19 06-10-2016 07:01:50

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

Re: USPS Domestic mail - Regional Box A and Box B

I think your requirements are such that a custom shipping script that calls USPS directly and handles everything on a fine-grained level with exceptions coded in is what you need.  Based on these explanations your requirements read as custom, and appear not to be in line with the needs of most clients using the software.  With that said, contact the custom shop and we'll get a job queued which does what you need, exactly as you need it.  Custom scripts are portable between V7-V9, so if you upgrade to V9 when it releases, you won't have to do anything special regarding this.


Nick Hendler

Offline

 

#20 06-10-2016 08:17:41

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

What I described is how this system should work.  When you look at the click-and-ship features on the USPS web site, the Regional A and Regional B shipping box postage is supported just as I described.   The Kryptronic shopping cart software has never fully supported the existing domestic mail options that are presented by the USPS on their web site.  My requirements are for this shopping cart to do what it is supposed to do in supporting USPS domestic mail.  It is obvious you are unwilling to or are incapable of making this software support the USPS domestic mail options.   We do a lot of shipping using the Regional A and Regional B boxes which this shopping cart does not support!   Because of that lack of support, we are constantly having to change customer orders to take advantage of the lower USPS domestic Regional A and Regional B shipping boxes.    Since you are unwilling or incapable of putting this support of the features of the USPS domestic mail into this shopping cart, I am going to start looking for another shopping cart that can support this function and get away from this Kryptronic shopping cart which does nothing but continue to make us do more work than what we should have to do.

Offline

 

#21 06-13-2016 07:26:00

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

Re: USPS Domestic mail - Regional Box A and Box B

You are the only client we have that's got an issue with USPS rates.  You have stated that you're using third party software and attempting to get rates to match:

"Even though I am using a third party postage service and am purchasing and printing postage at the "commercial rate" I actually charge the customer the "retail rates".   I don't want to show the commercial rates on the shopping cart, except when Regional A and Regional B are displayed on the shopping cart."

This really sounds custom to me.  It doesn't sound like anything a typical client using USPS rates would require.  Maybe I'm incorrect.


Nick Hendler

Offline

 

#22 06-13-2016 11:29:43

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

You are not understanding this problem properly.   What is needed here is to fix the programming bugs that are in the usps.php program so it supports the usps domestic mail options properly.   

Again, all I am asking is that the shopping cart software fully support the USPS domestic mail options.   I need the Regional A and Regional B boxes and their associated rates supported by the shopping cart.   Those are part of what is supported by the USPS click and ship feature on the USPS web site for domestic mail, but they do not show up as options in the shopping cart.   The rates for Regional A and for Regional B that are displayed in the USPS domestic mail options are commercial rates.   The USPS doesn't have "retail rates" for the Regional A and Regional B boxes.  They show the "commercial rate" for the Regional A and Regional B boxes on the USPS click and ship system.

The problem here is the usps.php kryptronic program is not coded properly so that the Regional A and Regional B shipping options appear in the shopping cart.   

The line of code below, which is in the usps.php program is one of the bug problems in that program.

     $xml .= '<Service>' . $this->xhtml_translate('ALL','ENCODE') . '</Service>';

When the service code of 'ALL' is used, the Regional A and Regional B shipping options are not returned by the USPS api.   

That line of code needs to be changed as follows:

     $xml .= '<Service>' . $this->xhtml_translate('online','ENCODE') . '</Service>';

When the service code is changed from 'ALL' to 'online', the Regional A and Regional B shipping options are returned by the USPS api.   I show this clearly in message number 12 above where everything is displayed that is returned by the usps api when the service code is changed from 'all' to 'online'.   

In message 12 above we see the following returned by the usps api when the service code is changed from 'all' to 'online'.

-<Postage CLASSID="47">
<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Regional Rate Box A</MailService>
<Rate>0.00</Rate>
<CommercialRate>6.01</CommercialRate>
</Postage>

-<Postage CLASSID="48">
<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Regional Rate Box A Hold For Pickup</MailService>
<Rate>0.00</Rate>
<CommercialRate>6.01</CommercialRate>
</Postage>

-<Postage CLASSID="49">
<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Regional Rate Box B</MailService>
<Rate>0.00</Rate>
<CommercialRate>6.71</CommercialRate>
</Postage>

-<Postage CLASSID="50">
<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Regional Rate Box B Hold For Pickup</MailService>
<Rate>0.00</Rate>
<CommercialRate>6.71</CommercialRate>
</Postage>

The above four entries are not returned when the service code is 'ALL'.    They are returned when the service code is 'online'.   

That is the first "bug" I encountered in the usps.php program.   When I make the change in that line of code to look like the line below:
     $xml .= '<Service>' . $this->xhtml_translate('online','ENCODE') . '</Service>';
The Regional A and Regional B rates show up in the list of shipping options in the shopping cart.   But, then we run into the next bug in the usps.php program.   All the postage rates displayed in the shopping cart are the commercial rates and not the retail rates.
Here's what is being returned by the usps api for Medium Flat Rate box:

-<Postage CLASSID="17">
<MailService>Priority Mail 1-Day&lt;sup&gt;™&lt;/sup&gt; Medium Flat Rate Box</MailService>
<Rate>13.45</Rate>
<CommercialRate>11.95</CommercialRate>
</Postage>

What is being displayed in the shopping cart for Medium Flat Rate Box is $11.95 postage which is the Commercial Rate.   What should be displayed in the shopping cart is $13.45 postage which is the Retail Rate for the Medium Flat Rate Box.     

You will notice in message 12 above, that the postage return amounts vary a bit from one type of Mailservice to another.

Some of the Mailservice types return both the Retail Rate and the Commercial Rate where there is a zero value in the Retail Rate and a non-zero value in the commercial rate. 
Some of the Mailservice types return both the Retail Rate and a Commercial Rate where there is a non-zero value in the Retail Rate and a non-zero value in the commercial rate.
Some of the Mailservice types return only the Retail Rate. 

The rules that should be followed by the usps.php program when there is a Retail Rate = zero and a Commercial rate above zero, the program should display the commercial rate for that mail service option.   This seems to work fine in the shopping cart for the Regional A and Regional B mailservice options.

The next rule that should be followed by the usps.php program is when there is a non-zero value for the retail rate, and a non-zero value for the commercial rate, the shopping cart should display the retail rate.   But there is a bug in the code of the shopping cart program and it displays the commercial rate instead of the retail rate.

I think the code with this next bug in the usps.php program is in the code shown below:

    // +--
     // | Loop through the result and build out our return array.
     // +--
     $return = array();
     $count  = 0;
     while (!(empty($result['RateV4Response.0']['Package.0']['Postage.' . $count]))) {
          $service_code = $result['RateV4Response.0']['Package.0']['Postage.' . $count]['MailService.0'];
          $service_rate = $result['RateV4Response.0']['Package.0']['Postage.' . $count]['Rate.0'];
          if (!(empty($result['RateV4Response.0']['Package.0']['Postage.' . $count]['CommercialRate.0']))) {
               $service_rate = $result['RateV4Response.0']['Package.0']['Postage.' . $count]['CommercialRate.0'];
          } // End of if statement.

I don't know php well enough to decipher this "IF" statement.   This "IF" statement appears to be working fine if the retail rate is zero and the commercialrate is not zero.   That's the case with the Regional A and Regional B mailservice rates and the shopping cart displays the commercialrate in the shopping cart.
But when the Retail rate has an non-zero value and the commercialrate has a non-zero value the bug in the code causes the commercial value to be displayed instead of the retail value.

If you could show me what the code change has to be to display the retail value instead of the commercial value when both of those rates are present, that should clear up the problems with the usps.php program bugs so that the program will fully support the USPS domestic mail issues.  If I was familiar with the php syntax, I could probably make this change myself and fix this problem.

Offline

 

#23 06-14-2016 13:18:12

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

Since I can't seem to get any kind of support from Kryptronic on this problem to cause the Regional Box A and Regional Box B to appear for domestic postage on the shopping cart, I made a program change to the usps.php program and now I am displaying the Regional Box A and Regional Box B for USPS domestic mail options.  I changed the service from 'ALL' to 'online' as shown below in the usps.php shopping cart program.

//     $xml .= '<Service>' . $this->xhtml_translate('ALL','ENCODE') . '</Service>';
     $xml .= '<Service>' . $this->xhtml_translate('online','ENCODE') . '</Service>';

The shopping cart displays the following:

  USPS Priority Mail 3-Day Regional Rate Box A® - $8.92
  USPS Priority Mail 3-Day Medium Flat Rate Box® - $11.95
  FedEx Home Delivery® - $13.20
  USPS Priority Mail 3-Day Regional Rate Box B® - $13.37
  USPS Priority Mail 3-Day® - $13.37
  USPS Priority Mail 3-Day Large Flat Rate Box® - $16.35
  FedEx Express Saver® - $21.59
  FedEx 2 Day® - $29.55
  FedEx Standard Overnight® - $57.27
  FedEx Priority Overnight® - $60.98
  FedEx First Overnight® - $109.40

There is one problem that remains and that is the postage values for the USPS rates are all commercial rates.   If you are not using a third party postage printing service, you should not make this change to usps.php.   You are going to be out of luck getting the Regional Box A and Regional Box B to appear in the shopping cart.   If you are using a third party postage printing service like Endicia.com, all the postage is purchased at commercial rates so the shopping cart USPS postage rates will match up with the postage printed by the Endicia software.   I compensated for the cost of the Endicia softare by adding $.25 to the handling charge which I pick up and display on the cart checkout using the special surcharge feature.

I would like to be able to further change the code so that if there is a "retail rate" present, that rate would display instead of the commercial rate.  If the "retail rate" is zero or not present, then I would like to have the commercial rate displayed.    That would complete this problem and make it a solution that would work for everyone. 
The code below is driving out the USPS rates to be only "commercial rates".  If someone could suggest how this code could be changed to display the "retail rate" if the retail value is above zero and display the "commercial rate" if the retail value is not present or is zero, it would be much appreciated.

  $service_rate = $result['RateV4Response.0']['Package.0']['Postage.' . $count]['Rate.0'];
          if (!(empty($result['RateV4Response.0']['Package.0']['Postage.' . $count]['CommercialRate.0']))) {
               $service_rate = $result['RateV4Response.0']['Package.0']['Postage.' . $count]['CommercialRate.0'];
          } // End of if statement.

I made this change to the usps.php program so it could support all the USPS domestic mail options.

Last edited by ThomasGiannou (06-14-2016 13:29:50)

Offline

 

#24 06-15-2016 07:57:30

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

Re: USPS Domestic mail - Regional Box A and Box B

Change:

Code:

if (!(empty($result['RateV4Response.0']['Package.0']['Postage.' . $count]['CommercialRate.0']))) {

To:

Code:

if (($service_rate <= 0) && (!(empty($result['RateV4Response.0']['Package.0']['Postage.' . $count]['CommercialRate.0'])))) {

Now a question for everyone else reading this:  Should the default behavior continue to be Commerial rates overriding Retail rates?  Should the service pull method be changed from 'ALL' to 'online' (ie. does anyone use Regional A/B boxes or need support for that)?


Nick Hendler

Offline

 

#25 06-15-2016 12:13:05

ThomasGiannou
Member
Registered: 02-10-2007
Posts: 184

Re: USPS Domestic mail - Regional Box A and Box B

It would be nice if the shopping cart had a system option to display Retail Postage rates or Commercial Postage rates.   A simple system option could be used to control this function.  The usps.php program would have to have some code added to support this system option.   

In order to support the Regional A and Regional B box rates and several other domestic mail options not currently supported by this shopping cart, the service option must be changed from "ALL" to "online".    The "online" service option fully supports all the domestic mail options and supports the Retail and the Commercial rates.

If the commercial postage rates are displayed by the shopping cart, the business must use a postage meter or third party postage printing software in order to print postage with the commercial rates.   The USPS click and ship function on the USPS.COM web site no longer supports the printing of Commercial Rate postage as of February 2016.   They are displaying the higher Retail Rates for postage.  If you take a parcel to the post office, you cannot purchase commercial rate postage.

We have been using the Regional A and Regional B boxes ever since the US Postal service introduced them several years ago.   In order for us to pass on the much lower postage rates for the Regional A and Regional B boxes, we have to change most of the orders we receive from the shopping cart.   Because the Regional Box A and the Regional Box B domestic mail options do not show up in the current shopping cart, we are having to modify most of our orders because those boxes are what we use the most.   We are also losing business because the customers are seeing only the Retail postage rates and not the commercial rates we are actually charging them.   

This has been a long standing problem with this shopping cart.   It doesn't support Regional Box A and Regional Box B US mail domestic shipping options.   And it doesn't support the display of the commercial rates for postage.

When I made a one line change to the usps.php to change the service from "ALL" to "online" all of a sudden, my problems with this shopping cart were solved.   The Regional Box A and the Regional Box B showed up on the shopping cart.   Also, all the postage rates were displaying the commercial rates.   Fortunately, this has fixed the major problems I have been experiencing with this shopping cart.   I was so frustrated with this problem, I was ready to dump this shopping cart and go to another shopping cart vendor.

If one changes the usps.php program to use the "online" service code and put in the code change noted in message #24 above, the cart will display the Regional Box A and Regional Box B in the shopping cart and the other rates for postage will be displayed as Retail Postage rates.   If a business doesn't have a postage meter or third party software to print the commercial rate postage, then that would be a business who needs to print the Retail postage rates and have those rates displayed in this shopping cart.

What is needed in this shopping cart is to change the service code from "ALL" to "online" and to provide a system option to cause the shopping cart to display Retail Rates or Commercial Rates for postage.   By making the change in the service code to "online" all of the US mail domestic shipping options can be supported.   Also, the choice of which shipping options each business wants to use is still in place.

Offline

 

Board footer