Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How do I get orders from backend, when I don't have an Umbraco context. Both TC.GetOrder and TeaCommerceHelper.GetOrders throws error because context is missing
It turns out that DatabaseFactory in TeaCommerce.Umbraco.Configuration.dll relies on httpcontext for caching a request based database object. Could you maybe do one of the following:
1. Check to see if HttpContext.Current is null and then just return the Database with out caching - otherwise do it the old way2. Change DB access to use the new Umbraco 6.x ApplicationContext.Current.DatabaseContext.Database
I implemented my own version of IDatabaseFactory, and initialized an OrderRepository with an instance of that. It works but I think it's a bit hacky. Please make TC not dependent of HttpContext
Fixed it in Tea Commerce 2.2.4 (which just started). Do you want a nightly - then just send your email adress.
Is it the fileversion that determines the TC version - or can I see it somewhere else? If so I'll have to upgrade from 2.0.0 to 2.2.4 - how much work is involved :)
The file version always say 2.0 so look in Umbraco - installed packages. There you have the right number.
Ok, then it's 2.1.3.
You can email me at: bo at flex-it dot dk
What is your use case for calling Tea Commerce with no HttpContext in scope?Trying to figure out what you are doing since TC has lots of HttpContext usage.
A late response, buth I just hit the same need again, and found my own old post :)
I need access to TC api from a background thread that synchronizes orders to a customers ERP system, and now I need to send a follow-up email 7 days after the did some shopping
I seems to still be an issue in 2.3.0
I think we removed it again because we open sourced v 3 of Tea Commerce on GitHub and people can now make their own implementation of it.https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/blob/master/Source/TeaCommerce.Umbraco.Configuration/Persistence/DatabaseFactory.cs
Do you need it to be 2.3?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted