Thread: Minimum Order

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32
  1. #21
    Join Date
    Mar 2006
    Posts
    14
    Plugin Contributions
    0

    Default Re: Minimum Order

    I just used my basic Zen Cart skills and made the install. It seems to be working. Thank you!

  2. #22
    Join Date
    Mar 2011
    Location
    Portland, OR
    Posts
    8
    Plugin Contributions
    0

    Default Re: Minimum Order

    Hi there,

    This is an older thread, but hopefully someone here can still help me.

    I've installed the Minimum Order module and it works fine as described. No problem there.

    However, I find that the warning message appearing on the shopping cart page to be a little offputting (it makes it seem like the customer has done something wrong the very first time they add a low cost item to the cart). I'd rather have the message appear a step later on the checkout page. I'm also using the FEC module, so would like the warning message to appear on the FEC one page checkout page (instead of the shopping cart page).

    I tried playing around with the case statements in the class.minimum_order_amount.php file, but can't seem to get it right. Does anyone here (especially the module developers) have any thoughts on how to accomplish this?

    For reference, here's the pertinent code from that file:

    Code:
      function update(&$class, $eventID) {
        global $messageStack;
        global $currencies;
    	global $db;
        switch ($eventID) {
          case 'NOTIFIER_CART_GET_PRODUCTS_END':
          case 'NOTIFY_HEADER_END_SHOPPING_CART':
    	    if (isset($_SESSION['customer_id'])){
    			$prevOrders = $db->Execute("SELECT count(orders_id) total_orders FROM ".TABLE_ORDERS." WHERE customers_id = ".(int)$_SESSION['customer_id']);
    			if ((int)$prevOrders->fields['total_orders'] == 0) {
    				if ($_SESSION['cart']->count_contents() > 0 && MIN_FIRST_ORDER_AMOUNT > 0) {
    				  if($_SESSION['cart']->show_total() < MIN_FIRST_ORDER_AMOUNT && $_SESSION['cart']->show_total() > 0) {
    					$_SESSION['valid_to_checkout'] = false;
    					$messageStack->add('shopping_cart', sprintf(TEXT_FIRST_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_FIRST_ORDER_AMOUNT)) . '<br />', 'caution');
    				  }
    				}
    			} else {
    				if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
    				  if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT && $_SESSION['cart']->show_total() > 0) {
    					$_SESSION['valid_to_checkout'] = false;
    					$messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
    				  }
    				}
    			}
    		} else {
    			if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
    			  if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT && $_SESSION['cart']->show_total() > 0) {
    				$_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'])){
    			$prevOrders = $db->Execute("SELECT count(orders_id) total_orders FROM ".TABLE_ORDERS." WHERE customers_id = ".(int)$_SESSION['customer_id']);
    			if ((int)$prevOrders->fields['total_orders'] == 0) {
    				if ($_SESSION['cart']->count_contents() > 0 && MIN_FIRST_ORDER_AMOUNT > 0) {
    				  if($_SESSION['cart']->show_total() < MIN_FIRST_ORDER_AMOUNT && $_SESSION['cart']->show_total() > 0) {
    					zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
    				  }
    				}
    			} else {
    				if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
    				  if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT && $_SESSION['cart']->show_total() > 0) {
    					zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
    				  }
    				}
    			}
    		} else {
    			if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
    			  if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT && $_SESSION['cart']->show_total() > 0) {
    				zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
    			  }
    			}
    		}
            break;
          default:
            break;
        }
      }
    Thanks!

    Brian

    Zen Cart 1.3.9h.

  3. #23

    Default Re: Minimum Order - add SELECT statement for product ID?

    has anyone using this mod had any luck adding a SELECT statement to limit the mod to only affect certain product ID's? This does not have to be editable via the admin, hardcoding in the class.minimum_order_amount.php would be fine.
    any help appreciated!

  4. #24
    Join Date
    Sep 2004
    Posts
    690
    Plugin Contributions
    0

    Default Minimum Order installed and appears in admin but not functioning

    Hi,

    I installed the Minimum Order mod from http://www.zen-cart.com/index.php?ma...roducts_id=599 into a ZC version 1.5 store and it apparently installed OK, because I was able to set the minimum order in ZC admin in Configuration>Minimum vales...the mod appears there.

    However when I ordered something less than 25 dollars - which is what I set the minimum order as, I was still able to purchase the item. ZC took me to Pay Pal to pay for the item, even though the item price total including shipping was less than 25 bucks.

    Anyone have an idea as to what is going wrong?
    Happy to be a Zen Cart Monthly Donor&#33; :)

  5. #25
    Join Date
    Jul 2008
    Posts
    113
    Plugin Contributions
    0

    Default Re: Minimum Order

    Was this an upgrade or a new install?

    I thought the "Minimum Order" was a new feature in 1.5 so I didn't understand why it wasn't working. But turns out it was just old information leftover from my previous version of ZenCart. Unused field in the database.

    I haven't tried installing the Minimum Order Mod. But I'm getting annoyed because the orders in my shop are getting smaller and smaller and SMALLER. Two or Three dollars, which is just silly considering the cost of postage is much more than the items they are purchasing. I really wish I could set a minimum order of at least $5.00. I could add it somewhere to the template I suppose, as a policy statement.

  6. #26
    Join Date
    Jul 2008
    Posts
    113
    Plugin Contributions
    0

    Default Re: Minimum Order

    I see that Ajeh had the mod working (great news, yeah!!) so I installed it on my 1.5 site and it's working perfectly.

    I did see in the instructions that if you're having issues, you should run the uninstall script and then reinstall again from scratch.

    By the way, if the mod has installed successfully, a default amount of 10 is in the configuration.

    I'm very happy this mod is working. I set the minimum very low, only $6.99 but that does make a difference.

  7. #27
    Join Date
    Sep 2004
    Posts
    690
    Plugin Contributions
    0

    Default Re: Minimum Order

    daffy, it was a fresh, brand new install.
    Happy to be a Zen Cart Monthly Donor&#33; :)

  8. #28
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Minimum Order

    While you will be able to go to PayPal with the Minimum Order and the shopping cart having less than that using the PayPal button on shopping_cart ... are you actually able to check out? Or, are you returned to the shopping_cart page from PayPal?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #29
    Join Date
    Mar 2011
    Posts
    13
    Plugin Contributions
    0

    Default Re: Minimum Order

    Quote Originally Posted by Ajeh View Post
    While you will be able to go to PayPal with the Minimum Order and the shopping cart having less than that using the PayPal button on shopping_cart ... are you actually able to check out? Or, are you returned to the shopping_cart page from PayPal?
    I installed the 'Minimum Order' add on, and it works on v1.50. Thank You!

    I have the checkout integrated with "paypal buy now button" which bypasses the normal zen cart checkout process.
    When trying to purchase, paypal returned me to the zen shopping cart with the message "Warning A minimum order amount of $50.00 is required for your first order to checkout. PAYPAL DID NOT PROCESS THE PAYMENT.

    Summary
    Minimum Order 'add on' seems to work, preventing checkout, even with paypal checkout integration implemented.

    Thanks to the authors for this great little 'mod'!!

  10. #30
    Join Date
    Jun 2013
    Location
    South Africa
    Posts
    7
    Plugin Contributions
    0

    Default Re: Minimum Order

    This is the first time I have ever posted anywhere, ever. But I have searched and searched and could not find anything, and I know this must be so simple... I have installed this mod and everything is absolutely perfect (on v1.5 Zen Cart fresh install). I have also installed the minimum checkout details mod (as my products are all virtual). This mod still works, but when I add a Coupon discount and the amount goes below the minimum, it lets it go through, I saw that this mod uses the $_SESSION['cart']->show_total(), I tried to change this to the global $order->info['total'] and had to change the NOTIFY_STARTS to NOTIFY_ENDS (if that makes sense) otherwise the $order->info['total'] was empty, but even this figure displays the total amount before deductions... I have tried everything my limited experience can come up with and have had so many HTTP500 errors. I know this must be a something easy and simple and I am hoping someone will be able to assist me. Thanking you in advance.

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Easy Populate Minimum Order/Order Units
    By jdnp in forum General Questions
    Replies: 3
    Last Post: 24 May 2010, 04:30 AM
  2. Minimum Order
    By CnTGifts in forum General Questions
    Replies: 12
    Last Post: 2 Jul 2009, 06:26 AM
  3. 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
  4. Opening order minimum and re-order minimums - possible in ZC?
    By CreativeWitch in forum General Questions
    Replies: 1
    Last Post: 20 Jan 2007, 06:36 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