shipping-method

Display ALL available shipping methods for each specific order on admin edit order pages in Woocommerce

二次信任 提交于 2020-08-10 18:59:11
问题 On the checkout page of my WooCommerce based site, users will have a list of shipping methods to choose from depending on what they are purchasing This is the list I want to capture: Things like “Free Shipping” for orders over a certain price “Freight Shipping” for certain items, and so on. My goal, is to display ALL available methods for each specific order , and display it on the “Edit Order / Order Details” page in the Admin view. A small feature that would help us be able to quickly

Display all available shipping methods and costs on WooCommerce Order pages

风流意气都作罢 提交于 2020-07-10 10:24:19
问题 Currently in my WooCommerce based site, I am wanting to display the available shipping methods and prices on the order edit page. I am using Display ALL available shipping methods for each specific order on admin edit order pages in Woocommerce answer code to my previous question. It does not displaythe data as I want. For example, the output of my code so far results in: Method 1 Method 2 Method 3 Price 1 Price 2 Price 3 Alternatively, I would like for it to display like this: Method 1 -

Change shipping class based on cart items shipping class count in Woocommerce

孤街浪徒 提交于 2020-05-29 06:47:26
问题 I'm having trouble with the default WooCommerce shipping class settings. We have a small webshop with 2 shipping costs. One for products that fit in the mailbox, and other that don't. We would like to make a setting that if there are 2 products with mailbox shipping class, than the price becomes a package price. Now on default WooCommerce only charges 1x the mailbox shipping class. 回答1: First you will need to make your shipping settings as in the below screen, for "Flat rate" shipping method

How to disable shipping method based on item count and a certain category

吃可爱长大的小学妹 提交于 2020-05-28 06:44:36
问题 I have been looking for a way to condtionally disable two shipping methods table rate distance rate Based on the item count. By item count I do not mean quantity, I mean how many different products are in the cart. IE 2 Lamps and 3 tables in the cart would be an item count of 2 and a combined quantity of 5. I would also like to ensure this rule is in effect for a certain category only. I tried: function hide_shipping_count_based( $rates, $package ) { // Set count variable $cart_count = 0; //

How to disable shipping method based on item count and a certain category

妖精的绣舞 提交于 2020-05-28 06:43:12
问题 I have been looking for a way to condtionally disable two shipping methods table rate distance rate Based on the item count. By item count I do not mean quantity, I mean how many different products are in the cart. IE 2 Lamps and 3 tables in the cart would be an item count of 2 and a combined quantity of 5. I would also like to ensure this rule is in effect for a certain category only. I tried: function hide_shipping_count_based( $rates, $package ) { // Set count variable $cart_count = 0; //

Local pickup shipping option custom percentage discount in Woocommerce

自闭症网瘾萝莉.ら 提交于 2020-05-16 12:39:54
问题 My WooCommerce checkout page gives some shipping options: Flat Rate (costs money) Local Pickup (free). How can I give a 5% discount on total order cost if a customer chooses Local Pickup shipping method? 回答1: The following code will add a discount of 5% to cart subtotal for Local Pickup chosen shipping method: add_action( 'woocommerce_cart_calculate_fees', 'custom_discount_for_pickup_shipping_method', 10, 1 ); function custom_discount_for_pickup_shipping_method( $cart ) { if ( is_admin() && !

Local pickup shipping option custom percentage discount in Woocommerce

半世苍凉 提交于 2020-05-16 12:34:49
问题 My WooCommerce checkout page gives some shipping options: Flat Rate (costs money) Local Pickup (free). How can I give a 5% discount on total order cost if a customer chooses Local Pickup shipping method? 回答1: The following code will add a discount of 5% to cart subtotal for Local Pickup chosen shipping method: add_action( 'woocommerce_cart_calculate_fees', 'custom_discount_for_pickup_shipping_method', 10, 1 ); function custom_discount_for_pickup_shipping_method( $cart ) { if ( is_admin() && !

BigCommerce - Custom Shipping Method (RoyalMail Widget for Collect Location)

狂风中的少年 提交于 2020-01-16 15:52:26
问题 I would like to setup custom shipping option using RoyalMail collect widget so customer can go through widget and it would return address after customer selection. So we need to map those address fields with customer shipping address fields. I have tried with checkout-js-sdk but it required considerable effort to create customm checkout from scratch. I am aiming to have a solution to map widget with BigCommerce shipping method using JavaScript or Angular Js. window.language = {{ langJson

Force free shipping method for custom cart item data value in Woocommerce

人走茶凉 提交于 2020-01-06 02:47:48
问题 I've had a user from here help me and assist in getting my code fixed correctly to function correctly and while the above does work for everything with custom field of 90 days to hide all shipping and display only "Free Shipping" if available. However, my client also set free shipping to be shown only on certain amount. I'm wondering if I can add the following; Here's the original code I am using: add_filter( 'woocommerce_package_rates', 'show_only_free_shipping_for_autodelivery', 100, 2 );

Enable only free shipping method for a specific custom field value in Woocommerce

旧巷老猫 提交于 2020-01-05 03:56:16
问题 I'm trying to add code like the one below into functions.php file. The overall function is to check products in cart and their custom fields (post_meta) called auto_delivery_default. If its certain text in the custom field then display free shipping only, if all other text then show all other shipping methods. Here's what I've gotten so far but I'm overlooking something making it not function right; function show_free_ship_to_autodelivery ( $autodelivery_rate ) { $autodelivery_free = array();