CoCart Pro Launched

Updated: 8th September 2019

I’m pleased to announce that CoCart Pro has now launched and it could not have come at a better time. Over 30% of the user base is now using version 2.0 of CoCart which is the minimum requirement to use CoCart Pro and CoCart has just passed 6000+ downloads. ?

I also like to thank those who have tested the beta’s, provided feedback and reported bugs found during it’s development. ?

It has been a great help to get the product ready and I have awarded you with a discount via e-mail as a thank you.

Support

Support will be provided via Slack. There you can contact me directly via DM when needed and use the other available channels to discuss with other users and developers, provide feedback, share ideas or even showcase what you have built with CoCart.

An invite will be sent to the customer via e-mail to which you must accept in order to receive the support.

Why Slack instead of e-mail? Well for one so I don’t get a full inbox, two, Slack is the perfect tool to communicate with my customers anywhere. We can see each other online and have a live conversation which is far more engaging than e-mail.

Lifetime Offer

For those who like to get on the best deals at launch, you can do just that.

For a limited time, you can get the lifetime tier for a one time purchase that will allow you to use CoCart Pro on unlimited sites, receive lifetime support and free updates.

What’s Next?

Over time I will be supporting more official WooCommerce extensions and improving the documentation for other code languages.

If you have any questions I recommend checking out the FAQ page. I may already have an answer.

Coming in v2: Totals

Fetching the cart totals is one of the most important parts of the CoCart API and while you do get all the information you need, they were not always returned in the same format when it came to the actual totals and did not have the currency symbol applied.

I’m sure developers would have to convert the values and apply the currency symbol after fetching the totals which could also increase load time for their app with the additional code required.

For version 2, I wanted to make it faster and easier for developers by returning the results pre-formatted ready to simply display them.

All totals can now return as a string with the currency symbol automatically applied according to the store currency set in the WooCommerce settings.

To get these results, simply set the new property as true.

See documentation for example.

That’s it!

Feedback NO LONGER Required!

CoCart v2 is now available.

Coming in v2: Responses

Getting the correct returned response are important when using the REST-API so providing the option to return the whole cart without the need to call it again is also important.

Now when you add an item to the cart, update item quantity, remove item or restore an item. You can now return the whole cart contents rather than the default response if requested.

For e.g. by default when adding an item to cart, only that item would return it’s details. So before that happens if the return cart parameter is used, the whole of the cart is instead returned with that added item.

Pretty sweat right!

I’m sure developers will find this useful. What do you think of this improvement coming?


Version 2 is still in development so please come back for more news as it develops.

Thank you.

Coming in v2: Getting the Cart

I thought I share some more news on what is coming to v2 of CoCart. Progress is being made the project is not dead though with the release of v3.6 of WooCommerce I thought it was going to be but that was solved quickly.

Now one popular request was to get a specific customers cart. I thought this might be a difficult challenge maybe by creating a new cart table in the database but it turns out WooCommerce already has a feature that is probably only known to those who read the whole of the WooCommerce source code.

So those with administrator capabilities can now add a new parameter for the customers ID number. When called it will get the cart contents from that specific customer from when they were logged in last. I don’t see any other user role that would need to access a customers cart. Feel free to comment below if you feel otherwise.

FYI

However, this feature will only work if the site owner has left persistent cart enabled and the session has not cleared or expired. If no cart data is stored for that customer it will fallback to the cart in use.

On top of that I have also applied a filter that allows you to apply additional information to return for the items in the cart.

Version 2 is still in development so please come back for more news as it develops.

Thank you.

Coming in v2: The Endpoint

CoCart version 2 is currently in development and I wanted to give you all a heads up on one core change coming to CoCart and that is the endpoint.

Currently, the API migrates under WooCommerce’s API. At the time of CoCart’s early development, the WooCommerce API was version 2. Now WooCommerce’s API is on version 3.

I have not updated the version CoCart is nested under for two reasons.

  1. WooCommerce API version 2 still works fine with CoCart.
  2. I did not want users of CoCart to change the API endpoint again in their site or app projects once version 2 of CoCart is available.

For CoCart to evolve the API endpoints need to move out of WooCommerce’s API and get its own place. This will also help to keep compatibility with WooCommerce and increase the strength of the code for the future.

When version 2 is released, there is no need to worry about making any changes to your site or app using CoCart straight away as the current API will still be supported as a legacy API but when you have the chance to switch over to the new API, I highly recommend that you do so, especially if you are going to be using CoCart Pro once it is released.

The current API endpoint is like so: yourdomainname.xyz/wp-json/wc/v2/cart/

When version 2 is made available, the new endpoint will be like so: yourdomainname.xyz/wp-json/cocart/v1/cart/

API Differences

The API its self does not currently have anything new so there is no current change but with this move made it will allow CoCart to support additional features making CoCart a product of its own rather than just a supported extension to WooCommerce’s API.

The API version will also be reset back to v1 and development will focus on stability before adding support for other product types provided by WooCommerce extensions.

Any specific changes made to the API will be made available via documentation.

This is just the first step for CoCart to evolve. More details will be shared in the next news post.

If you have a comment or suggestion for moving the API endpoint, please leave your comments below.

Thank you for reading.