kugavosuca
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Require postcode for shipping calculationThanks for the other links. I would argue that marking a thread as “Resolved” on behalf of the OP when it is actually not, is misleading to potential other responders and greatly diminishes the chances of actually getting a real resolution. Well, I’ll try elsewhere since my efforts here are being squashed.
To anyone else that ever comes across this thread, I’ll add my findings so far. This applies to wordpress 4.9.8, woocommerce 3.4.4
I haven’t found a way to require postcode, but have found a way to suppress shipping calculations until a postcode is entered. This is not a elegant. – In woocommerce/templates/cart/cart-shipping.php customize it to check if $package[‘destination’][‘postcode’] is empty. If it is, display a message to populate it (along with any other fields you require). Set $available_methods to false. Next adjust the CSS of the postcode input field so that it is not greyed out and matches the look of the other fields. You can also tweak Shipping settings to ‘Hide shipping costs until address is entered’. This is high level, but should get you started if no other resolution is found.
Forum: Plugins
In reply to: [WooCommerce] Require postcode for shipping calculationHi Hannah,
I think there is some confusion around what I am asking and so this thread is not actually “Resolved”.
I understand postcode is not required by default, hence the purpose of my question asking how I can do so. I don’t think it needs to be required by default and as such, an idea doesn’t need to be submitted to the Ideas Board.
To clarify, I am asking if I can customize only my instance of WooCommerce to make postcode required? Should I resubmit this question since this thread is incorrectly marked as Resolved?
Thanks.
Forum: Plugins
In reply to: [WooCommerce] Require postcode for shipping calculationHi Hannah. I am a little surprised that postcode isn’t required by default. If you try to write a custom shipping method against any of the major carriers, they require postcode. For example, USPS domestic method requires “ZipDestination”. I realize that postcode can be set to required on checkout. But, I’d like to avoid having the estimate much different than the actual checkout quote.
The ideal solution is to require postcode in the cart for shipping estimate. If that is impossible, are either of these two options possible:
1. Not display a shipping method in the cart until a postcode and country are populate. Display message to populate the fields if empty.
2. Disable shipping estimator in the cart – not ideal option at all.Thanks.