We are building a module which allows you to group several products into a set for a specified price. Seeing as this is not too different from the grouped product, we extended it so we wouldn t have to rewrite too much.
The problem is that the model which is supposed to handle the logic (extended from Mage_Catalog_Model_Product_Type_Grouped) is not used, but the core model is.
My config.xml configuration:
<models>
<promoset>
<rewrite>
<product_type>Phpro_PromoSet_Model_Product_Type_Promoset</product_type>
</rewrite>
</promoset>
</models>
<catalog>
<product>
<type>
<promoset translate="label" module="promoset">
<label>Promoset bundle</label>
<model>promoset/product_type_promoset</model>
<price_model>promoset/product_price</price_model
<index_data_retreiver>promoset/catalogindex_data_promoset</index_data_retreiver>
<allow_product_types>
<simple/>
<virtual/>
</allow_product_types>
<composite>1</composite>
</promoset>
</type>
</product>
</catalog>
我也尝试过一些条款,这些文章提供了这种意见。
<config>
<global>
<models>
<newproducttype>
<class>SeventhSense_NewProductType_Model</class>
</newproducttype>
</models>
<helpers>
<newproducttype>
<class>Mage_Catalog_Helper</class>
</newproducttype>
</helpers>
<catalog>
<product>
<type>
<newproducttype translate="label" module="newproducttype">
<label>New Product Type</label>
<model>newproducttype/product_type_newproducttype</model>
<composite>0</composite>
<index_priority>15</index_priority>
</newproducttype>
</type>
</product>
</catalog>
</global>
</config>
But also have thesame result.
I have checked and double checked that my model is in the right place. promoset/product/type/promoset.php for my own example, and newproducttype/product/type/newproducttype.php for the other.
谁能指出我的错误? I m 跑到Magento 1.6
UPDATE: On Magento 1.4 such work as a charm. Magento 1.5, 而后一情况并非如此。 我对此进行调查。 如果有人会知道这一点,那是怎么说的。