Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var alertMessage = "You need to order at least $150 in order to checkout";
- function priceCheck() {
- if (fc_json.total_price >= 150) {
- FC.checkout.config.isValid = true;
- } else {
- FC.checkout.config.isValid = false;
- alert(alertMessage);
- }
- }
- // Run our custom validation before the checkout validates
- FC.checkout.overload("validateAndSubmit", "priceCheck", null);
- jQuery(document).ready(function() {
- if (fc_json.total_price < 150) {
- alert(alertMessage);
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement