This is an old revision of the document!
Table of Contents
- type:
- snippet
- category:
- shipping
- name:
- Setting a single flat rate shipping amount no matter which categories are included
- versions:
- 0.6.0, 0.7.0, 0.7.1, 0.7.2
- reference:
- http://forum.foxycart.com/comments.php?DiscussionID=4389&page=1
- date:
- 2011-05-27
Setting a single flat rate shipping amount no matter which categories are included
Versions 0.7.1 and older: Note that applying javascript shipping modifications using either live or flat rates where you are setting custom values has been found to not work as expected for subscription based products where you need the shipping to apply to each subscription renewal. A fix is in place for versions 0.7.2 and newer.
When using multiple categories but you want a single flat rate shipping value for the whole shipment (rather than per category), you need to set this up using javascript. Currently, if all of your categories had a flat rate shipping value of 9, having a product from two different categories would equal $18 shipping rather than a flat $9.
Step 1: Update categories
Update all categories to 'Shipped using a flat rate fee' with a value of 0 in the 'Product Delivery Option' section.
Step 2: Insert Javascript
Paste the following right before the closing </head>
tag in your checkout template, and update the value to be whatever shipping cost you need:
<script type="text/javascript" charset="utf-8"> jQuery(document).ready(function() { FC.checkout.config.orderFlatRateShipping = 9; FC.checkout.updateShipping(-1); }); </script>
This will make the shipping charges $9 no matter what is added to the cart.