Answers.Body: <p>Craft Commerce ships with a <code>templates/shop</code> folder that has a working check-out processes using the Dummy gateway adapter and some default products that get populated during installation.</p>
  
  <p>After installing it, you'd access it by going to <code>yoursite.com/shop</code>.  You can use a test credit card number like <code>4222222222222</code> to complete checkout and convert a cart to a completed order.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-13T23:01:14.840Z
Answers.LastActivityDate: 2017-07-13T23:01:14.840Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>Just extending on Brad's answer a bit more so, everything he said plus...</p>
  
  <p>You'll want to create a product type (or use the default products to get started).</p>
  
  <p>Then pull them in on your template like this:</p>
  
  <pre><code>{% set products = craft.commerce.products.type('myType') %}
  
  {% if products|length %}
      {% for product in products %}
          ...
      {% endfor %}
  {% else %}
      {# Could not find any products. #}
  {% endif %}
  </code></pre>
  
  <p>You'll be able to see all of this when you download and install commerce just by looking at the templates that it ships with.</p>
  
  <p>As far as checkout, here is a quick overview to use with PayPal.</p>
  
  <p>You can get <a href="https://www.paypal.com/gb/smarthelp/article/where-can-i-find-test-credit-card-numbers-ts2157" rel="nofollow noreferrer">details of credit card numbers to test with</a> for PayPal.</p>
  
  <p>Note that any number ending in an even number will return a success message and anything ending with an odd number will return false.</p>
  
  <p>Depending on what you use for the gateway, you will want to make sure you remove the <code>paymentMethodId</code> drop down and handle it accordingly. This <em>could</em> be as simple as making it a hidden input with a value of the <code>id</code> of the gateway.</p>
  
  <p>What makes commerce so great - and also difficult at the same time is the flexibility it provides. You can do just about anything you want, in any way you want to do it. You aren't bound by any strict templates.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2017-07-14T01:45:00.947Z
Answers.LastActivityDate: 2018-08-16T13:32:40.107Z
Answers.LastEditDate: 2018-08-16T13:32:40.107Z
Answers.UserDisplayName: Damon
Body: <p>I'm unable to find much documentation nor examples for how to actually utilize Craft Commerce and successfully convert a cart to a completed order.  Any help would be greatly appreciated!</p>
  
Tags: <plugin-craftcommerce><ecommerce>
Title: Any examples of Craft Commerce checkout process for PayPal or any other gateway?
ThreadText: # Any examples of Craft Commerce checkout process for PayPal or any other gateway?
  
  (Asked by: username_0 on 2017-07-13)
  
  I'm unable to find much documentation nor examples for how to actually utilize Craft Commerce and successfully convert a cart to a completed order. Any help would be greatly appreciated!
  
  **Tags:** plugin-craftcommerce, ecommerce
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-07-13. Score: 1
  
  Craft Commerce ships with a `templates/shop` folder that has a working check-out processes using the Dummy gateway adapter and some default products that get populated during installation.
  
  After installing it, you'd access it by going to `yoursite.com/shop`. You can use a test credit card number like `4222222222222` to complete checkout and convert a cart to a completed order.
  
  
  ---
  
  ### Answer by username_2 on 2017-07-14. Score: 1
  
  Just extending on username_1's answer a bit more so, everything he said plus...
  
  You'll want to create a product type (or use the default products to get started).
  
  Then pull them in on your template like this:
  
  ```
  {% set products = craft.commerce.products.type('myType') %}
  
  {% if products|length %}
      {% for product in products %}
          ...
      {% endfor %}
  {% else %}
      {# Could not find any products. #}
  {% endif %}
  
  ```
  
  You'll be able to see all of this when you download and install commerce just by looking at the templates that it ships with.
  
  As far as checkout, here is a quick overview to use with PayPal.
  
  You can get [details of credit card numbers to test with](https://www.paypal.com/gb/smarthelp/article/where-can-i-find-test-credit-card-numbers-ts2157) for PayPal.
  
  Note that any number ending in an even number will return a success message and anything ending with an odd number will return false.
  
  Depending on what you use for the gateway, you will want to make sure you remove the `paymentMethodId` drop down and handle it accordingly. This *could* be as simple as making it a hidden input with a value of the `id` of the gateway.
  
  What makes commerce so great - and also difficult at the same time is the flexibility it provides. You can do just about anything you want, in any way you want to do it. You aren't bound by any strict templates.
  
  
  ---
  
  