shipping

Display total cart shipping volume value in Woocommerce

限于喜欢 提交于 2019-12-01 12:10:13
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. You can try something like this: <?php

Get the Cart shipping label and cost in Woocommerce

纵饮孤独 提交于 2019-12-01 08:07:58
I need to display the shipping cost in other side of cart page. I tried: <?php $current_shipping_cost = WC()->cart->get_cart_shipping_total(); echo $current_shipping_cost; ?> But print value nad don't title of shipping cost, because i use as title: "Express delivery with UPS 24/48 hours 4.90 euro"… How can I get order shipping cost in woocommerce? To get and display the chosen shipping method label (and other related data, if needed) in cart page (or in checkout page) : foreach( WC()->session->get('shipping_for_package_0')['rates'] as $method_id => $rate ){ if( WC()->session->get('chosen

WooCommerce Shipping Calculator (shipping-calculator.php) - PHP Override - Zip Code Only

我与影子孤独终老i 提交于 2019-12-01 06:47:32
问题 In need of some suggestions here. I'm attempting to edit my shipping calculator (not checkout calculator as based on https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/) I'm going through the code and I'm unable to replicate what I'm trying to accomplish as seen here: I just want to hide the State & Country options and make it so you can only enter a zip code. I've tried the obvious like hiding it in the CSS style sheet/override just making

Overridding a Shipping Method - What am I missing

佐手、 提交于 2019-12-01 05:43:58
I've written many many modules before but for some reason my shipping module won't override an exsiting Magneto shipping method. Is that allowed? What am I missing here? The module name shows up in the advanced tab of the configuration area, so it's getting loaded, but nothing is happening. Any hints? Code etc/modules/Ssi_Shipping.xml <?xml version="1.0"?> <config> <modules> <Ssi_Shipping> <active>true</active> <codepool>local</codepool> </Ssi_Shipping> </modules> </config> local/Ssi/Shipping/etc.xml <?xml version="1.0"?> <config> <modules> <Ssi_Shipping> <version>0.1.0</version> </Ssi

Conditionally hide a Checkout field in WooCommerce based on chosen shipping

走远了吗. 提交于 2019-11-30 17:01:31
in WooCommerce, I am trying to hide the company name field whenever "delivery to home" is selected. I've tried a bunch of different things. This is my last attempt: add_filter('woocommerce_checkout_fields', 'xa_remove_billing_checkout_fields'); function xa_remove_billing_checkout_fields($fields) { $shipping_method ='pakkelabels_shipping_gls1'; // Set the desired shipping method to hide the checkout field(s). global $woocommerce; $chosen_methods = WC()->session->get( 'chosen_shipping_methods' ); $chosen_shipping = $chosen_methods[0]; if ($chosen_shipping == $shipping_method) { unset($fields[

Add custom fields to WooComerce product setting pages in the shipping tab

孤者浪人 提交于 2019-11-30 16:44:55
Is it possible to do add some extra fields in WooCommerce products pages shipping tab settings in backend, as I need to add something like 12 custom fields. I have tried to find some related hooks without success. The only way that I have found was over attributes, but it was not a convenient solution… How can I add custom fields to WooComerce product setting pages in the shipping tab? Thanks. This is possible and you will get this (here I have set to custom text fields): Here is the code: // Add custom fields to product shipping tab add_action( 'woocommerce_product_options_shipping', 'add

Add custom fields to WooComerce product setting pages in the shipping tab

好久不见. 提交于 2019-11-30 16:20:25
问题 Is it possible to do add some extra fields in WooCommerce products pages shipping tab settings in backend, as I need to add something like 12 custom fields. I have tried to find some related hooks without success. The only way that I have found was over attributes, but it was not a convenient solution… How can I add custom fields to WooComerce product setting pages in the shipping tab? Thanks. 回答1: This is possible and you will get this (here I have set to custom text fields): Here is the

Display shipping cost on product page - WooCommerce

喜你入骨 提交于 2019-11-30 16:12:49
问题 I'm trying to make a custom page on Wordpress that display 2 subscription types in a form with 3 variations each (monthly, 6 month, 12 month). Each variation gets a radio button and I have a total price that is live updated when user clicks on the radio buttons. This part is working. But now, I want to add 3 other radio buttons to choose the shipment method. (When user select one, it'll live update the total price too). I've been searching a long time how to get shipping cost for a product

Woocommerce, hide shipping method based on shipping class

╄→尐↘猪︶ㄣ 提交于 2019-11-30 14:52:44
I'm trying to hide all but one shipping method based on the shipping class, essentially forcing the FedEx overnight method when a product belonging to a specific class is selected. I'm starting with this code , and modifying it as indicated below: add_filter( 'woocommerce_available_shipping_methods', 'hide_shipping_based_on_class' , 10, 1 ); function check_cart_for_share() { // load the contents of the cart into an array. global $woocommerce; $cart = $woocommerce->cart->cart_contents; $found = false; // loop through the array looking for the tag you set. Switch to true if the tag is found.

Hide shipping address on local pickup in WooCommerce email notifications

♀尐吖头ヾ 提交于 2019-11-30 09:02:23
问题 How do you hide the "Shipping Address" info section in the customers' processing email if "Local Pickup" is chosen? I don't know how to provide code for this. 回答1: Yes it's possible (see the update at the bottom of this page) … overriding WooCommerce templates (copying the WooCommerce plugin templates folder to your active child theme or theme, renaming it woocommerce ). For that please be sure to read the related docs First . Once above correctly done, you have to edit 2 templates located in