craft.commerce.cart

This template function returns the current users cart, which is an Order Model.

You would get cart for the current user like this:

{% set cart = craft.commerce.cart %}

which is the same as:

{% set cart = craft.commerce.getCart() %}

You can now show the current customer their cart, and add things to this cart with forms in your templates.

Once a Cart is completed and turned into an Order, calling the function again will give your user a fresh new cart.

Buy Craft Commerce

Craft Commerce site license

Includes

  • Developer support
  • One year of updates ($199/year for updates after that)
  • Craft Pro site license
Buy now for $999
Can I try before buying?

Absolutely. Just download it from the “Download” button in the site header and follow our installation instructions. You’ll have the full feature set to experiment with, without any restrictions, as long as you’re running it from a development, testing, or staging domain.

Will there be recurring/upgrade fees?

Each Commerce license comes with one year of updates. After that, you can unlock additional updates for $199 per year.

Can I use this on an existing Craft site?

Yes! And if you already have a Craft Pro license (or you don’t need one), you can purchase Craft Commerce directly from the Plugin Store or just leave the switch off that says “Include a Craft Pro license” in the purchase form.

Is Craft Pro required?

Craft Commerce does not require Craft Pro; it works perfectly fine on Craft Solo as well!

Can I try before buying?

Absolutely. Just download it from the “Download” button in the site header and follow our installation instructions. You’ll have the full feature set to experiment with, without any restrictions, as long as you’re running it from a development, testing, or staging domain.

Will there be recurring/upgrade fees?

Each Commerce license comes with one year of updates. After that, you can unlock additional updates for $199 per year.

Can I use this on an existing Craft site?

Yes! And if you already have a Craft Pro license (or you don’t need one), you can purchase Craft Commerce directly from the Plugin Store or just leave the switch off that says “Include a Craft Pro license” in the purchase form.

Is Craft Pro required?

Craft Commerce does not require Craft Pro; it works perfectly fine on Craft Solo as well!