Answers.Body: <p>Does your shipping method have any conditions set? Like a country or region? I think <code>getAvailableShippingMethods()</code> takes into account your shipping address (if any) and only shows shipping methods that apply to the current shipping details.</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-20T13:33:59.690Z
Answers.Text: I thought that might be the case so I deleted everything and started again. I just have one Shipping Method setup with no rules or zones and I'm using the general category. Thanks for your help
Answers.UserDisplayName: NixonAnt
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-20T13:38:50.967Z
Answers.Text: Stupid question: does your shipping method have shipping rules? A shipping rules has to match the order for the shipping method to be available. Look at https://github.com/craftcms/commerce/blob/master/src/models/ShippingRule.php#L213-L295 to see how the matching is done, it might help you figure out what's wrong?
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-20T14:06:04.553Z
Answers.Text: I added a rule just to see and it now works. Seems that the method requires at least one rule. Thanks again for your help
Answers.UserDisplayName: NixonAnt
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-20T14:07:00.063Z
Answers.Text: Yes, the method always requires at least one shipping rule to be matched to your order! I will add that to my answer, for future reference :)
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-20T13:08:04.560Z
Answers.LastActivityDate: 2020-02-20T14:07:48.280Z
Answers.LastEditDate: 2020-02-20T14:07:48.280Z
Answers.UserDisplayName: Paul
Body: <p>I have created a shipping method in the CP but when I output <code>cart.availableShippingMethods</code> a null value is returned. I've checked my database and the shipping method is there.</p>
  
  <p>Is there something I'm missing?</p>
  
Tags: <craft3><plugin-craftcommerce2><shipping>
Title: Available Shipping Methods Returns Null
ThreadText: # Available Shipping Methods Returns Null
  
  (Asked by: username_0 on 2020-02-20)
  
  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?
  
  **Tags:** craft3, plugin-craftcommerce2, shipping
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-02-20. Score: 1
  
  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.
  
  > **Comments:**
  > **username_0**: I thought that might be the case so I deleted everything and started again. I just have one Shipping Method setup with no rules or zones and I'm using the general category. Thanks for your help  
  > **username_1**: Stupid question: does your shipping method have shipping rules? A shipping rules has to match the order for the shipping method to be available. Look at https://github.com/craftcms/commerce/blob/master/src/models/ShippingRule.php#L213-L295 to see how the matching is done, it might help you figure out what's wrong?  
  > **username_0**: I added a rule just to see and it now works. Seems that the method requires at least one rule. Thanks again for your help  
  > **username_1**: Yes, the method always requires at least one shipping rule to be matched to your order! I will add that to my answer, for future reference :)  
  
  ---
  
  