Neptune Web, Inc. logo

Solving Magento Unirgy Drop Ship USPS Flat Rate Shipping Problem

Assuming you are running Magento 1.8 Enterprise, you may have noticed that certain shipping methods never appear in the checkout. These include USPS Flat Rate methods, but could include any method with a long name.

The problem is that Magento's Unirgy Drop Ship module will not display shipping methods with method codes greater than 30 characters.

(Around) line 72 of app/code/community/Unirgy/DropshipSplit/Model/Carrier.php (A similar problem occurs in non-Split module code) the carriers and methods within Drop Ship are validated against the vendors shipping methods. e.g.

foreach ($vRates as $rate) {
                    if (empty($systemMethods
[$rate->getCarrier()][$rate->getMethod()])) { continue; 
/* shipping method is skipped */
The method, being truncated at 30 characters, will fail on this test and the shipping method will not appear.
mysql> desc udropship_shipping_method;
| Field        | Type             | Null | Key | Default |
| shipping_id  | int(10) unsigned | NO   | MUL | NULL    |
| carrier_code | varchar(30)      | NO   |     | NULL    |
| method_code  | varchar(30)      | NO   |     | NULL    |

As you can see from the data, below, the full name of the shipping method is "Priority Mail Small Flat Rate Box". It is being cut off at 30 characters. The same thing happens with medium and large boxes.

Truncated Data Table

To resolve, simply give more space in the column and update the records. E.g.

# give more space to column
mysql> alter table udropship_shipping_method
 modify method_code varchar(100) default null;
# update truncated shipping methods. 
#This may also occur with Medium and Large boxes. 
mysql> update udropship_shipping_method set method_code = 
'Priority Mail Small Flat Rate Box' where method_code =
 'Priority Mail Small Flat Rate ';

This one was so blatant, but took a long time to dig out, so I had to share it. Send me a comment (below) if this article helped.

If there is anything Neptune Web can help you with regarding Drop Shipping and Magento, give us a call.

Neptune Web is a full-service Boston-area interactive web and digital marketing agency with expertise in Website Design, Web Development, Digital Marketing Strategy and Execution.

We look forward to your comments and would be most happy to address and help solve any Digital Marketing or Website Design & Development challenges you may have.

comments powered by Disqus