====== Remove days timeframe from USPS rates ======
**This snippet has been replaced.** In place of the following snippet, we now have [[v:2.0:shipping:custom_code|a custom shipping code]] feature in FoxyCart 2.0 that allows you to modify returned live rates and provide custom rates to your customers without needing to add extra javascript to change the way the checkout works. **Please use [[v:2.0:shipping:custom_code|the new custom shipping code functionality]] instead of this snippet.** [[v:2.0:shipping:custom_code:migrating|Review this page for notes]] on migrating to the new functionality. This page will remain for reference.
Recently USPS reworked their priority rates to make it clearer how long a given rate will take in transit. This can be confusing for customers, especially if the products you sell don't ship straight away. This snippet removes the "1-Day", "2-Day" etc from the rate names. For details on the changes USPS made, [[https://www.usps.com/making-priority-mail-better.htm|see their website]].
==== Step 2: Disable Shipping Rate Signing ====
As this snippet will be altering the returned rates, you will need to ensure that shipping rate signing is disabled for your store. To do that, head to the “shipping” section of your store's FoxyCart administration, and at the bottom of the page ensure that “enable shipping rate signing” is disabled.
==== Step 2: Add Javascript ====
Add the following to the "custom footer" field of the "Add custom header and footer code to your templates" section in your store's FoxyCart administration, in TEMPLATES » configuration:
{% if context == 'cart' or context == 'checkout' %}
{% endif %}
Alternatively you can also add this code right at the end of the ''cart include'' template (not the ''cart'' or ''checkout'' templates, the ''cart include'' template will include it there for you).