Is there a way to disable Minimum order value for a specified user ?
thank you
Printable View
Is there a way to disable Minimum order value for a specified user ?
thank you
we've edited the minimum order amount to be disabled if you're logged in as admin.. you could do something similar for a specific user..
in the file includes/classes/observers/class.minimum_order_amount.php, change this code:
to this:Code:if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
$_SESSION['valid_to_checkout'] = false;
$messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
and right below it, changed this code:Code:if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT && $_SESSION['customer_id'] != '9999') {
$_SESSION['valid_to_checkout'] = false;
$messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
to this:Code:if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
just tested quickly and it seems to work, but as always test on a backup before applying to live site. and obviously, replace '9999' with the customer_id in questions..Code:if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT && $_SESSION['customer_id'] != '9999') {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
Thank you so much , works very well !