shipping

Magento display shipping costs in cart

这一生的挚爱 提交于 2019-12-13 02:27:48
问题 Is it possible to display the shipping costs in the cart? Like this: Click here for an example! Regards, Fluxxi 回答1: If Magento can calculate it, then it can show it. For Magento to calculate shipping, it needs to know the shipping address and shipping method. I was also looking into this recently and found this. It didn't work for me because we use custom shipping methods that are very different from the Magento ones, but it might work for you. 回答2: This is a flat rate for shipping and

Hide specific shipping method for specific products in Woocommerce

ぐ巨炮叔叔 提交于 2019-12-13 01:42:50
问题 I have a few products in my WooCommerce store that are to heavy (more than 20kg) to be shipped by a certain shipping method. I would like to hide 'shipping_method_0_flat_rate2' for all cart items which contain a product that is heavier than 20kg. I tried to adjust the snippet below, but it is not complete and working: add_filter( 'woocommerce_package_rates', 'hide_shipping_based_on_tag' , 10, 1 ); function check_cart_for_share() { // specify the product id's you want to hide $product_ID =

Changing shipping method label names in Woocommerce 3

这一生的挚爱 提交于 2019-12-13 00:36:16
问题 I've added two shipping options from USPS to my Wordpress site: priority mail and first-class package service . The options are displayed as "first-class package service" and "priority mail" , respectively, on both the cart and the checkout pages. I find the titles both a bit bulky, and would like to change them to read "standard" and "priority", respectively, on both the cart and checkout pages. Any ideas as to what code I would need to add to accomplish this? 回答1: Update: Your labels names

WooCommerce shipping cost based on cart item count

余生长醉 提交于 2019-12-12 23:19:33
问题 I want to count shipping cost based on number of products add on cart like, If I purchase one mobile then it will count shipping cost as 2.5 and after more than two or two mobile I purchased then shipping cost will be 5.0 <?php $qty(1) * 2.5 = 2.5 $qty(2) * 2.5 = 5.0 $qty(3) * 2.5 = 5.0 ?> So is there any idea or suggestion how to count the shipping cost based on number of products ? 回答1: Updated: As your question is a bit unclear, you could just need to add [qty]*2.5 in the Flat rate

Magento: Table Rates by Weight, edit the Calculation

烂漫一生 提交于 2019-12-12 17:15:45
问题 I’m currently using Table Rates by Weight for an online store, but I need to customize how the calculation is done. At the moment, the postage fee is determined by the total weight of orders, but I’d like the calculation to just determine the cost of the post by the heaviest item in the shopping cart. Do you know how I could override the calculations made by this module? Assistance would make me really grateful. Thanks in advance. 回答1: Override the Magento class used to calculate these rates

WooCommerce: autocomplete paid orders based on shipping method

情到浓时终转凉″ 提交于 2019-12-12 14:59:45
问题 I have a product that people can print directly (shipping method 1) or choose to get it via shipping service (shipping method 2). So the order should auto complete if they choose to print it directly (shipping method 2) ONLY. Is it possible to extend that code snippet from WooCommerce? From docs I found this /** * Auto Complete all WooCommerce orders. */ add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order'); function custom_woocommerce_auto_complete_order( $order_id )

Update WooCommerce “flat rate” shipping cost using Jquery ajax

拈花ヽ惹草 提交于 2019-12-12 13:25:30
问题 I am trying to update the shipping cost after the address is entered. When the client starts typing the address, and autocomplete function helps the client find the street name, building, floor and side. Once the address is entered javascript calculates the distance and the price. Then the price is via ajax send to shipment.php It is my goal to have shipment update the shipping cost accordingly. I have tried : include '../../../../wp-load.php'; add_action( 'woocommerce_flat_rate_shipping_add

Filter Shipping method based on shipping class in Woocommerce 3

坚强是说给别人听的谎言 提交于 2019-12-12 10:09:59
问题 I have been searching for code to filter out any shipping methods other than local pick up, on checkout, when a product that has a specific shipping class selected (Only pickup, ex.) is in the cart (among other products). I only found code that was outdated and does not work on WC3+. 回答1: Here is the way to filter out any shipping methods other than local pick up, when a product that has a specific shipping class enabled: add_filter( 'woocommerce_package_rates', 'custom_shipping_rates', 100,

Magento 1.4 - PayPal Payments Standard sometimes won't charge shipping

自作多情 提交于 2019-12-12 05:49:18
问题 I have a UK based website running Magento 1.4.0.1 and recently added PayPal Payments Standard as a payment option. It works as expected for the most part, but recently I've had 2 overseas orders come through that haven't been charged shipping (one to Germany and one to Sweden). When viewing the orders in the backend, Magento seems to think that shipping was charged, but when PayPal is checked, it confirms that no shipping was charged. Obviously, the figure charged in PayPal is the Magento

Shipping calculator, What am I missing in this code to make it work?

本秂侑毒 提交于 2019-12-12 05:38:56
问题 Hello I am pretty new to this and I am trying to make this shipping calculator code work. This is what I have so far. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ent"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Calculate Shipping</title> <script type="text/javascript"> /* <![CDATA[ */ var price = 0; var shipping = (calculateShipping(price);); var total = price + shipping; function