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>
I have also tried some articles, which provide this config.xml:
<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.
Anyone who can point out my mistake? I'm running on Magento 1.6
UPDATE: On Magento 1.4 this works like a charm. On Magento 1.5 and up it does not. I'm investigating this. If anyone would know why this might be, do tell.
<rewrite />
on thepromoset
model group? Should be creating it, not rewriting it. What do you get when you run<?php echo get_class(Mage::getModel('promoset/product_type_promoset')); ?>
? – Nickcatalog/product_type_grouped
to be rewritten, notpromoset/product_type
. – clockworkgeek