CoCart – Decoupling WooCommerce Made Easy

설명

Important

CoCart v4.0.0 is coming soon. Follow the development blog for updates.

CoCart makes it easy to decouple your WooCommerce store via a customizable REST API that takes the pain out of developing – allowing you to build fast and flexible headless stores.

Why developers choose (and love) CoCart

The core plugin is free, flexible, and backed by a global community.

✨ Core Features

CoCart’s core features provides everything you need to use with any modern framework you desire.

  • NEW: Override the price for simple or variable products added to cart.
  • NEW: Attach customers email address while adding an item to the cart. Useful for abandoned cart situations.
  • Load a cart in session via the web. Useful if you don’t have a headless checkout and want to use the native checkout.
  • Supports basic authentication including the use of email as the username.
  • Supports multi-site network.
  • Does NOT Cache the API so responses are fresh every time.
  • Works across multiple domains, CORS ready! So you can have multiple front-ends connected to one backend.
  • Allows you to filter CoCart to be white-labelled.

★★★★★

An excellent plugin, which makes building a headless WooCommerce experience a breeze. Easy to use, nearly zero setup time. Harald Schneider

🥪 The API

CoCart is optimized for performance and designed for developers that provides support out-of-the-box experience that manages the cart sessions for both guest and registered customers without the need of being on the same origin as the WordPress installation.

CoCart does not store cookies which allows the developer to cache the session client-side with the use of authentication being optional.

🛒 Cart API

The cart is the main feature of CoCart that provides the ability to add, update, remove or even restore items individually or in bulk and more.

The flow is simple and returns an updated cart response every time with the totals calculated and stock checks done for you, making it easier to simply update your UX/UI with the results.

🛍️ Products API

Products can be accessed from your store to display how you like by using the queries to help filter by product categories, tags, attributes and much more all without the need to authenticate with WooCommerce REST API Keys.

All the information you need about a product and it’s conditions to help you with your UX/UI development is all provided ready for you.

➕ Extras

Additional API’s are provided to help with your user actions as well as debugging.

  • Get store information.
  • Login the user. (Required if you are using the JWT Authentication Addon)
  • Logout the user.
  • Empty the cart.

As an added bonus for administrators, CoCart also provides the capabilities to:

  • View all carts in session.
  • Get details of a cart in session.
  • View items in a cart session.
  • Delete a cart session.

★★★★★

Amazing Plugin. I’m using it to create a react-native app with WooCommerce as back-end. This plugin is a life-saver! Daniel Loureiro

🧰 Tools and Libraries

  • CoCart Beta Tester allows you to easily update to pre-release versions of CoCart for testing and development purposes.
  • CoCart VSCode extension for Visual Studio Code adds snippets and autocompletion of functions, classes and hooks.
  • CoCart Product Support Boilerplate provides a basic boilerplate for supporting a different product types to add to the cart with validation including adding your own parameters.
  • CoCart Cart Callback Example provides you an example of registering a callback that can be triggered when updating the cart.
  • CoCart Tweaks provides a starting point for developers to tweak CoCart to their needs.

★★★★★

This plugin saved me tones of work and it is working amazingly! The plugin author provides fast and high quality support. Well done! @codenroll

📦 CoCart Pro

The core of CoCart is just the tip of the iceberg. CoCart Pro enhances the headless experience with these additional features:

  • Add and Remove Coupons to Cart
  • Retrieve Coupon Discount Total
  • Retrieve and Set Payment Method
  • Retrieve and Set Shipping Methods
  • Retrieve and Set Fees
  • Calculate Shipping Fees
  • Calculate Totals and Fees

More features are in development and will be available soon.

Buy CoCart Pro Now

Extensions supported

View list of the WooCommerce extensions that support CoCart or are supported in CoCart Pro.

Just because an extension is not listed doesn’t mean it won’t work. It just means it hasn’t yet been verified.

📢 Testimonials – Developers love it

★★★★★

Thanks for doing such a great work with this! Works exactly as expected and CoCart seems to have a nice community around it. The founder seems really devoted and that’s one of the key things for a plugin like this to live on and get the right updates in the future. We just got ourselves the lifetime subscription. Mighty Group Agency

★★★★★

This plugin works great out of the box for adding products to the cart via API. The code is solid and functionality is as expected, thanks Sebastien! Scott Bolinger, Creator of Holler Box

More testimonials

See the wall of love.

😍 Priority support

We aim to provide regular support for the CoCart plugin on the WordPress.org forums. But please understand that we do prioritize support for our paying customers. Support can also be requested with the community on Discord.

☀️ Upgrading

It is recommended that anytime you want to update CoCart that you get familiar with what’s changed in the release.

CoCart publishes release notes via the changelog.

CoCart uses Semver practices. The summary of Semver versioning is as follows:

  • MAJOR version when you make incompatible API changes.
  • MINOR version when you add functionality in a backwards compatible manner.
  • PATCH version when you make backwards compatible bug fixes.

You can read more about the details of Semver at semver.org

👍 Add-ons to further enhance CoCart

We also have add-ons that extend CoCart to enhance your development and your customers shopping experience.

They work with the FREE version of CoCart already, and these add-ons of course come with support too.

⌨️ Join our growing community

A Discord community for developers, WordPress agencies and shop owners building the fastest and best headless WooCommerce stores with CoCart.

Join our community

Built with developers in mind

Extensible, adaptable, and open source — CoCart is created with developers in mind. If you’re interested to jump in the project, there are opportunities for developers at all levels to get involved. Contribute to CoCart on the GitHub repository and join the party. 🎉

🐞 Bug reports

Bug reports for CoCart are welcomed in the CoCart repository on GitHub. Please note that GitHub is not a support forum, and that issues that aren’t properly qualified as bugs will be closed.

More information

💯 Credits

This plugin is created by Sébastien Dumont.

Contributors & Developers

“CoCart” has not yet been translated in other languages. You can translate “CoCart” into your language.

INTERESTED IN DEVELOPMENT?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

스크린샷

  • Get Products (API v2)
  • Get Individual Product (API v2)
  • Add Item to Cart (API v2)

설치

Minimum Requirements

  • WordPress v5.6
  • WooCommerce v4.3
  • PHP v7.3

Recommended Requirements

  • WordPress v6.0 or higher.
  • WooCommerce v7.0 or higher.
  • PHP v7.4

Automatic installation

Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of CoCart, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.

In the search field type “CoCart” and click Search Plugins. Once you’ve found the plugin you can view details about it such as the point release, rating and description. Most importantly of course, you can install it by simply clicking “Install Now”.

Manual installation

The manual installation method involves downloading the plugin and uploading it to your webserver via your favorite FTP application. The WordPress codex contains instructions on how to do this here.

Upgrading

It is recommended that anytime you want to update CoCart that you get familiar with what’s changed in the release.

CoCart publishes release notes via the changelog.

CoCart uses Semver practices. The summary of Semver versioning is as follows:

  • MAJOR version when you make incompatible API changes.
  • MINOR version when you add functionality in a backwards compatible manner.
  • PATCH version when you make backwards compatible bug fixes.

You can read more about the details of Semver at semver.org

FAQ

Is CoCart free?

Yes! CoCart’s core features are absolutely free. CoCart Pro completes the full cart experience!

How do I start using CoCart?

You will first need WooCommerce installed with the REST API enabled. Then install CoCart and follow the documentation.

Please check the requirements listed in the installation section.

Who should use CoCart?

CoCart is perfect for ecommerce owners and developers who want to create an ecommerce app for mobile or a custom frontend shopping experience completely using the REST API.

Do I need to have coding skills to use CoCart?

As this plugin provides a REST API built for developers, you will need to have some coding knowledge to use it. Checkout the documentation to get some understanding.

Where can I find documentation for CoCart?

You can find the documentation for CoCart on the CoCart REST API Docs.

Can I change the layout format/add/change details to the responses?

You certainly can. There are over 100+ filters available to do just that. Checkout the tweaks plugin to view or maybe use the examples provided. View the documentation for more.

Why does CoCart use a custom session handler in the first place?

If you’re familiar with WooCommerce, you may be wondering why using a custom session handler at all instead of the WooCommerce default session handler? A number of reasons but the ones that really matter are.

  • The default session handler only supports cookies.
  • The default session handler only saves changes at the end of the request in the shutdown hook.
  • The default session handler has no support for concurrent requests.
  • The default session handler does not support guest customers.
  • The default session handler does not store additional data that maybe required to help you.
  • More consistent with modern web.

Why does CoCart use a custom session table in the database?

The default WooCommerce session table only stores the basics of a cart in session. CoCart provides additional data that maybe required to help you and other add-ons/extensions developed by CoCart or third-parties.

Such as when the cart was created. This information is only stored in the browser session.

Also the source of the cart it was last saved. For the web it will be WooCommerce and for your headless ecommerce CoCart. This lets you know which version of your store your customers are shopping from should you have both web and app versions.

Can I have WordPress running on one domain and my headless ecommerce on another domain?

Yes of course. You just need to enable CORS. You can do that easily with the CORS add-on or you can manually enable it via the filters in the documentation.

Can I add “WooCommerce Subscriptions” product to the cart?

Absolutely you can. Any WooCommerce Subscriptions product can be added to the cart the same way a simple or variable product is added to the cart.

Why can I not add the same item to the cart with a different price?

Each item added to the cart is assigned a cart item key which is made of four key values: Product ID, Variation ID, Variation attributes and Cart item data.

The price and quantity is not taken into account to make this key.

So if you add the same item to the cart but with a different price, the cart will look up the cart item key to see if it’s already added to the cart before deciding to either:
1. Add it as a new item.
2. Update the quantity of the previous item, in your case the price.

Is “WooCommerce Shipping and Tax” plugin supported?

Not at this time. “WooCommerce Shipping and Tax” ignores any REST API from allowing the ability to calculate the taxes from TaxJar except for WooCommerce Blocks and JetPack. However, TaxJar for WooCommerce plugin is supported.

Is “TaxJar for WooCommerce” plugin supported?

If you have “TaxJar for WooCommerce” v3.2.5 or above and CoCart v3.0 or above installed… then yes, it is supported.

Is CoCart right for my business?

CoCart’s REST API makes it possible for businesses to build a complete custom storefront. It’s API-first, enabling your business to take the shopping experience to the next level.

Made by and for developers, CoCart immediately allows you to create sophisticated experiences fast with unlimited possibilities.

With our extensive documentation and resources available, CoCart is a plug and play solution that works out of the box.

Save yourself 80% of a headache and hours of development time.

Can I use any modern stack?

Yes you can use your preferred tools and favorite modern technologies like NextJS, React, Vue, Ember and more giving you endless flexibility and customization.

Why CoCart and not WooCommerce Store API?

Both API’s are unique for their individual purposes.

WooCommerce’s Store API is designed for their Gutenberg blocks which only requires a fixed format and is still prone to be used on native storefronts.

It also only works with Nonces when you are on the site so for mobile apps or headless ecommerce, you will run into issues. It is also missing a lot of valuable information that developers require to help them.

CoCart’s API is designed for decoupling away from WordPress and lets you build headless ecommerce using your favorite technologies. No Nonces, no cookies.

CoCart is packed full of powerful features that are completely customizable making it possible for businesses to build a complete custom storefront how they want.

No matter the type of store you are running, CoCart helps you grow.

It’s made by and for developers and immediately allows you to create sophisticated experiences fast with unlimited possibilities with it’s plug and play solution that just works out of the box.

So even if you are new to building a headless ecommerce or already have a WooCommerce store and been wanting to go headless, now is the time to start.

Don’t take my word for it. Checkout the testimonials left by startups, freelancers, agencies and many more.

Can I install/update CoCart via Composer?

Yes. The best method would be to install/update CoCart from the GitHub repository but you can also do so via https://wpackagist.org/

Does CoCart work for multi-site network?

Yes. Just install CoCart and activate it via the network and all sites will have CoCart enabled.

Can I enable white labelling for CoCart?

Yes you can. You will have to edit your wp-config.php file to add a new constant. Details can be found in the documentation.

Where can I report bugs?

Report bugs on the CoCart GitHub repository. You can also notify us via the support forum – be sure to search the forums to confirm that the error has not already been reported.

CoCart is awesome! Can I contribute?

Yes, you can! Join in on our GitHub repository and follow the development blog to stay up-to-date with everything happening in the project.

Is CoCart translatable?

Yes! CoCart is deployed with full translation and localization support via the ‘cart-rest-api-for-woocommerce’ text-domain.

Where can I get help or talk other users about CoCart core?

If you get stuck, you can ask for help in the CoCart support forum or join the CoCart Community on Discord where you will find like minded developers who help each other out. If you are in need of priority support, it will be provided by either purchasing CoCart Pro.

Where can I find out about the pricing of CoCart Pro?

Find out all relevant pricing information over on the official site.

My question is not listed here. Where can I find more answers?

Check out Frequently Asked Questions for more.

후기

2023년 7월 18일
Perfect for setting up a headless woocommerce backend
2023년 6월 15일
Very good plugin, it helped me to connect Laravel catalog (for PageSpeed Insights, you know) & Woocommerce cart/checkout processing. Brilliant!
2022년 8월 9일 1 reply
An excellent plugin, which makes building a headless WooCommerce experience a breeze. Easy to use, nearly zero setup time.
2021년 8월 16일
since woocommerce is not offering product/cart api, this tools fits right in. you can do everything with it, all via api calls: products, variations, cart, shipping, checkout. (you might need the paid version as well. i bought them, so not sure, what comes out of the box and what features all need the extra mile. but still: worth it!) and the support is fast, too, thanks to seb. love it.
2021년 6월 25일
Plugin is a life saver when working turning wordpress & woocommerce into a headless cms. Support is also great and responsive to help with any issues you may have
모든 21 평가 읽기

변경이력

If you like CoCart and it has helped with your development, please take a moment to provide a review. It helps to keep the plugin going strong, and is greatly appreciated.

v3.9.0 – 2nd August, 2023

What’s New?

  • Removed WooCommerce plugin headers to prevent incompatibility warning message when using “HPOS” feature.
  • Updated “What’s Coming Next?” link on plugins page to inform users about v4.0
  • Tested with WooCommerce v7.9

Bug Fix

  • Fixed Products API where a product has no featured image or gallery images and is unable to determine the placeholder image.

v3.8.2 – 12th July, 2023

What’s New?

  • Tested with WooCommerce v7.8
  • Tested with WordPress v6.2

Bug Fix

  • Fixed searching products by name.

v3.8.1 – 4th March, 2023

What’s New?

  • Added the Authentication class as parameter to cocart_authenticate filter.
  • Added set_method() function to authentication class.

For Developers

Introduced a new filter cocart_login_extras to allow developers to extend the login response.

v3.8.0 – 3rd March, 2023

What’s New?

  • Tested: ✔️ Compatible with WooCommerce v7.4

View the full changelog here.