WordPress.org

Forums

WooCommerce - excelling eCommerce
Minimum Cart Amount for Delivery (5 posts)

  1. contentzheta
    Member
    Posted 9 months ago #

    I would like to use Woocommerce Local Delivery and Local Pickup options, however I would like that:

    Local Delivery is free and available for orders over 25euros.
    Orders under 25euros only Local Pickup available.
    Any orders using Local Pickup will also get 5% off the total cart amount.

    Is there a plugin that can help with this?

    https://wordpress.org/plugins/woocommerce/

  2. jdesignz
    Member
    Posted 6 months ago #

    I got the same question here. I'd like to have a minimum amount for my local delivery same as the free shipping but free shipping does not have a delivery fee. So here's what I did..

    I open up these files on Notepad++ (or any editor you use)
    - class-wc-shipping-free-shipping.php
    - class-wc-shipping-local-delivery.php

    On class-wc-shipping-free-shipping, find and copy these lines:

    $this->enabled		= $this->get_option( 'enabled' );
    		$this->min_amount 	= $this->get_option( 'min_amount', 0 );
    		$this->requires		= $this->get_option( 'requires' );

    Then paste them inside class-wc-shipping-local-delivery.php under function init().

    Another one from free-shipping.php, find and copy these lines:

    'requires' => array(
    							'title' 		=> __( 'Free Shipping Requires...', 'woocommerce' ),
    							'type' 			=> 'select',
    							'default' 		=> '',
    							'options'		=> array(
    								'' 				=> __( 'N/A', 'woocommerce' ),
    								'coupon'		=> __( 'A valid free shipping coupon', 'woocommerce' ),
    								'min_amount' 	=> __( 'A minimum order amount (defined below)', 'woocommerce' ),
    								'either' 		=> __( 'A minimum order amount OR a coupon', 'woocommerce' ),
    								'both' 			=> __( 'A minimum order amount AND a coupon', 'woocommerce' ),
    							)
    						),
    			'min_amount' => array(
    							'title' 		=> __( 'Minimum Order Amount', 'woocommerce' ),
    							'type' 			=> 'price',
    							'placeholder'	=> wc_format_localized_price( 0 ),
    							'description' 	=> __( 'Users will need to spend this amount to get free shipping (if enabled above).', 'woocommerce' ),
    							'default' 		=> '0',
    							'desc_tip'		=> true
    						)
    		);

    Then paste them on local-delivery.php under function init_form_fields().

  3. jdesignz
    Member
    Posted 6 months ago #

    It works like a charm when I update the cart to the specific value needed for Local Delivery to show up. But I get a little problem, when the cart updates to 1 item only, Local Delivery shows up can be tick. But when the value is 2 or so, it does not show up (except to the right value and amount it need before showing up).

  4. jdesignz
    Member
    Posted 6 months ago #

  5. terrytsang
    Member
    Posted 1 month ago #

    Hi all, share my first shipping WooCommerce plugin here that allow user to define advanced settings for Local Delivery shipping method with minimum order amount option for both paid or free Local Delivery.

    WooCommerce Local Delivery PRO

Reply

You must log in to post.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic