I have created a shipping method in the CP but when I output
cart.availableShippingMethods a null value is returned. I've checked my database and the shipping method is there.
Is there something I'm missing?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.Sign up to join this community
Does your shipping method have any conditions set? Like a country or region? I think
getAvailableShippingMethods() takes into account your shipping address (if any) and only shows shipping methods that apply to the current shipping details.
Second thing to check: does your shipping method have at least one shipping rule? Commerce needs a shipping rule to be checked against your order.