Zen Follower
- Join Date:
- Feb 2016
- Location:
- Canada
- Posts:
- 192
- Plugin Contributions:
- 0
Minimum Order Wholesale
Hello,
I am running ZC 2.0.1 with PHP 8.2 and have the Minimum Order Plugin. I am using the wholesale option for some of my customers but wanted a different minimum order for my wholesale customers. I have added a minimum order wholesale field in my customer database which all worked fine with my older version ZC 1.5.7d. The code I used is below which gives me the error "PHP Parse error: syntax error, unexpected variable "$threshold", expecting "," or ";" in ..." in 2.0.1
<?php $threshold = MIN_ORDER_AMOUNT;// set it minimum values if ($_SESSION['cart']->show_total() < $threshold ) { $alertJM="Shipping is only available for orders over " . $currencies->format ($threshold); } if ( $_SESSION['cart']->show_total() > $threshold ) { $alertJM="We do not deliver to your postal code.<br>Please contact us if you have any questions."; } if ($_SESSION['customers_whole'] != '' > 0 ){ $threshold = MIN_WS_ORDER_AMOUNT;// set it minimum values $alertJM="We do not deliver to your postal code.<br>Please contact us if you have any questions."; } ?>Any help is appreciated.