Last active
April 10, 2020 21:43
-
-
Save aatronco/cdf357f57431ac92c8f5c64fb7872786 to your computer and use it in GitHub Desktop.
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
{% if order.subtotal < 100 %} | |
<script> | |
// Add this to your checkout block. Change the minimum from 100 to your desired number. Use a large number to block all purchase, change to 0 to block none | |
// Design your message | |
var message = '<i class="fa fa-info-circle fa-fw"></i>There is a minimum order required of <strong>100 USD</strong>' | |
var alert_m = '<div align="middle" id="alert-minimum" class="text-center alert alert-warning m-0">' + message + '<br><a onclick="history.go(-1); return false;" href="#" class="btn btn-sm btn-secondary mt-2" title="← {% t 'Go back & Keep Shopping' %}">← {% t "Go back & Keep Shopping" %}</a></div>' | |
$(document).ready(function(){ | |
$("#checkout").before(alert_m) | |
$('input').attr('disabled','disabled'); | |
$('#checkout').attr('style',"background: #e6e6e6;").hide(); | |
}) | |
</script> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment