shipping

Change Woocommerce Order Status based on Shipping Method

女生的网名这么多〃 提交于 2019-12-22 00:36:02
问题 The idea here is that when an order comes in with an "express delivery" as Shipping Method, the order status is updated to On-Hold. As there I have some different "express delivery" Shipping Method rates I thought that by using stristr() to see if the word 'express' appears anywhere in the formatted shipping method title. But I seem to be missing something as I don't get anything. How can I check if the Order shipping method is an "express delivery" to be able to update the order status? Here

Integrating Shipping with Ruby on Rails

最后都变了- 提交于 2019-12-21 05:41:27
问题 What is the best method to include shipping quotes in my cart? The basic flow of my site is that 1.) User selects products 2.) User is shown cart 3.) repeat 1 and 2 until User wants to pay 4.) collect user details ( email, address where items will be shipped to ) 5.) make payment via active merchant 6.) order is submitted to distributor. I would like to insert a shipping information, so that the user can pay for his purchase + shipping costs via active merchant. 1.) User selects products 2.)

Shipping GNU/Linux Firefox plugin with shared libraries (for installation with no root access)

旧街凉风 提交于 2019-12-21 05:31:19
问题 The application is a Firefox plugin (loaded from $HOME/.mozilla/plugins), so wrapper script that sets LD_LIBRARY_PATH is not an easy option. RPATH, as far as I know, cannot refer to $HOME and can be only absolue path. Firefox tries to dlopen it's plugin from ~/.mozilla/plugins but fails (because it depends on shared libraries installed somewhere in the user home directory). Modifying Firefox menu item to provide a wrapper (with LD_LIBRARY_PATH) around Firefox is too hacky. What should

Customize Tax amount in “woocommerce_package_rates” hook

冷暖自知 提交于 2019-12-21 02:55:40
问题 I recently tried to modify all my shipping rates with hook to apply discount. Here's my code : add_filter( 'woocommerce_package_rates', 'woocommerce_package_rates' ); function woocommerce_package_rates( $rates ) { $user_id = get_current_user_id(); if ( ! wc_memberships_is_user_active_member( $user_id, 'silver' ) ) { return $rates; } $discount_amount = 30; // 30% foreach($rates as $key => $rate ) { $rates[$key]->cost = $rates[$key]->cost - ( $rates[$key]->cost * ( $discount_amount/100 ) ); }

WooCommerce email based on shipping zone

丶灬走出姿态 提交于 2019-12-19 10:26:18
问题 I need send email instructions when customer select shipping zone id = 0 (The rest of the world). I found code below, but its based on payment method: add_action( 'woocommerce_email_before_order_table', 'add_order_email_instructions', 10, 2 ); function add_order_email_instructions( $order, $sent_to_admin ) { if ( ! $sent_to_admin ) { if ( 'cod' == $order->payment_method ) { // cash on delivery method echo '<p><strong>Instructions:</strong> Full payment is due immediately upon delivery: <em

Overridding a Shipping Method - What am I missing

半世苍凉 提交于 2019-12-19 06:58:11
问题 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

Overridding a Shipping Method - What am I missing

孤街醉人 提交于 2019-12-19 06:57:16
问题 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

Add a custom text to specific email notification for local pickup Woocommerce orders

随声附和 提交于 2019-12-18 18:42:32
问题 I tried the following code that is displaying a message to all those customers who should receive a customer_processing_order and customer_completed_order when local_pickup is the chosen shipping method. I noticed I do not store any _shipping_method item within any order meta, but only a thing like: order_item_type: shipping > method_id > local_pickup:3 How can I retrieve it? I tried this of code without success: // testo per Ritiro in Sede add_action( 'woocommerce_email_order_details', 'my

Add a custom text to specific email notification for local pickup Woocommerce orders

坚强是说给别人听的谎言 提交于 2019-12-18 18:41:13
问题 I tried the following code that is displaying a message to all those customers who should receive a customer_processing_order and customer_completed_order when local_pickup is the chosen shipping method. I noticed I do not store any _shipping_method item within any order meta, but only a thing like: order_item_type: shipping > method_id > local_pickup:3 How can I retrieve it? I tried this of code without success: // testo per Ritiro in Sede add_action( 'woocommerce_email_order_details', 'my

Remove shipping cost if custom checkbox is checked in WooCommerce Checkout

回眸只為那壹抹淺笑 提交于 2019-12-17 20:40:44
问题 I am trying to set the price of shipping rates to $0.00 if a checkbox in the checkout fields is checked. Current Attempt: function no_shipping_for_own_ups($rates,$package) { foreach ($rates as $rate) { //Set the price $rate->cost = 0; } return $rates; } function woo_add_cart_ups_y_n_fee( $cart ){ if ( ! $_POST || ( is_admin() && ! is_ajax() ) ) { return; } if ( isset( $_POST['post_data'] ) ) { parse_str( $_POST['post_data'], $post_data ); } else { $post_data = $_POST; } if (isset($post_data[