|
Hi,
I’m trying to add a new product type, which will act like a group of configurable products… I am first trying to add the product type to the lists of the admin, but nothing seems to appear… Here is what i have done :
1: Edit /app/code/core/Mage/Catalog/Model/Product/Type.php to add a constant TYPE_SILHOUETTE
2: Edit /app/code/core/Mage/Catalog/Product/Type/Silhouette.php (this far, it is just a copy of Configurable.php)
3: Add this to the global/catalog/product/type (in /app/code/core/Mage/Catalog/etc/config.xml
<silhouette translate="label" module="silhouette"> <label>Silouhette</label> <model>catalog/product_type_silhouette</model> </silhouette>
OK, this makes appear the “Silhouette” option in the option list.
Now, i tried to make this as a local module.
I created the (1) and (2) and make them inherit from the original file. The config.xml files contains :
<?xml version="1.0"?> <config> <modules> <MyCompany_Silhouette> <version>1.0.0</version> </MyCompany_Silhouette> </modules> <global> <catalog> <product> <type> <silhouette translate="label" module="silhouette"> <label>Silouhette</label> <model>catalog/product_type_silhouette</model> </silhouette> </type> </product> </catalog> <models> <catalog> <rewrite> <product_type>MyCompany_Silhouette_Model_Product_Type</product_type> <product_type_silhouette>MyCompany_Silhouette_Model_Product_Type_Silhouette</product_type_silhouette> </rewrite> </catalog> <models> </global> </config>
Here, the option group is not containing the “SILHOUETTE” option, and my models don’t seem to be executed… Does somebody have an idea on that ?
Regards,
A.
|