Suppose you want to allow COD as a payment option on your store only if the cart reaches a certain minimum amount, please paste the following code in your dashboard>settings>advanced features>3rd party java script code>


You can change the highlighted number with your required minimum check out amount.




<script>

//for desktop

jQuery("#click_cash").click(function(){

var amt = jQuery('#totalAmoutCOD').text();

//var amtmatch = amt.match(/(\d+)/g);

var amtmatch = amt.replace("Rs.",'').trim();

 

var fixamt=1000;

if(amtmatch < fixamt) {

var newtxt = 'COD is available only if Order values is above Rs ' + fixamt;

jQuery('#isCODEnable').html(newtxt);

jQuery('#tab3PostOrder').attr('href','#');

}

});

//for mobile

jQuery("#dropdown").change(function(){

var amt = jQuery('.option3 #totalAmoutCOD').text();

//var amtmatch = amt.match(/(\d+)/g);

var amtmatch = amt.replace("Rs.",'').trim();

 

var fixamt=1000;

if(amtmatch < fixamt) {

var newtxt = 'COD is available only if Order values is above Rs ' + fixamt;

jQuery('.option3 #isCODEnable').html(newtxt);

jQuery('.option3 #tab3PostOrder').attr('href','#');

}

});

</script>