Page 6 of 6 FirstFirst ... 456
Results 51 to 60 of 60
  1. #51
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Re: Minimum order for wholesale customers only.

    Just to chime in and hopefully help someone else on the thread; the best way is to use 'not equal to' instead, so you can catch all the higher level of wholesale customers too (not just the 1st level). Also notice singular 'customer_whole' (that may be different depending on your Dual Pricing version).

    Code:
    if ($_SESSION['cart']->count_contents() > 0 && $_SESSION['customer_whole'] != 0 && MIN_ORDER_AMOUNT > 0)

  2. #52
    Join Date
    Feb 2009
    Posts
    112
    Plugin Contributions
    0

    Default Re: Minimum order for wholesale customers only.

    Hello,
    I am reading this post and I have installed the php as suggested. I now have box in my product box a product quantity add minimum unit mix yes or no. I have yes on and I have in wholesale prices the price. I have tried all the boxes relating to product min amount etc. In the main web (retail) the box shows in the catalog either with 1 if I set 1 or 5 if I set 5 to these figures. How do I work this script should I have to change something in the script?
    Any help is greatly appreciated as I just can't figure it out.
    Thanks
    Ron

  3. #53
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Re: Minimum order for wholesale customers only.

    Hi Ron,

    Please let us know the following to help you troubleshoot:
    - A link to your store
    - What version of ZenCart
    - What PHP did you install? Which module/version, and did you customize it?
    - If you did customize, please provide the code here so we can have a look.

  4. #54
    Join Date
    Feb 2009
    Posts
    112
    Plugin Contributions
    0

    Default Re: Minimum order for wholesale customers only.

    Hello,
    My website is www.stuffwholesale.com I have install this code and have not modified it.
    My zencart store is on V1.50 and I am using dual pricing 2.1

    Code:
    /includes/classes/observers/class.minimum_order_amount.php
    <?php
    /**
    * class.minimum_order_amount.php
    *
    * @copyright Copyright 2005-2007 Andrew Berezin eCommerce-Service.com
    * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: config.minimum_order_amount.php 1.0.1 20.09.2007 0:06 AndrewBerezin $
    */

    /**
    * Observer class used to check minimum order amount
    *
    */
    class minimum_order_amount extends base {
    /**
    * constructor method
    *
    * Attaches our class to the ... and watches for 4 notifier events.
    */
    function minimum_order_amount() {
    global $zco_notifier;
    // $_SESSION['cart']->attach($this, array('NOTIFIER_CART_GET_PRODUCTS_START', 'NOTIFIER_CART_GET_PRODUCTS_END'));
    $zco_notifier->attach($this, array('NOTIFY_HEADER_END_SHOPPING_CART', 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING', 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT', 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION'));
    }
    /**
    * Update Method
    *
    * Called by observed class when any of our notifiable events occur
    *
    * @param object $class
    * @param string $eventID
    */
    function update(&$class, $eventID) {
    global $messageStack;
    global $currencies;
    switch ($eventID) {
    case 'NOTIFIER_CART_GET_PRODUCTS_END':
    case 'NOTIFY_HEADER_END_SHOPPING_CART':
    if ($_SESSION['cart']->count_contents() > 0 && $_SESSION['customers_wholesale'] == 1 && 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');
    }
    }
    break;
    case 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING':
    case 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT':
    case 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION':
    if ($_SESSION['cart']->count_contents() > 0 && $_SESSION['customers_wholesale'] == 1 && MIN_ORDER_AMOUNT > 0) {
    if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
    zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
    }
    }
    break;
    default:
    break;
    }
    }
    }
    ?>

  5. #55
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Re: Minimum order for wholesale customers only.

    I can't seem to find a product with multiple prices/attributes, or a minimum order amount in the cart. Can you provide a link directly to an affected product, and explain exactly what you would like it to do?

  6. #56
    Join Date
    Feb 2009
    Posts
    112
    Plugin Contributions
    0

    Default Re: Minimum order for wholesale customers only.

    Here is the link You will need to login use my login "stuffwholesale###################### pass 6KAN95k" This is my wholesale account level in dual pricing. You will see that the minimum quantity is on both pages 5 I want it to be 1 on the retail page then when you log in wholesale you would get your appropriate pricing but have to order the minimum of 5. Thanks for your help.

  7. #57
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Re: Minimum order for wholesale customers only.

    Ah, I see what you mean now. There is no built-in functionality to Dual Pricing or to the Minimum Order, to make wholesalers purchase a minimum quantity of a product. This Minimum Order applies to dollar amounts for the total order. I recommend you hire a skilled developer to build a Wholesale Minimum Quantity feature for you. Here's a link to the developer listings: http://www.zen-cart.com/forumdisplay...rt-Contractors

  8. #58
    Join Date
    Feb 2009
    Posts
    112
    Plugin Contributions
    0

    Default Re: Minimum order for wholesale customers only.

    Thanks very much for your help, I have contacted a person, do you do this work?

  9. #59
    Join Date
    Oct 2013
    Location
    UK
    Posts
    9
    Plugin Contributions
    0

    Default Re: Minimum order for wholesale customers only.

    Quote Originally Posted by RonGin View Post
    Thanks very much for your help, I have contacted a person, do you do this work?
    Hi, Can anyone advise me please! www.ew-trading.com

    Have today installed dual pricing as want to separate retail and wholesale sections - all fine. Installed Minimum order module and all ok but seems to be an issue with the auto_loaders/config.minimum_order_amount.php, was showing blank sceens and trial and error leaves me with this file removed so site can function, and as such, module isn't working... all other files ok but each time I try and load this I get blank screens. Any advice?? Using 1.3.9 zencart.

    Thanks!

  10. #60
    Join Date
    Jun 2018
    Location
    mmma
    Posts
    2
    Plugin Contributions
    0

    Default Re: Minimum order for wholesale customers only.

    Quote Originally Posted by bumpspt View Post
    Let's try to make that last post a little easier to use....

    PHP Code:
    <?php

    /**

     * class.minimum_order_amount.php

     *

     * @copyright Copyright 2005-2007 Andrew Berezin eCommerce-Service.com

     * @copyright Portions Copyright 2003-2006 Zen Cart Development Team

     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

     * @version $Id: config.minimum_order_amount.php 1.0.1 20.09.2007 0:06 AndrewBerezin $

     */



    /**

     * Observer class used to check minimum order amount

     *

     */

    class minimum_order_amount extends base {

      
    /**

       * constructor method

       *

       * Attaches our class to the ... and watches for 4 notifier events.

       */

      
    function minimum_order_amount() {

        global 
    $zco_notifier;

    //      $_SESSION['cart']->attach($this, array('NOTIFIER_CART_GET_PRODUCTS_START', 'NOTIFIER_CART_GET_PRODUCTS_END'));

        
    $zco_notifier->attach($this, array('NOTIFY_HEADER_END_SHOPPING_CART''NOTIFY_HEADER_START_CHECKOUT_SHIPPING''NOTIFY_HEADER_START_CHECKOUT_PAYMENT''NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION'));

      }

      
    /**

       * Update Method

       *

       * Called by observed class when any of our notifiable events occur

       *

       * @param object $class

       * @param string $eventID

       */

      
    function update(&$class$eventID) {

        global 
    $messageStack;

        global 
    $currencies;

        switch (
    $eventID) {

          case 
    'NOTIFIER_CART_GET_PRODUCTS_END':

          case 
    'NOTIFY_HEADER_END_SHOPPING_CART':

            if (isset(
    $_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {

              if (
    $_SESSION['customer_whole'] != '' 0) {

                if (
    $_SESSION['cart']->count_contents() > && 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');

                  }

                }

              }

            }

            break;

          case 
    'NOTIFY_HEADER_START_CHECKOUT_SHIPPING':

          case 
    'NOTIFY_HEADER_START_CHECKOUT_PAYMENT':

          case 
    'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION':
          
              if (isset(
    $_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {

              if (
    $_SESSION['customer_whole'] != '' 0) {

                if (
    $_SESSION['cart']->count_contents() > && MIN_ORDER_AMOUNT 0) {

                  if(
    $_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {

                    
    zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));

                  }

                }

              }

            }

            break;

          default:

            break;

        }

      }

    }

    ?>
    im not sure where this code can work on 1.5.5f for minimum order.

    my website not using minimum order, instead using minimum quantity.

    i just straightly use your code and do some changes from order to quantity.

    works like charm! thanks bro.

    zc 1.5.5f

 

 
Page 6 of 6 FirstFirst ... 456

Similar Threads

  1. v150 Help with Minimum Order for Group Pricing Customers Only
    By philip937 in forum General Questions
    Replies: 5
    Last Post: 14 Oct 2013, 03:55 AM
  2. Need to have wholesale pricing with quantity discounts for wholesale customers only..
    By littleturtlemama in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 16 Dec 2010, 04:47 AM
  3. Better Together extension for Wholesale Customers Only
    By point4design in forum Setting Up Specials and SaleMaker
    Replies: 1
    Last Post: 28 Oct 2010, 11:49 PM
  4. Setting minimum order for check/money order only
    By coldspag in forum Managing Customers and Orders
    Replies: 0
    Last Post: 26 Nov 2008, 02:18 PM
  5. Need to have wholesale pricing with quantity discounts for wholesale customers only..
    By littleturtlemama in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 29 Sep 2007, 10:01 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