Miva Merchant 5 Module FAQs » USPS Advanced (VC_USPSADVANCED)


I have the Shipping Supermod installed and when I enable the insurance option for my shipping methods in the USPS Advanced module the methods acquired by the Shipping Supermod have the rates displayed in them (I can see the rates in admin) and the rates during checkout are not accurate.

Here's a long winded explanation. To jump to the "workaround" go straight to the end.

When the Shipping Supermod acquires methods it saves the name of the method that is displayed by the respective modules. Typically a module would display a method as:

USPS Priority ($5.00)

The Shipping Supermod takes that method name, finds the ($xx.xx) in it and removes it to determine what name to save. However, when it's insurance options are enabled the USPS Advanced module displays it's methods in the format:

USPS Prioritiy ($5.00) + Insurance ($2.05)

This "confuses" the Shipping Supermod. It finds the last ($2.05), removes it and use the remainder as the method name. So it would save that method name as:

USPS Priority ($5.00) + Insurance

and display that as the method name at checkout (unless of course you edit it in admin).

That's part of the problem. In addition, during checkout the Shipping Supermod "takes over" the process of displaying shipping and it individually contacts each installed shipping module, pretending that it is Merchant itself, so that each returns to it the list of shipping methods it would normally display to the customer in the shipping selection field. However, shipping modules do not return the shipping cost separately, it is a part of the name that the module means to be displayed (eg. the USPS Advanced module might return "USPS Priority ($5.00)" with the intent that this is displayed as the method in the drop down shipping selection field). Since the Shipping Supermod displays it's own name for the shipping method it has to extract the cost from the name returned by the module and then add that to the name that was configured for that method.

Normally, without insurance, the USPS Advanced module might return:

USPS Priority ($5.00)

and the shipping supermod would find the ($5.00), derive from that the cost of $5.00 and then display it's own name for that method with the ($5.00) at the end. However, in the case of the USPS Advanced module with the insurance rates enabled, the method name might be something like:

USPS Priority ($5.00) + Insurance ($2.05)

This, again, confuses the Shipping Supermod. It finds the last instance of ($xx.xx) in the method name and uses that as the rate. So in this case it would display it's own name for that method in the list with a price of only $2.05.

The workaround is to use the option in the USPS Advanced module to control what is displayed in the "Drop down message:" field. It won't actually change what is displayed in the shipping selection field, that is controlled by the Shipping Supermod, but it will permit the Shipping Supermod to correctly determine the shipping rate. The key is to have the total shipping cost be the last rate in the method name returned by the module. This is accomplished by configuring the "Drop down message:" field for each method with a message such as:

Priority Mail ($%total_cost%)

(obviously changing the actual name appropriately for each method)

The %total_cost% token will display the total cost, including insurance, at the end of the message and the Shipping Supermod will use that amount in it's own display of the method.

Last update: 2007-06-14 11:56
Author: Thor
Revision: 1.0

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry