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
- 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
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.