adobe / adobe/aem-core-cif-components
StoreCode from Cookies
- Dominant language
- Java
- Stars
- 109
- Forks
- 78
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 4
Description
### User Story
As a user, I want to see products in the preferrable currency
### Description & Motivation
Users shall be able to switch currency for the same page path. So that can give a correct overview of products in a preferable way.
### Deliverables
MagentoGraphqlClientImpl class shall be extended to support special cookie param for determining store code.
Inside the initModel method check if the cookie param is there. If it is valid then use it otherwise go with the default steps (getCustomHttpHeaders or readFallBackConfiguration).
It shall be configurable in order to make it flexible and secure. MagentoGraphqlClientImpl configuration shall have the following parameters:
* Allow store code definition via cookies (checkbox)
* Store code cookie param name (default value "store")
* Allowed store codes (an array of allowed store codes)
### Acceptance Criteria
Store code can be changed via cookie parameter if it is defined in the MagentoGraphqlClientImpl configuration if it is enabled and defined in the list of allowed store codes.
Contributor guide
Research direction
Locate MagentoGraphqlClientImpl and start with its initModel method, then trace getCustomHttpHeaders and readFallBackConfiguration. Review how the client configuration is defined and verify that an enabled, configured cookie with an allowed store code changes the store selection, while invalid or unavailable values preserve the existing fallback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100