frontends icon indicating copy to clipboard operation
frontends copied to clipboard

[FEATURE] mechanism to reload data on session context change

Open StanislovasRamanauskas opened this issue 2 years ago • 3 comments

Description

The original issue can be found in Slack here

In our case, we need to reload product price data when customer logins/logout, because we have different pricing for customer groups. Currently there is no easy way to do so, because there is no co-relation between product data and session on presentation layer. As @mkucmus said, we need some mechanism to reload data on context change (customer login/logout, language, currency change, etc)

Use Case

Possibility to reload data on session context change.

Proposed Solution

No response

Alternatives Considered

No response

Additional Context

No response

StanislovasRamanauskas avatar May 10 '23 13:05 StanislovasRamanauskas

I have some thoughts about this issue:

Languages: We must re-fetch almost everything when changing languages because most pages are based on CMS. So in this case better solution is to reload the page than re-fetching content. We should split this issue in to 2 different tasks, one for language second for price/currency.

Prices/currency: Do we know how many shops using the Frontends app will have a multi-pricing solution? If the percentage of usage is small, maybe it should be resolved via module not as a core function?

mdanilowicz avatar May 14 '23 09:05 mdanilowicz

Speaking about demo-template - we can refresh it by default. This is still possible for people to change this behaviour and invoke data fetching instead.

How is that relevant to multi-pricing? The more modular it will be the better, for sure not every project will use it, but if someone will it would be good to have is just as "additional composable you can use"

patzick avatar Jul 04 '23 13:07 patzick

What's the plan to solve this? Long time no progress.

Will we add an Example and some Documentation?

BrocksiNet avatar Aug 14 '23 07:08 BrocksiNet