shipping

Creating shipment does not update items shipped quantity and order is not complete

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 10:15:54
问题 I'm developing a procedure that has to programatically create shipment for orders that are already paid and invoiced. The problem is that even after creating the shipment, the order status remains to 'processing' instead of going to 'complete'. This does not happen if I manually Ship from the backend. I found that the problem is that the quantity shipped for the order items is not updated, but remains 0 after saving the shipment and the order. This is the procedure i'm using. No exception is

Getting minimum order amount for 'Free Shipping' method in checkout page

落花浮王杯 提交于 2019-12-07 06:30:52
问题 I have did tried to use the code from this answer: How to get minimum order amount for free shipping in woocommerce But it return a NULL result and I can't find the way to fix this code until now. How can I get the right minimun order amount on checkout page? Thanks 回答1: The code of this answer: How to get minimum order amount for free shipping in woocommerce is obsolete with WooCommerce version 2.6+, but it was helpful for this functional answer… After making some search and some tries, I

Accessing shipping cost in Magento's cart and/or checkout

拥有回忆 提交于 2019-12-07 06:14:06
问题 Please note, this question is regarding the shipping cost, not price. There is an important difference, i.e. what $$ charge the shipping method incurs for the store owner, as opposed to what is $$ charge is paid by the customer. The shipping_tablerate database table includes a cost field, which is populated in the Mage_Shipping_Model_Carrier_Tablerate object during the collectRates method. However, that field is not accessible anywhere else in the stack, e.g. from a quote's address. I need to

UPS Shipping Tutorial (PHP)

不羁的心 提交于 2019-12-07 03:53:57
问题 I finally managed to set up an UPS shipment XML request and I would like to share it with other people struggling with it. So here is a complete PHP object oriented valid XML according to newest documentation from 2017. Im doing this because there are not many helpful information on the internet and I want to change that. This code also solves many common errors about which you can find questions here on StackOverflow but mostly without answers. This is not a question, its a tutorial for

Magento - remove shipping & handling when using Freeshipping

为君一笑 提交于 2019-12-06 12:26:59
问题 I have the following issue: I have to main shipping methods. The first one charges a $10 shipping fee for orders below $200. The second method is the default freeshipping, which applies for orders over $200. When freeshipping is applied, the Shipping & Handling subtotal displays 0.00, and I don't want this line to show up neither in the checkout nor in the invoice. Is there any way to remove the shipping & handling line completely when freeshipping is used? Thanks in advance for any thoughts.

Create a new shipping method in woocommerce 3

强颜欢笑 提交于 2019-12-06 10:51:06
I need help in generating new shipping method in woocommerce version 3+. The name for new field is "Nextday delivery". Like the flat rate it also need to be there in the method but it was not displayed in the drop down select field. The below is the code which I tried. But it's not working for me. function request_a_shipping_quote_init() { if ( ! class_exists( 'WC_Request_Shipping_Quote_Method' ) ) { class WC_Request_Shipping_Quote_Method extends WC_Shipping_Method { public function __construct() { $this->id = 'request_a_shipping_quote'; // Id for your shipping method. Should be uunique. $this

Best Strategies for preventing addresses with PO Boxes?

烂漫一生 提交于 2019-12-06 06:20:26
I have a client which is shipping via UPS, and therefore cannot deliver to Post Office boxes. I would like to be able to validate customer address fields in order to prevent them from entering addresses which include a PO box. It would be best if this were implemented as a regex so that I could use a client-side regex validation control (ASP.NET). I realize there's probably no way to get a 100% detection rate, I'm just looking for something that will work most of the time. This should get you started. Test to see if the Address field matches this regex. "^P\.?\s?O\.?\sB[Oo][Xx]." Translation

Prestashop shipping cost by state

痞子三分冷 提交于 2019-12-06 05:00:13
Is there by any chance a way to set shipping cost by state in a carrier in prestashop? i.e. let's say i want a different shipping cost to send in Alabama than in Alaska with the same carrier Thanks Mike Kranzler There are a couple ways of doing this. You can purchase an external module, such as this one , or create an override like so : 1) Copy "classes/Address.php" to "override/classes/Address.php". 2) In line 28 change class name from AddressCore to Address 3) Before function getZoneById, paste this new function /** * Return postcode of address * * @param $id_address Address id * @return

magento charge shipping as percentage of subtotal

僤鯓⒐⒋嵵緔 提交于 2019-12-05 09:38:53
问题 Wanted to calculate a shipping cost on basis of percentage which is also manageable from admin. For E.g :- Shipping cost [ADMIN] : 10 If subtotal = 100. Then Shipping cost = 10. Thanks in advance. 回答1: Alas got the answer. File copy from app/code/core/Mage/Shipping/Model/Carrier/Flatrate.php to --> local/Mage/Shipping/Model/Carrier/Flatrate.php About line 96 edit accordingly: if ($request->getFreeShipping() === true || $request->getPackageQty() == $this->getFreeBoxes()) { $shippingPrice = '0

UPS Shipping Tutorial (PHP)

梦想的初衷 提交于 2019-12-05 09:10:50
I finally managed to set up an UPS shipment XML request and I would like to share it with other people struggling with it. So here is a complete PHP object oriented valid XML according to newest documentation from 2017. Im doing this because there are not many helpful information on the internet and I want to change that. This code also solves many common errors about which you can find questions here on StackOverflow but mostly without answers. This is not a question, its a tutorial for those who will be doing UPS Shipments in the future. I have managed to solve these common UPS errors with