When going through checkout, when I submit the shipping method step with either Free Shipping or Flat Rate Shipping selected I get an error message pop up stating "Invalid shipping method."
This error is triggered in public function saveShippingMethod($shippingMethod)
because
$this->getQuote()->getShippingAddress()->getShippingRateByCode($shippingMethod);
is not returning a $rate
.
Here is the output of this query:
SELECT * FROM core_config_data
WHERE path LIKE 'carriers/flatrate/%' OR path LIKE 'carriers/freeshipping/%';
652 default 0 carriers/flatrate/active 1
653 default 0 carriers/flatrate/title Flat Rate
654 default 0 carriers/flatrate/name Fixed
655 default 0 carriers/flatrate/type O
656 default 0 carriers/flatrate/price 5.00
657 default 0 carriers/flatrate/handling_type F
658 default 0 carriers/flatrate/handling_fee NULL
659 default 0 carriers/flatrate/specificerrmsg This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.
660 default 0 carriers/flatrate/sallowspecific 0
661 default 0 carriers/flatrate/specificcountry NULL
662 default 0 carriers/flatrate/showmethod 0
663 default 0 carriers/flatrate/sort_order 1
676 default 0 carriers/freeshipping/active 1
677 default 0 carriers/freeshipping/title Free Shipping
678 default 0 carriers/freeshipping/name Free
679 default 0 carriers/freeshipping/free_shipping_subtotal NULL
680 default 0 carriers/freeshipping/specificerrmsg This shipping met hod is currently unavailable. If you would like to ship using this shipping method, please contact us.
681 default 0 carriers/freeshipping/sallowspecific 0
682 default 0 carriers/freeshipping/specificcountry NULL
683 default 0 carriers/freeshipping/showmethod 0
684 default 0 carriers/freeshipping/sort_order NULL
Why am I getting this error and what do i need to do to resolve it?