Documentation for Free Shipping Over Amount for WooCommerce Plugin

Author: WPFactory PluginsVersion: 2.3.7Updated: 3 weeks ago
Requires WordPress version: 4.4Tested up to WordPress version: 6.5

Settings

 

Amount Left for Free Shipping for WooCommerce plugin lets you display the amount left for free shipping in WooCommerce.

You can display the amount on cart page, mini cart widget, “Amount Left for Free Shipping” widget, checkout page, “add to cart” notice and/or store notice.

Additionally (to display it anywhere on your site) you can use:

  • [alg_wc_left_to_free_shipping] shortcode:
    [alg_wc_left_to_free_shipping content="%amount_left_for_free_shipping% left for free shipping"]
  • alg_wc_get_left_to_free_shipping() PHP function:
    alg_wc_get_left_to_free_shipping( "%amount_left_for_free_shipping% left for free shipping" );

Plugin Options

Plugin settings are located in “WooCommerce > Settings > Amount Left for Free Shipping”.

Content Options

In all plugin messages you can use HTML and/or shortcodes. Available placeholders:

  • %amount_left_for_free_shipping%
  • %free_shipping_min_amount%
  • %current_cart_total%
  • %amount_left_for_free_shipping_raw%
  • %free_shipping_min_amount_raw%
  • %current_cart_total_raw%
If amount left for free shipping is not updated, when you update the cart content – you need to either enable plugin’s “AJAX” option or change the Position. For example – if you select the default “After cart totals” position for the “Info on Cart” – amount will be updated (if, for example, you change product quantities in the cart). On the other hand – if you select “After cart” position – amount will not be updated and your customer will have to refresh the cart page manually to see the updated left to free shipping amount. In other words – position must be inside that part of the cart page that is being refreshed after cart content changes. Same applies to the checkout page, where amount may differ depending on shipping country selected by customer (in case if you have multiple free shipping methods in multiple shipping zones with different minimal order amounts). In case if you’ve enabled the “AJAX” option, content will be updated on any Position.

Some Postions (e.g. “Order review: after Shipping”) are outputted inside a HTML table, so you need to wrap it in HTML table row tags, e.g.:

%amount_left_for_free_shipping% left for free shipping
</pre>
<p>

General Options

Amount Left for Free Shipping for WooCommerce - General Options

Include discounts
Include discounts when calculating cart total.
Default: yes
Message on free shipping reached: Content
Outputted when min free shipping amount is reached. You can use HTML and/or shortcodes here. To disable – set it empty. For more information please check the Content Options section.
Default:
You have free delivery!
Message on empty cart
If disabled, then standard content is outputted.
Default: no
Message on empty cart: Content
E.g.: Free shipping on orders over %free_shipping_min_amount%!. For more information please check the Content Options section. Ignored unless “Message on empty cart > Custom message” checkbox is enabled.
Default: None

AJAX Options

Enable this section if you want the amount to be updated via AJAX, e.g. when using plugin’s “Store notice” section, or WooCommerce “Enable AJAX add to cart buttons on archives” option, or for some positions in cart, when customer updates items quantities and the amount text is positioned outside of automatically refreshed area.

Amount Left for Free Shipping for WooCommerce - AJAX Options

Enable AJAX
Default: no
Additional events
Additional JavaScript events to update the amount text on. Leave empty if unsure.
These events are always included: updated_cart_totals added_to_cart removed_from_cart wc_fragment_refresh updated_checkout wc_cart_emptied
Default: None
Added to cart event without AJAX
Fires a custom event alg_wc_alfs_added_to_cart in case a product has been added to cart without AJAX. Enable it if the “Store notice” is not getting displayed on single product pages.
Default: no

Advanced Options

Amount Left for Free Shipping for WooCommerce - Advanced Options

Check for free shipping
Check for already available alternative (i.e. not requiring minimum order amount) free shipping methods. No text will be outputted in this case.
Default: no
Check for virtual cart
Check if cart consists of virtual products only. No text will be outputted in this case.
Default: no

Cart Options

Outputted on the cart page.

Amount Left for Free Shipping for WooCommerce - Cart Options

Enable/Disable
Enable/disables the “Cart” section.
Default: no
Content
For more information please check the Content Options section.
Default:
%amount_left_for_free_shipping% left for free shipping
Position
Possible values: Before cart; Before cart table; Before cart contents; Cart contents; Cart coupon; Cart actions; After cart contents; After cart table; Cart collaterals; After cart; Before cart totals; Cart totals: Before shipping; Cart totals: After shipping; Cart totals: Before order total; Cart totals: After order total; Proceed to checkout; After cart totals; Before shipping calculator; After shipping calculator; If cart is empty.
Default: After cart totals
Position order (priority)
Here you can move the info inside the Position selected above.
Default: 10

Mini Cart Options

Outputted in the mini cart widget.

Amount Left for Free Shipping for WooCommerce - Mini-cart Options

Enable/Disable
Enable/disables the “Mini-cart” section.
Default: no
Content
For more information please check the Content Options section.
Default:
%amount_left_for_free_shipping% left for free shipping
Position
Possible values: Before mini cart; Before mini cart contents; After mini cart contents; In mini cart total; Before mini cart buttons; In mini cart buttons; After mini cart buttons; After mini cart.
Default: After mini cart
Position order (priority)
Here you can move the info inside the Position selected above.
Default: 10

Checkout Options

Outputted on the checkout page.

Amount Left for Free Shipping for WooCommerce - Checkout Options

Enable/Disable
Enable/disables the “Checkout” section.
Default: no
Content
For more information please check the Content Options section.
Default:
%amount_left_for_free_shipping% left for free shipping
Position
Possible values: Before checkout form; Before customer details; Billing; Shipping; After customer details; Before order review; Order review; Order review: Before shipping; Order review: After shipping; Order review: Payment: Before submit button; Order review: Payment: After submit button; After order review; After checkout form.
Default: After order review
Position order (priority)
Here you can move the info inside the Position selected above.
Default: 10

Store Notice Options

Site-wide notice. You may also want to enable “General > AJAX” option for this.

Amount Left for Free Shipping for WooCommerce - Store Notice Options

Enable/Disable
Enable/disables the “Store Notice” section.
Default: no
Content
For more information please check the Content Options section.
Default:
%amount_left_for_free_shipping% left for free shipping
Hide
In milliseconds. Set to zero to show the notice permanently.
Default: 0
Position
Possible values: Bottom; Top.
Default: Bottom
Background color
Default: #3d9cd2
Text color
Default: #fff
Text alignment
Possible values: Left; Right; Center; Justify.
Default: Left

Add to cart Notice Options

Notice displayed when “Add to cart” button is clicked.

Amount Left for Free Shipping for WooCommerce - Add to cart Notice Options

Enable/Disable
Enable/disables the “Add to cart Notice” section.
Default: no
Content
For more information please check the Content Options section.
Default:
%amount_left_for_free_shipping% left for free shipping
Position
Possible values: Before the standard text; After the standard text.
Default: After the standard text
Glue
“Glue” is inserted between the standard “add to cart” text and “left for free shipping” text.
Default:


Advanced: Manual Min Amount Options

Generally the plugin will retrieve the minimum free shipping order amount automatically, however, if you are using non-standard shipping methods for free shipping (i.e. not the original “Free shipping” method from WooCommerce), you need to set the amount manually here.

Amount Left for Free Shipping for WooCommerce - Manual Min Amount Options

Manual min amount
Enable/disables the “Manual min amount” section.
Default: yes

Manual Min Amount

Ignored if set to zero.

Manual min amount
Default: 0

Extra Options

Here you can optionally select user roles, currencies and/or shipping zones to set individual manual min amounts for. Select values and “Save changes” for new option fields.

User roles
Default: None
Currencies
Default: None
Shipping zones
Default: None

Styling Examples

There is a number of ways you could restyle the messages. For example, you can add tag with style attribute, e.g.:

<span style="color: red; font-size: small;">%amount_left_for_free_shipping% left for free shipping</span>

Or if you want to create an alert box:

</pre>
<div style="background-color: #ff9800; color: white; padding: 15px;">%amount_left_for_free_shipping% left for free shipping</div>
<p>

Progress Bar

To display the amount as a graphical progress bar instead of a text, you can use HTML tag and plugin’s _raw amounts. For example, try adding this to the “Content” option:


Or if you need an inverted value:


If you’d like to restyle the progress bar, check this page.