• Resolved annie63

    (@annie63)


    Hi. I would like to be able to set a minimum order value by shipping method. Is this plugin suitable for this ?
    For example, on this page https://www.willowsnursery.co.uk/other-willow-prices/ you can see we sell short willow cuttings where postage is £4. We sell them as 10 for £7, but we want a minimum order value of 2 bundles ie £14 (but that can be 2 different varieties/products).
    Or they can order short willow cuttings with long willow whips and it then doesn’t matter if they only order 10 – but we also want to set a minimum order value for the long willow whips which we send with a carrier @ £19. Again it doesn’t matter if they order, say 8 of one length 8 of another length and 8 of another length. But we don’t wnat them to oly be able to order 8 whips on their own.
    Hope that makes sense and someone can help.
    Thank you.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author CT Talks

    (@cttalks)

    Hi @annie63,
    Sorry for the delay in response, We have gone through your query & found that it is possible to change the minimum order value based on the shipping method selected using the filter ‘ct_mpac_filter_min_cart_total’ refer to the following code,

    add_filter('ct_mpac_filter_min_cart_total', 'filterMinimumPurchaseAmountByShipping', 12, 2);
    
    if(!function_exists('filterMinimumPurchaseAmountByShipping')) {
    	function filterMinimumPurchaseAmountByShipping($minimumPurchase, $wcCart) {
    		$selectedShippingMethod = WC()->session->get( 'chosen_shipping_methods' );
    		if(!empty($selectedShippingMethod)) {
    			if($selectedShippingMethod[0]=='flat_rate:3') {
    				$minimumPurchase = 500;
    			}
    		}
    
    		return $minimumPurchase;
    	}
     }

    However the second part of your query says, you want to limit the item quantity & for this, you may require some extension dealing with woo-commerce product quantities, Ex: Min/Max Quantities

    • This reply was modified 3 years, 7 months ago by CT Talks.
Viewing 1 replies (of 1 total)
  • The topic ‘How to Set Minimum Order Value by Shipping Method’ is closed to new replies.