Why Retail Prices Are Shown Until Minimums Are Met
The display of wholesale pricing in the cart is tricky business as this is pulled directly from the cart object itself which is created on the fly as the user adds products to the cart.
When we came to coding the logic in this section of our plugin, the issue we faced is that once you redo pricing in the cart, the user is able to purchase at that value, regardless of our warning.
So the best method we found is to keep the pricing in the cart at the defined retail level until such point as they hit the minimums required and then we change all the pricing in the cart over to wholesale.
Long story short, we can’t keep wholesale customers from purchasing under the limit, they just won’t get their wholesale pricing.
If you always want to show wholesale prices in the cart then the only way is to have no minimum order amounts defined.
How Minimum Order Subtotal Is Calculated
For the minimum sub-total amount requirement (as defined under WooCommerce->Settings, Wholesale Prices tab, General sub menu) you are setting an amount that wholesale customers must order as a minimum amount for the entire order.
This amount excludes tax and shipping cost but is calculated using the “wholesale price” as defined for all products.
Until the minimum order subtotal (as calculated based on the wholesale price) is met, the shopping cart and checkout will display the non-wholesale prices.
Here is an example scenario:
- You have the minimum sub-total amount set to $500 so your wholesale customers must only submit orders over that amount.
- There is a product defined with a regular retail price of $200 and a wholesale price of $100.
- The customer adds 3x units of this product to their cart.
- The notice for not meeting the minimum order subtotal to make wholesale pricing available is shown because $100 x 3 = $300 which is below $500.
- Once the customer add and additional 2x units of this product to their cart, the notice disappears and wholesale pricing becomes available.
How Minimum Order Quantity Is Calculated
The minimum order quantity is most easily explained as the number of units of all products added to the cart. The condition can be met by any combination products.
Here is an example scenario:
- You have the minimum order quantity set to 50 units so your wholesale customers must only submit order that contain more than 50 products as defined by the total quantity of all products.
- The customer adds 2 products to the cart; Product 1 has a quantity of 20, Product 2 has a quantity of 15.
- The notice for not meeting the minimum order quantity to make wholesale pricing available is shown because 20 + 15 = 35 which is below 50.
- The customer doubles the quantity of their order of Product 2 from 15 to 30.
- The notice disappears and wholesale pricing is shown because they now meet the minimum order quantity of 50 units (20 + 30 = 60 which is over 50).
How Product Minimum Quantity Is Calculated
The final scenario where wholesale pricing is not shown until minimums are met is when an individual product has a minimum quantity amount set.
In the case where a minimum quantity is set for the product itself, retail pricing will be shown to the customer until that minimum has been met.
A notice is shown advising the customer about the minimum quantity required to receive wholesale pricing on that specific product until they adjust their quantity of the product to meet the minimum.
Special Note: This means you can have a mix of wholesale and non-wholesale pricing in your cart as a wholesale user as the plugin does not prevent them from ordering at retail price if they don’t satisfy the minimum quantity.
Stop Customers Ordering Until They Reach The Minimum Requirements
If you really want to stop customers from ordering until they reach the minimum requirements you can do it.
For this you need to use the following feature to hide the proceed to checkout/payment buttons.