fixed currency selection in site domain scenario
Details
Details
- Reviewers
alex
- go to adm.console, Configuration → E-commerce → Currencies
- make sure 3+ currencies are Active
- go to adm.console, Configuration → Website → Site Domains
- add actual domain with 2 currencies
- go to front-end with advanced theme
- confirm, that currency selector contains only currencies, allowed for site domain
- confirm, that currency selector works right - currency change refreshes page with selected currency (not with previous currency) and curr unit prefix doesn't appear in the URL after a currency change
- go to adm.console, Configuration → Website → Site Domains, add 3rd currency, available for site domain
- go to front-end, refresh page with advanced theme, confirm that 3 currencies available in currency selector
- go to adm.console, Configuration → Website → Site Domains, remove recently added 3rd currency
- go to front-end, confirm, that after selection just disabled currency, page refreshes, and currency becomes unchanged
- go to adm.console, Configuration → Website → Site Domains, remove all currency limitations
- go to front-end, refresh page, confirm, that all active currencies are available in the currency selector, confirm, that currency change works
- go to adm.console, Configuration → Website → Site Domains, delete site domain
- go to front-end, refresh page, confirm, that all active currencies are available in the currency selector, confirm, that currency change works
- change contents of /themes/advanced/index.tpl file, add this to the "content" element:
<inp2:m_DefineElement name="currency_element"> <a href="<inp2:CurrencyLink/>"><inp2:Field name="ISO"/></a><br> </inp2:m_DefineElement> <inp2:curr_PrintList render_as="currency_element"/>
- go to front-end, refresh page, confirm, that in the page content appeared currency links. confirm, that currency links works for currency change, and after such currency change curr unit prefix doesn't appear in the URL
Diff Detail
Diff Detail
- Repository
- rINP In-Portal
- Branch
- /in-portal/branches/5.2.x
- Lint
Lint Errors Excuse: all code quality error fixing is not part of this task Severity Location Code Message Error modules/in-commerce/units/currencies/currencies_event_handler.php:295 PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace Error modules/in-commerce/units/currencies/currencies_event_handler.php:295 PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace Error modules/in-commerce/units/currencies/currencies_event_handler.php:296 PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace Error modules/in-commerce/units/currencies/currencies_event_handler.php:296 PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace Error modules/in-commerce/units/currencies/currencies_event_handler.php:297 PHPCS.E.CodingStandard.Commenting.InlineComment.InvalidEndChar CodingStandard.Commenting.InlineComment.InvalidEndChar Error modules/in-commerce/units/currencies/currencies_event_handler.php:297 PHPCS.E.CodingStandard.Commenting.InlineComment.NotCapital CodingStandard.Commenting.InlineComment.NotCapital - Unit
No Unit Test Coverage - Build Status
Buildable 1263 Build 1263: arc lint + arc unit
Event Timeline
Comment Actions
The test plan doesn't cover all add/existing code as requested in the task. For example (but there could be more scenarios), these cases aren't covered:
- changing the currency to a non-existing / inactive doesn't work
- currency change on a site domain without currency limitation works
- currency change without a site domain records works
- the curr unit prefix doesn't appear in the URL after a currency change in these cases:
- currency changed by submitting a form using POST request
- currency changed by visiting a URL, that was built using the <inp2:CurrencyLink/> tag