[TYPO3-commerce] RFC: #6634: Refactor tx_commerce_products get_attribute_matrix() and get_product_attribute_matrix()
Christian Kuhn
lolli at schwarzbu.ch
Mon Mar 8 15:50:27 CET 2010
This is an SVN patch request.
Type: Refactoring
Branches: trunk
Forge issue ID: http://forge.typo3.org/issues/show/6634
Problem: get_attribute_matrix() and get_product_attribute_matrix() have
tons of duplicate code, are messy and slow.
Solution: Rewrite the methods from scratch.
Notes:
The patch set is splitted into 4 parts:
- 6634_03_pre.diff is a pre patch to the existing methods to fix some
minor issues and to make the result arrays a bit more predictable.
- 6634_03_main.diff is the main patch that introduces the new methods
getAttributeMatrix() and getAttributeMatrixQuery().
- 6634_03_test.diff is a test patch that uses the old methods in
parallel to the new methods and will output a debug if the result arrays
differ.
- 6634_03_action.diff will be a follow-up patch to put the new methods
into action and to deprecate the old ones.
The patches will be committed one at a time, so that each of it can be
reverted easily afterwards, if messed something up.
How to test:
Apply patches _pre, _main and _test (find them attached to the forge
issue), then test if the frontend produces debug output and compare the
result arrays if so.
Many thanks to Dimitry König for early reviews and fixes!
Looking forward to your reviews
Christian
More information about the TYPO3-project-commerce
mailing list