Page MenuHomeIn-Portal Phabricator

MINC-202 - Fix currency selection in Site Domain scenario
AcceptedPublic

Authored by erik on Jul 4 2024, 11:16 AM.

Details

Reviewers
alex
Summary

fixed currency selection in site domain scenario

Test Plan
  1. go to adm.console, ConfigurationE-commerceCurrencies
  2. make sure 3+ currencies are Active
  3. go to adm.console, ConfigurationWebsiteSite Domains
  4. add actual domain with 2 currencies
  5. go to front-end with advanced theme
  6. confirm, that currency selector contains only currencies, allowed for site domain
  7. 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
  8. go to adm.console, ConfigurationWebsiteSite Domains, add 3rd currency, available for site domain
  9. go to front-end, refresh page with advanced theme, confirm that 3 currencies available in currency selector
  10. go to adm.console, ConfigurationWebsiteSite Domains, remove recently added 3rd currency
  11. go to front-end, confirm, that after selection just disabled currency, page refreshes, and currency becomes unchanged
  12. go to adm.console, ConfigurationWebsiteSite Domains, remove all currency limitations
  13. go to front-end, refresh page, confirm, that all active currencies are available in the currency selector, confirm, that currency change works
  14. go to adm.console, ConfigurationWebsiteSite Domains, delete site domain
  15. go to front-end, refresh page, confirm, that all active currencies are available in the currency selector, confirm, that currency change works
  16. 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"/>
  1. 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

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint ErrorsExcuse: all code quality error fixing is not part of this task
SeverityLocationCodeMessage
Errormodules/in-commerce/units/currencies/currencies_event_handler.php:295PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBraceCodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace
Errormodules/in-commerce/units/currencies/currencies_event_handler.php:295PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBraceCodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace
Errormodules/in-commerce/units/currencies/currencies_event_handler.php:296PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBraceCodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace
Errormodules/in-commerce/units/currencies/currencies_event_handler.php:296PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBraceCodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace
Errormodules/in-commerce/units/currencies/currencies_event_handler.php:297PHPCS.E.CodingStandard.Commenting.InlineComment.InvalidEndCharCodingStandard.Commenting.InlineComment.InvalidEndChar
Errormodules/in-commerce/units/currencies/currencies_event_handler.php:297PHPCS.E.CodingStandard.Commenting.InlineComment.NotCapitalCodingStandard.Commenting.InlineComment.NotCapital
Unit
No Unit Test Coverage
Build Status
Buildable 1263
Build 1263: arc lint + arc unit

Event Timeline

erik created this revision.Jul 4 2024, 11:16 AM
erik requested review of this revision.Jul 4 2024, 11:16 AM
alex requested changes to this revision.Jul 5 2024, 2:28 AM

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
This revision now requires changes to proceed.Jul 5 2024, 2:28 AM
erik edited the test plan for this revision. (Show Details)Jul 5 2024, 6:12 AM
erik edited the test plan for this revision. (Show Details)
erik requested review of this revision.Jul 5 2024, 6:14 AM
alex accepted this revision.Jul 8 2024, 4:56 AM
This revision is now accepted and ready to land.Jul 8 2024, 4:56 AM