Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Kingo Damgaard 157 posts 456 karma points
    Jan 23, 2014 @ 15:04
    Bo Kingo Damgaard
    0

    How to get orders from .NET without context

    Hi

    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

    /Bo

  • Bo Kingo Damgaard 157 posts 456 karma points
    Jan 24, 2014 @ 08:12
    Bo Kingo Damgaard
    0

    Update:

    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 way
    2. Change DB access to use the new Umbraco 6.x ApplicationContext.Current.DatabaseContext.Database

    /Bo

  • Bo Kingo Damgaard 157 posts 456 karma points
    Jan 24, 2014 @ 09:56
    Bo Kingo Damgaard
    100

    Solution:

    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

    /Bo

  • Anders Burla 2560 posts 8256 karma points
    Jan 24, 2014 @ 14:48
    Anders Burla
    0

    Fixed it in Tea Commerce 2.2.4 (which just started). Do you want a nightly - then just send your email adress.

    Kind regards
    Anders

  • Bo Kingo Damgaard 157 posts 456 karma points
    Jan 24, 2014 @ 15:03
    Bo Kingo Damgaard
    0

    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 :)

    /Bo

  • Anders Burla 2560 posts 8256 karma points
    Jan 24, 2014 @ 15:11
    Anders Burla
    0

    The file version always say 2.0 so look in Umbraco - installed packages. There you have the right number.

  • Bo Kingo Damgaard 157 posts 456 karma points
    Jan 24, 2014 @ 15:18
    Bo Kingo Damgaard
    0

    Ok, then it's 2.1.3.

    You can email me at: bo at flex-it dot dk

    TIA

    /Bo

  • Anders Burla 2560 posts 8256 karma points
    Jun 16, 2014 @ 09:38
    Anders Burla
    0

    Hi Bo

    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.

    Kind regards
    Anders

  • Bo Kingo Damgaard 157 posts 456 karma points
    May 22, 2015 @ 06:48
    Bo Kingo Damgaard
    0

    Hi Anders

    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

    /Bo

  • Bo Kingo Damgaard 157 posts 456 karma points
    May 22, 2015 @ 07:07
    Bo Kingo Damgaard
    0

    Hi again

    I seems to still be an issue in 2.3.0

    /Bo

  • Anders Burla 2560 posts 8256 karma points
    May 22, 2015 @ 08:40
    Anders Burla
    0

    Hi Bo

    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?

    Kind regards
    Anders 

Please Sign in or register to post replies

Write your reply to:

Draft