Magento
M70-101 · Question #23
Two modules, Foo and Moo, both rewrite the catalog/product model, but only the Moo module's rewrite is being used. Both modules Foo and Moo reside in the community code pool. Which two approaches allo
The correct answer is B. Copy Moo_Model_Product to the local code pool and merge the logic from Foo_Model_Product C. Copy Moo_Model_Product to the local code pool and make it extend Foo_Model_Product,. See the full explanation below for the reasoning.
Question
Two modules, Foo and Moo, both rewrite the catalog/product model, but only the Moo module's rewrite is being used. Both modules Foo and Moo reside in the community code pool. Which two approaches allow the functionality from both classes to be used? (Choose two)
Options
- ACopy Foo_Model_Product to the local code pool.
- BCopy Moo_Model_Product to the local code pool and merge the logic from Foo_Model_Product
- CCopy Moo_Model_Product to the local code pool and make it extend Foo_Model_Product,
- DCopy Moo_Model_Product to the local code pool.
- EChange the rewrite directive of the Moo module to rewrite foo/product instead of catalog/product.
How the community answered
(18 responses)- A6% (1)
- B83% (15)
- D11% (2)
Community Discussion
No community discussion yet for this question.