Page MenuHomeIn-Portal Phabricator

MINC-127 Optimize "ord_UsingCreditCard" tag
ClosedPublic

Authored by glebs on Jun 10 2015, 10:08 AM.

Details

Test Plan
  1. Create several orders with different payment types: with CC and without
  2. Update element grid_billinglink_td and add some usage of tag UsingCreditCard
  3. Check any orders list for SQL queries - it should have only one select from payment types table

Diff Detail

Repository
rINP In-Portal
Branch
/w/in-portal.full/branches/5.2.x
Lint
Lint OK
Unit
No Unit Test Coverage

Event Timeline

glebs updated this revision to Diff 213.Jun 10 2015, 10:08 AM
glebs retitled this revision from to MINC-127 Optimize "ord:UsingCreditCard" tag.
glebs updated this object.
glebs edited the test plan for this revision. (Show Details)
glebs added 1 JIRA issue(s): MINC-127.
alex requested changes to this revision.Jun 10 2015, 10:17 AM
alex edited edge metadata.
alex added inline comments.
modules/in-commerce/units/orders/orders_tag_processor.php
521–524

It should be boolean, not bool.

530–531

This should be done only when needed, not all the time.

530–534

Please rename to $payment_type.

534

The INNER JOIN is equivalent to just JOIN.

This revision now requires changes to proceed.Jun 10 2015, 10:17 AM
glebs updated this revision to Diff 214.Jun 10 2015, 10:21 AM
glebs edited edge metadata.

Requested changes

alex requested changes to this revision.Jun 10 2015, 10:37 AM
alex edited edge metadata.
alex added inline comments.
modules/in-commerce/units/orders/orders_tag_processor.php
544–547

We can actually extract this to separate getPrimaryPaymentType that will have $primary_payment_type variable in it.

This revision now requires changes to proceed.Jun 10 2015, 10:37 AM
glebs updated this revision to Diff 215.Jun 10 2015, 10:55 AM
glebs edited edge metadata.

new getPrimaryPaymentType method

alex accepted this revision.Jun 10 2015, 11:39 AM
alex edited edge metadata.
This revision is now accepted and ready to land.Jun 10 2015, 11:39 AM
This revision was automatically updated to reflect the committed changes.
alex edited edge metadata.Mar 10 2016, 6:11 AM
alex added a project: Restricted Project.
alex retitled this revision from MINC-127 Optimize "ord:UsingCreditCard" tag to MINC-127 Optimize "ord_UsingCreditCard" tag.Jul 16 2016, 6:33 AM