Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default I have one manufacturer that has a $500 minimum order. No other manufacturer has it

    I have a manufacturer that has a min $500 order before shipping. How can I set this up so anything below that threshold only to that manufacturer can be accomplised?

    Any ideas?

    Thanks in advace.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: I have one manufacturer that has a $500 minimum order. No other manufacturer has

    You're going to have to write custom code. Nothing is built in to handle a situation such as this.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Feb 2006
    Location
    Boise, ID
    Posts
    334
    Plugin Contributions
    0

    Default Re: I have one manufacturer that has a $500 minimum order. No other manufacturer has

    Could use this as well, any suggestions on where to go to get it done ?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,873
    Plugin Contributions
    96

    Default Re: I have one manufacturer that has a $500 minimum order. No other manufacturer has

    The easiest way to do this would be to "override" the shopping_cart class; it's one of the auto-loaded classes, so an override is possible.

    1) Create the folder /includes/classes/overrides and copy /includes/classes/shopping_cart.php into it.

    2) Copy the file /includes/auto_loaders/config.core.php into /includes/auto_loaders/overrides and edit lines 63:64 (both 1.3.9 and 1.5.0):
    Code:
    $autoLoadConfig[0][] = array('autoType'=>'class',
                                    'loadFile'=>'overrides/shopping_cart.php');
    3) Edit the function get_products in /includes/classes/overrides/shopping_cart.php. You're interested in the path when $check_for_valid_cart is true. In the while-loop that checks each product in the cart, sum up the value of all products from your "special" manufacturer and just prior to returning from the function, if $check_for_valid_cart is true and the total of products from your manufacturer is less than $500, set $_SESSION['valid_to_checkout'] = false and append your custom error message to $_SESSION['cart_errors'].

    P.S. If the notifier NOTIFIER_CART_GET_PRODUCTS_START raised by the shopping cart class included the value of $check_for_valid_cart, you could accomplish this using an observer class.

 

 

Similar Threads

  1. v139h Minimum Order Based On Manufacturer
    By seanscully in forum Managing Customers and Orders
    Replies: 0
    Last Post: 31 Oct 2013, 08:37 PM
  2. v151 Setting 2 attributes, other one has stock that is visible, other one doesnt have stoc
    By Juhanuha in forum Setting Up Categories, Products, Attributes
    Replies: 15
    Last Post: 30 May 2013, 06:53 AM
  3. Can you set a minimum dollar amount that has to be ordered
    By inklingsolutions in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 2 Apr 2009, 11:27 PM
  4. Minimum order per Manufacturer
    By mydanilo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Apr 2008, 08:22 AM
  5. Minimum Order Based On Manufacturer
    By CelticKatt in forum Managing Customers and Orders
    Replies: 2
    Last Post: 5 May 2007, 03:26 AM

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