Child pages
  • [in-commerce] Optimize "ord:UsingCreditCard" tag [5.2.1]
Skip to end of metadata
Go to start of metadata

The <inp2:ord:UsingCreditCard/> tag allows to determine if payment type selected in the order requires credit card information to be entered. Internally tag is doing 2 to 3 database queries regardless of how much times method is called. When used in grids this created N+1 problem.


  1. in method create static variable holding all payment types, that require cc entry
  2. in same way cache primary payment type ID (only when needed)
  3. use cached info to determine result

Related Tasks

MINC-127 - Getting issue details... STATUS