Closed uusa35 closed 7 years ago
But that's not doing what the method is set to do, it's suppose to set the user's currency. All the stuff you're trying to add to the setUserCurrency
method is already in the getUserCurrency
.
The flow works like this. The request comes into the handle
method, where we get the currency using getUserCurrency
. In the getUserCurrency
we check the request for a valid currency
parameter and if one is not found we then check the session for a previously set valid currency. And if neither the request nor the session have valid a currency, we return null
. Back in the handle
method if we get null
we then pull the system default.
So as you can see we already check the request and the session, so there is no need to check that again in the setUserCurrency
method. This should be done before using the setUserCurrency
method.
Hi @Torann
Where did you set the session currency and how did you set the status currency to active (database)?
I tried to call the URL with ?currency=idr
but the currency still use the default currency which is USD
Nice fixes but there is still one bug in 'setUserCurrency' it should be like this: