Hi -

Inherited a 1.5.1. site with some customizations done to it. Trying to get the product order minimum and order maximum to display correctly on the product page. Regardless of whether I enter a number in the order minimum field or order maximum field for any given product, the text that appears on the product info pages is "This product has a minimum order amount of X."

My assumption (which could be wrong) is that the text should change depending on which field has data in it, minimum order qty or maximum order qty. End result being "This product has an order minimum of X." or "This product has an order maximum of X."

Code is below if anyone sees anything that is clearly wrong. Any help would be appreciated!

Thanks!

Code:
<!--bof Add to Cart Box -->
        <?php
        if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
          // do nothing
        } else {
        ?>
                    <?php
            $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
                    if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
                      // hide the quantity box and default to 1
                      $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
                    } else {
                      // show the quantity box
           // joe edit original $the_button = '<div class="qty-box m-input-prepend"><span class="add-on">'. PRODUCTS_ORDER_QTY_TEXT . '</span><input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" class="m-wrap"/></div>' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '<input type="submit" class="button large add-cart" value="'.BUTTON_IN_CART_ALT.'" />';
    
// joe edit begin adding if statement below to look to see if there is a minimum order number
        if (zen_get_products_quantity_min_units_display((int)$_GET['products_id']) == '') {
          $the_button = '<div class="qty-box m-input-prepend"><span class="add-on">'. PRODUCTS_ORDER_QTY_TEXT . '</span><input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" class="m-wrap"/></div>' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '<input type="submit" class="button large add-cart" value="'.BUTTON_IN_CART_ALT.'" />';
        } else {
            $the_button = '<div class="qty-box m-input-prepend"><span class="add-on">'. PRODUCTS_ORDER_QTY_TEXT . '</span><input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" class="m-wrap"/></div><div class="">Note: This product has a minimuum order amount of' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . '</div><input type="submit" class="button large add-cart" value="'.BUTTON_IN_CART_ALT.'" />';
        }
// joe edit end
                    }
            $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
          ?>
          <?php if ($display_qty != '' or $display_button != '') { ?>
            <div id="cartAdd">
<!--bof Custom Text -->
<?php echo (($flag_show_product_info_customtext == 1 && $products_custom_text !='') ? '<strong>' . $products_custom_text . '</strong>' : '') . "\n"; ?>
<!--eof Custom Text -->
            <br class="clearBoth" />
            <?php
              echo $display_qty;
              echo $display_button;
                    ?>
				
				<!-- remove Checkout Now Button that appears when cart has something in it 
				
<?  if (($_SESSION['cart']->count_contents()) <>'') {
?>
<br class="clearBoth" />
<br class="clearBoth" />
<a href="index.php?main_page=checkout_shipping" title="checkout now" class="button large add-cart" style="background-color:#ff6600;">Checkout Now</a> 
<br class="clearBoth" /> 
<?  
    }
?> 

end remove Checkout Now button -->
				
                  </div>
          <?php } // display qty and button ?>
        <?php } // CUSTOMERS_APPROVAL == 3 ?>
        <!--eof Add to Cart Box-->