@janulka
Attached are the changes to the PHP files (relative to version 0.9). This patch doesn't solve the problem by itself, but it does provide the needed functionality. Basically, it adds $allowCreate as a parameter to methods such as ShoppingCart::current_order() and EcommerceSiteTreeExtension::Cart()), but the default behaviour is still to create the cart.
You will still have to manually update all of your ecommerce templates. For example, my dropdown cart looks like this:
<% if Cart(0) %>
<% control Cart %>
<span id="$SideBarCartID">
<% include CartDropDownInner %>
</span>
<% end_control %>
<% else %>
Note the "Cart(0)" at the top. Passing 0 ensures that the cart won't be created if it doesn't exist.
I recommend temporarily inserting a user_error() call in ShoppingCart::current_order() just before the code that creates a cart. That way you can visit various pages on your website, and it will spit out an error if it tries to create a cart. Even better, the stack trace will tell you what you need to change. **
I hope that this helps.
Hans
** IMPORTANT: Clear the cache first, or open an incognito window before trying this. You won't get an error if a cart already exists for the current session.