Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

    Default Disable Minimum order value for user

    Is there a way to disable Minimum order value for a specified user ?

    thank you

  2. #2
    Join Date
    Oct 2007
    Posts
    143
    Plugin Contributions
    0

    Default Re: Disable Minimum order value for user

    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:

    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');
    to this:

    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');
    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) {
                zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
    to this:

    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));
    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..

  3. #3
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

    Default Re: Disable Minimum order value for user

    Thank you so much , works very well !

 

 

Similar Threads

  1. v138a Minimum value order for free shipping?
    By kobra8 in forum Managing Customers and Orders
    Replies: 0
    Last Post: 12 Apr 2013, 09:47 PM
  2. How to disable the minimum value on my product list?
    By HegeES in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 21 Jan 2010, 12:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR