Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Doesn't Update via Localization.CurrencyCacheMinutes

  1. #1
    omaxuk is offline Member
    Join Date
    Apr 2009
    Location
    We're Brits
    Posts
    73

    Default Doesn't Update via Localization.CurrencyCacheMinutes

    I'm using the default currency feed. Works fine, but as I understand it, the cache will update using AppConfig: Localization.CurrencyCacheMinutes.

    Manual says:

    The site will call the live currency server specified in AppConfig:Localization.CurrencyFeedUrl parameter every time this cache period expires.


    Setting this as i have it (on the default of 60) leaves the update unmoved. ie I must do it manully. which works fine. But no cache update. Why? I hadn't noticed untill I relaised my rates haven't changeed since I last did it manually 2 months back.

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    That's not entirely accurate and we'll update the manual to more accurately reflect what is going on and take a more in-depth look at what it really should be doing.

    What actually occurs is currency rates will be retrieved from the cache, unless it's expired (as specified by that appconfig) at which time the rates will be retrieved from the Currency table in the database. The values in the database are set either manually when you update them in the admin section, or when you manually execute the feed.

    It's a fairly simple modification to make it actually call the feed instead of selecting from the database, you simply have to add
    Code:
    GetLiveRates();
    in the private XmlDocument RatesDoc property in the Currency.cs class (however this will require a recompile). But you could also check the cache in another page that you have access to (that isn't part of the source code) and if the cache has expired just make a call to
    Code:
    Currency.GetLiveRates();
    to update the values in the database (return type is void...so you don't have to set it to a variable or do anything else in the code to make it stick)
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    omaxuk is offline Member
    Join Date
    Apr 2009
    Location
    We're Brits
    Posts
    73

    Default

    That trick is a little beyond my ablities so we'll have to do it manually. That hurts because having gone to all that trouble in developemt currency rates. for it not to update seems criminal. Particulary if for you deleloper types its a no-brainer.

    I love thsi cart, but.... feel like I'm putting on the record, again. But for what are often no more than simple tricks, thsi cart will let us sell worldwide. Yet despite being a whisker off, , it quickly falls over if you do anything non US-centric.

    For eample: we wnat a German and an Italiian lang pack. Swedish too? Maybe Japanese. Can a set of language packs for even the major langs be difficult? Surely not half as difficul as getting this cart as good as it is. But no packs. I had to do my own 'English' lang pack and translate from 'American'. Surely that one could be in the cart? Delivered, Despatched, Air, freight, and Shipping, even when not on a boat is, I believe, all one word for this cart.

    Theres no states, no counties or provinces (with more thatn 5 chars when I last looked) for much outside the US. I don't wan to go on, but he software has it here, but its not in it. look to NZ or Aussie for example. Mammoth job for every non US buyer. We had to add them. If the rest of he cart ws a pile of 'poo' I could forgve you, but this seems liek madness!