Answers.Body: <p>I fixed it by deleteing line 15 and 17 on orderssetting twig template, than updating entry on db with save button, than restoring twig template</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-08T03:38:59.467Z
Answers.Text: Was this with the stock Commerce templates or were modifications made?  If you think you found a bug, can you submit details and steps to reproduce to support@craftcommerce.com?
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-07T20:19:21.323Z
Answers.LastActivityDate: 2016-08-07T20:19:21.323Z
Answers.UserDisplayName: vigan.abd
Body: <p>I'm trying to add a product to cart but response is http status code 500. How can i fix it?. I'm using a basic Craft Commerce template and just created some products.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-07T19:50:32.463Z
Comments.Text: When i enabled debug mode php shows me this:
  Fatal error: Call to a member function getFieldLayout() on null in C:\Users\Vigan\Desktop\XAMPP_Subdomains\DevTest\craft\plugins\commerce\models\Commerce_OrderModel.php on line 192
Comments.UserDisplayName: vigan.abd
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-07T20:04:04.240Z
Comments.Text: The problem stands at orderssetting template it returns error on line 15     {% if orderSettings.id %}<input type="hidden" name="orderSettingsId" value="{{ orderSettings.id }}">{% endif %}
Comments.UserDisplayName: vigan.abd
Tags: <plugin-craftcommerce>
Title: Add to cart returning error code 500
ThreadText: # Add to cart returning error code 500
  
  (Asked by: username_0 on 2016-08-07)
  
  I'm trying to add a product to cart but response is http status code 500. How can i fix it?. I'm using a basic Craft Commerce template and just created some products.
  
  **Tags:** plugin-craftcommerce
  
  > **Comments:**
  > **username_0**: When i enabled debug mode php shows me this: Fatal error: Call to a member function getFieldLayout() on null in C:\Users\Vigan\Desktop\XAMPP_Subdomains\DevTest\craft\plugins\commerce\models\Commerce_OrderModel.php on line 192  
  > **username_0**: The problem stands at orderssetting template it returns error on line 15     {% if orderSettings.id %}<input type="hidden" name="orderSettingsId" value="{{ orderSettings.id }}">{% endif %}  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-08-07. Score: 0
  
  I fixed it by deleteing line 15 and 17 on orderssetting twig template, than updating entry on db with save button, than restoring twig template
  
  > **Comments:**
  > **username_1**: Was this with the stock Commerce templates or were modifications made?  If you think you found a bug, can you submit details and steps to reproduce to support@craftcommerce.com?  
  
  ---
  
  