How do you initiate the Token.Store instance?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

How do you initiate the Token.Store instance?

Post by AbleMods » Fri May 22, 2009 8:46 am

I've got some server-side only code that runs in a scheduled fashion - there is no browser activity necessary to fire the routines I've written.

Prior to 7.0.2, my classes always found Token.Instance.Store fully loaded and populated. Store name, store settings etc were all loaded and available.

Now that I've upgraded to 7.0.2, this is no longer the case. The entire Token instance is empty ('nothing'). Store is running fine otherwise.

Is there a way to manually populate the entire Token instance? I tried

Code: Select all

Token.Instance.Store = StoreDataSource.Load(1)
which loads the store, but store settings doesn't populate.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: How do you initiate the Token.Store instance?

Post by nickc » Fri May 22, 2009 9:12 am


User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: How do you initiate the Token.Store instance?

Post by AbleMods » Fri May 22, 2009 10:44 am

Nick,

Thanks for the pointer in the right direction.

Wonder why Able changed it though - it didn't used to require an HTTP context.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply