Created
October 20, 2010 16:11
-
-
Save kylewest/636726 to your computer and use it in GitHub Desktop.
RPMWare Free Shipping Javascript v2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function() { | |
var yourPriceLabel = $("#ctl00_MainContentPlaceHolder_YourPriceLabel"); | |
if (yourPriceLabel.length) { | |
var itemPrice = parseFloat(yourPriceLabel.text().replace(/[^\d\.]+/g,"")); | |
console.log(itemPrice); | |
if (itemPrice != NaN) { | |
// Replace "ENTER_YOUR_PRICE_HERE" with the starting price you want free shipping displayed. E.g. 150.00 or 123.45. Do NOT enter a dollar sign! | |
if (itemPrice >= 200) { | |
console.log("Item is eligible for free shipping"); | |
// Show a message under the price. You may change "FREE SHIPPING" to whatever you like. | |
yourPriceLabel.after("<br/>FREE SHIPPING"); | |
} | |
} | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment