Can we rewrite multiple blocks of same core extension?
-
17-01-2021 - |
문제
Can we rewrite multiple blocks of a core extension like catalog
? like this :
<blocks>
<catalog>
<rewrite>
<class_name_here>YourNamespace_YourModule_Block_Your_New_Class_Here</class_name_here>
<2nd_class_name_here>YourNamespace_YourModule_Block_Your_2nd_Class_Here</2nd_class_name_here>
</rewrite>
</catalog>
</blocks>
해결책
Yes it is possible, assuming that you want to rewrite :
Catalog/Block/Navigation.php
andCatalog/Block/Product.php
In your config.xml
module :
<config>
<blocks>
<catalog>
<rewrite>
<navigation>Module_Name_Block_Navigation</navigation>
<product>Module_Name_Block_Product</product>
</rewrite>
</catalog>
</blocks>
</config>
제휴하지 않습니다 magento.stackexchange