Page MenuHomeIn-Portal Phabricator

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

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

Details

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
rMINC Modules.In-Commerce
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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
This revision was landed with ongoing or failed builds.Oct 20 2024, 1:42 PM
This revision was automatically updated to reflect the committed changes.