Hi Ray, posting this here in case anyone else wants to use it.
In your cart.php page just add the following in the "content" area of your page, but after the include line somewhere
<?php
include "vsadmin/inc/inccart.php"
?>
This is just a small bit of basic javascript and you can set this up several ways.
You will need to set your amount threshold too.
<!-- minimum will pick up amount begin -->
<script>
var minpikupamt = 100
var ordsubtot = (<?php echo $totalgoods ;?>);
if (ordsubtot < minpikupamt) {
if (document.getElementsByClassName('cdformtwillpickup')[0]){
document.getElementsByClassName('cdformtwillpickup')[0].style.display = "none";
document.getElementsByClassName('cdformwillpickup')[0].style.display = "none";
document.getElementsByName("willpickup")[0].disabled = true; ;}
}
</script>
<!-- minimum will pick up amount end -->
Be sure to change the number in red there to the amount you want customers to spend to get the pickup option.
This does two things - It disables the input from being ticked, and hides the the input and text as well.
If you want to show the box and text (maybe add a message so customers know why it can't be ticked) then just remove these two lines
document.getElementsByClassName('cdformtwillpickup')[0].style.display = "none";
document.getElementsByClassName('cdformwillpickup')[0].style.display = "none";
from the code.
This will not be overwritten by updates and this is for .php only.
One small change for .asp if anyone needs it.
You can see it working on the test site here - https://www.floridasurpluswarehouse.com/dev/products.php
Add 100+ in product to the cart for the will pick up option to show.
Thanks,
David