CoCart

Omschrijving

WooCommerce REST API is great but it’s missing one important ability and that is to manage the shopping cart.

That’s were CoCart comes in. Just as a customer would interact with an online store in their browser, CoCart allows you to get the cart contents including totals, add, remove, restore and update items to and from the shopping cart via the REST API.

Built with Developers in Mind

Exclusively for WooCommerce. With CoCart, running your store completely via the REST API is now complete. Control and manage the shopping cart with ease. Powerful options, clear responses and developer ready for any filtering required to your needs.

CoCart also works well with official WooCommerce extensions such as:

  • Bookings
  • Name Your Price
  • Points and Rewards
  • Pre-Orders
  • Product Add-ons

More extensions will be supported in CoCart Pro starting with Subscriptions.

Intrigued? I bet you are. See documentation on how to use CoCart today.

Enjoy!

CoCart Pro

Want to control more? I bet you do.

  • Add and Remove Coupons to Cart
  • Get Applied Coupons
  • Get Coupon Discount Total
  • Get Cart Total Weight
  • Get Cross Sells
  • Get and Set Shipping Methods
  • Get and Set Tax Fees
  • Calculate Shipping Fees
  • Calculate Totals and Fees
  • Calculate Total and Shipping Tax Fees
  • Support via Slack
  • and possibly more features and add-ons to follow.

Sign up if you are interested in CoCart Pro

More information

This plugin is created and maintained by Sébastien Dumont.

Schermafdrukken

  • Empty Cart
  • Viewing the carts content without product thumbnail.
  • Viewing the carts content with product thumbnail.

Installatie

Minimum Requirements

Visit the WooCommerce server requirements documentation for a detailed list of server requirements.

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 favourite FTP application. The WordPress codex contains instructions on how to do this here.

Updating

Automatic updates should work like a charm; as always though, ensure you backup your site just in case.

FAQ

Where can I find documentation for CoCart?

The documentation for CoCart can be found here.

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

You certainly can. Filters are available to do just that (so long as you are using version 2.0+). Checkout the tweaks plugin to view or maybe use the examples provided.

Does it work with any of the official WooCommerce libraries?

Only if you request your customers to be logged in first. This is because all the libraries require authentication which the cart does not require.

Can I view any customers cart?

Yes but only those with administrator capabilities can and if persistent cart was left enabled. – See documentation for more information.

Where can I report bugs or contribute to the project?

Report bugs on the CoCart GitHub repository.

Where can I get support or talk to other users?

If you get stuck, you can ask for help in the CoCart support forum.

Beoordelingen

april 18, 2019
I used this plugin for a mobile app project I have been working on and first off the documentation was very easy to follow. I had no issues getting it working and it integrated with JWT Authentication out of the box. Unfortunately, Woocommerce 3.6 came out and pretty much broke the plugin due to how they were now implementing certain things. I posted on the forums and in a few hours I got a response from the author. He was very understanding and gave a suggestion on what to do for the time being until he implemented a fix. A few hours later, he released a pre-release update which fixed the issue. TL:DR; Great plugin, Great support and will highly recommend this plugin to anyone who needs to access Woocommerce cart through a rest API.
november 13, 2018
This plugin works great out of the box for adding products to the Woo cart via API. The code is solid and functionality is as expected, thanks Sebastien!
oktober 23, 2018
Very nice plugin. For fast development.
juli 18, 2018
This plugin was critical to achieve my project of building a Headless / Decoupled WooCommerce store. I wanted to provide my clients with a CMS to manage their store, but wanted to build the front-end in React. I was able to fetch content over the WooCommerce REST API, but otherwise would not have been able to fetch the cart, and add & remove items if not for this plugin. Thank you very much Sébastien for sharing this extension, you've saved me a lot of time.
juni 12, 2018
Thanks very much for developing and sharing this. It has greatly helped me in creating a 'universal' cart in a WooCommerce multi-site environment, where only one site is running the shop. Seems a few bugs here and there; doesn't seem to play so nice with WooCommerce API - PHP Client but mostly works perfectly. I think a great feature would be to create a route to retrieve 'cart notices'. So, for example, if a product gets sold out, I can check if there are any cart notices like 'x has been removed from your cart', and print those outside of the WooCommerce environment. (This might be better for the WC core rest API.) EDIT Unfortunately this plugin didn't seem to work for me in the end. It did not work for me on a clean wordpress/woocommerce install with the official WooCommerce rest API php wrapper library. Only a single cart was ever interacted with. https://github.com/seb86/cart-rest-api-for-woocommerce/issues/31 Trying to use curl and javascript didn't work either in a multisite environment because of the complexities of transmitting session/cookie data from a SSO multisite when using the api. I think ultimately the key to making this plugin work would be to pass a customer id in a authenticated api call so that the cart in question is not dependent on the complex browser cart session processes going on in native WC, which make a bulletproof cart rest api a complex thing to achieve.
Lees alle 6 beoordelingen

Bijdragers & ontwikkelaars

“CoCart” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

Vertaal “CoCart” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

v2.0.2 – 19th July, 2019

  • Tweaked: Updated link to getting started page if CoCart was installed via WP-CLI.

v2.0.1 – 18th July, 2019

  • Tweaked: get_cart_contents_count() is now called static.
  • Tweaked: Added check for cart totals to make sure they are set before falling back to cart totals in session.
  • Dev: Added filter cocart_update_item for the response when updating an item.
  • Dev: Tweaked CoCart page in the WordPress dashboard to support sections.

v2.0.0 – 3rd July, 2019

  • NEW: REST API namespace. CoCart is now an individual API and is no longer nested with WooCommerce’s core REST API.
  • NEW: Check to see if the cart is set before falling back to the cart in session if one exists.
  • NEW: Get a specific customers cart via their customer ID number. – See documentation for details.
  • NEW: Product title also returns besides just the product name when getting the cart.
  • NEW: Product price also returns when getting the cart.
  • Changed: Filter and Action Hook names in new API. – See documentation for details.
  • Improved: Complexity of functions for better performance and usage.
  • Tweaked: Added checking for items already in the cart.
  • Tweaked: Check if cart is empty before removing an item.
  • Tweaked: Responses for adding, updating, removing and restoring items to return whole cart if requested.
  • Tweaked: Responses for updating items to return the quantity of item along with message.
  • Tweaked: Totals can now return once calculated if requested.
  • Tweaked: Totals now return from session and can be returned pre-formatted if requested. – See documentation for details.
  • Tweaked: New option to refresh cart totals once item has been added or updated.
  • Dev: Added action hooks for getting cart, cart is cleared, item added, item removed and item restored.
  • Dev: Added filter to allow additional checks before the item is added to the cart.
  • Dev: Added filter to apply additional data to return when cart is returned.
  • Dev: Added filter to change the size of the thumbnail returned.
  • Dev: Added new option to return cart raw if requested.

View the full changelog here.