Vendr 3, Umb 10.6.1
I have a new registered component that checks and sets the default currency on every page load. It's called in the Master template. It's so that once the language changer reloads the correct language (it's just a javascript window.location affair), the culture is checked, country determined and appropriate default currency set in the session. Unfortunately, you only see the results of the currency change if you reload the otherwise correct page. I'm guessing that calling it as the Master template is being processed is too late for the session. Can anyone suggest what I need to do, or where I need to put the call, to have it operate without a second reload?
(For the forum police, I think this is a general Umbraco/MVC issue hence not in hq-products 😉 )
Thanks.
Craig100
10/16/2023, 4:17 PM
I had thought of extending the RenderController Index action, but if I do that, I don't know how I'd get the StoreId and CountryCode.
Craig100
10/17/2023, 11:25 AM
It turns out the answer was to put the code in a Notification Handler and register that. It now runs on every page load.