Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Forum

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Cart page : how to display "free shipping" ? 06 Jun 2017 14:10 #1

  • vedia
  • vedia's Avatar Topic Author
Dear Reinhold,

I use your advanced plugin on my marketplace (woocommerce/wc vendors)

My question concerns the shipping amount displayed in the shopping cart page.
When the shipping cost is >0, the amount is displayed.
But when the shipping is free, the amount is not displayed (just the name of the "Shipping By Rules Methods").

Is there a solution to display a message like "free shipping" when it's offered ?

Many thanks in advance.
Attachments:

Cart page : how to display "free shipping" ? 19 Jun 2017 00:30 #2

Dear Vedia,
This is the default behaviour of WooCommerce (i.e. shipping costs of 0 are not printed). The displayed text (i.e. the suppression of the shipping cost for free shipping) is done in WooCommerce's templates/cart/cart-shipping.php file, which calls the function wc_cart_totals_shipping_method_label to create the displayed name of the shipping method. That function (file wc-cart-functions.php) has an explicit check "if ( $method->cost > 0 ) {", i.e. it is hardcoded to append the shipping costs only if they are larger than 0.

The only way I can see around this issue is to implement the filter woocommerce_cart_shipping_method_full_label (called at the end of the wc_cart_totals_shipping_method_label) and insert the HTML for the free shipping text if $method->cost==0...

That would mean implementing a tiny wordpress plugin to provide an implementation of that filter.
As I said at the beginning, this is a general WC problem and has nothing to do with our plugin.

Best regards,
Reinhold
  • Page:
  • 1