Skip to content
Advertisement

Display total cart shipping volume value in Woocommerce

I use woocommerce for wholesale customers who order containers of furniture – normally 40 foot containers with a volume of 68 cubic meters.

Is there a way I can show somewhere on the website – maybe in the header area a box with showing the total m3 of products in their basket? I need to show the client when they reach 68m3 so they know they have filled a container.

And is there a way to flash up a message if a client tries to submit an order less than 68m3 indicating to them that they still have room left in their container?

Any help is appreciated.

Advertisement

Answer

You can try something like this:

JavaScript

See WC() docs: https://docs.woocommerce.com/document/class-reference/

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement