| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| snippets:shipping:free_shipping_using_a_coupon [2013/05/17 18:02] – Setting text to "APPLIED" instead of empty space. Easy to find and remove if desired. 86.52.104.48 | snippets:shipping:free_shipping_using_a_coupon [2022/04/07 19:12] (current) – [Related Forum Discussions] marija |
|---|
| ---- dataentry snippet ---- | ---- dataentry snippet ---- |
| type : snippet #do not change this line | type : snippet # do not change this line |
| category : shipping #mention the category like 'shipping', 'checkout' etc | category : shipping # mention the category like 'shipping', 'checkout' etc |
| name : Free shipping using a coupon #the name of the snippet | name : Free shipping using a coupon # the name of the snippet |
| description : #description about snippet | description : # description about snippet |
| versions_tags : 0.6.0, 0.7.0, 0.7.1, 0.7.2, 1.0 #compatible versions | versions_tags : 0.6.0, 0.7.0, 0.7.1, 0.7.2, 1.0, 1.1 # compatible versions |
| reference_url : http://forum.foxycart.com/comments.php?DiscussionID=4487&page=1 #Item_1 # External link | reference_url : https://forum.foxycart.com/discussion/4487 # Item_1 # External link |
| tags_tags : snippets, shipping, advance #tags, separated by commas. | tags_tags : snippets, shipping, advance # tags, separated by commas. |
| date_dt : 2011-05-27 #the date in YYYY-MM-DD format | date_dt : 2011-05-27 # the date in YYYY-MM-DD format |
| ---- | ---- |
| | |
| | |
| ===== Setup 1: Free shipping using a 0% discount coupon ===== | ===== Setup 1: Free shipping using a 0% discount coupon ===== |
| |
| | <WRAP center round important 80%> |
| | **Using version 2.0?** There is a new snippet available for our latest version, [[v:2.0:snippets|available from here]]. |
| | </WRAP> |
| ==== Step 1: Add a coupon ==== | ==== Step 1: Add a coupon ==== |
| |
| </code> | </code> |
| |
| ===== Related Forum Discussions ===== | |
| |
| * http://forum.foxycart.com/comments.php?DiscussionID=4487&page=1#Item_1 | |
| |
| |
| jQuery(document).ready(function() { | jQuery(document).ready(function() { |
| if (fc_json.custom_fields[FCcode] == "true") { | if (fc_json.custom_fields[FCcode] == "true") { |
| jQuery("#fc_cart_foot_discount_new").before('<tr class="fc_cart_foot_discount"><td colspan="3" class="fc_col1">Free Shipping:</td><td class="fc_col2"><span class="fc_discount">TBD</span><span class="fc_cart_coupon_remove"><a title="Remove this coupon" class="fc_cart_remove_link" href="https://'+window.location.hostname+'/cart.php?h:'+FCcode+'=false">[x]</a></span></td></tr>'); | var colspan = jQuery("#fc_cart_table tr.fc_cart_item:first td").length - 1; |
| | jQuery("#fc_cart_foot_discount_new").before('<tr class="fc_cart_foot_discount"><td colspan="' + colspan + '" class="fc_col1">Free Shipping:</td><td class="fc_col2"><span class="fc_discount">TBD</span><span class="fc_cart_coupon_remove"><a title="Remove this coupon" class="fc_cart_remove_link" href="https://'+window.location.hostname+'/cart.php?h:'+FCcode+'=false">[x]</a></span></td></tr>'); |
| } | } |
| }); | }); |
| | |
| if (fc_json.custom_fields[FCcode] == "true") { | if (fc_json.custom_fields[FCcode] == "true") { |
| jQuery("#fc_cart_foot_shipping").before('<tr id="freeshipping" class="fc_cart_foot_discount"><td colspan="2" class="fc_col1">Free Shipping:</td><td class="fc_col2"><span class="fc_discount"> </span></td></tr>'); | var colspan = jQuery("#fc_cart_table tr.fc_cart_item:first td").length - 1; |
| | jQuery("#fc_cart_foot_shipping").before('<tr id="freeshipping" class="fc_cart_foot_discount"><td colspan="' + colspan + '" class="fc_col1">Free Shipping:</td><td class="fc_col2"><span class="fc_discount">APPLIED</span></td></tr>'); |
| } | } |
| | |
| jQuery(document).ready(function() { | jQuery(document).ready(function() { |
| if (fc_json.custom_fields[FCcode] == "true") { | if (fc_json.custom_fields[FCcode] == "true") { |
| jQuery("#fc_cart_foot_shipping").before('<tr id="freeshipping" class="fc_cart_foot_discount"><td colspan="2" class="fc_col1">Free Shipping:</td><td class="fc_col2"><span class="fc_discount">APPLIED</span></td></tr>'); | var colspan = jQuery("#fc_cart_table tr.fc_cart_item:first td").length - 1; |
| | jQuery("#fc_cart_foot_shipping").before('<tr id="freeshipping" class="fc_cart_foot_discount"><td colspan="' + colspan + '" class="fc_col1">Free Shipping:</td><td class="fc_col2"><span class="fc_discount">APPLIED</span></td></tr>'); |
| } | } |
| | |
| jQuery(document).ready(function() { | jQuery(document).ready(function() { |
| if (fc_json.custom_fields[FCcode] == "true") { | if (fc_json.custom_fields[FCcode] == "true") { |
| jQuery("#fc_cart_foot_shipping").before('<tr id="freeshipping" class="fc_cart_foot_discount"><td colspan="2" class="fc_col1">Free Shipping:</td><td class="fc_col2"><span class="fc_discount"> </span></td></tr>'); | var colspan = jQuery("#fc_cart_table tr.fc_cart_item:first td").length - 1; |
| | jQuery("#fc_cart_foot_shipping").before('<tr id="freeshipping" class="fc_cart_foot_discount"><td colspan="' + colspan + '" class="fc_col1">Free Shipping:</td><td class="fc_col2"><span class="fc_discount"> </span></td></tr>'); |
| } | } |
| }); | }); |