|
I already made a module, which gives me new product type. this product type behaves like a grouped product, except that no fieldset to choice products for that grouped product. I just cant add simple products to a grouped product.
There is a sources of my module.
app/etc/modules/Homerefit_Gallery.xml:
<?xml version="1.0"?> <config> <modules> <Homerefit_Galleryproduct> <active>true</active> <codePool>local</codePool> </Homerefit_Galleryproduct> </modules> </config>
app/code/local/homerefit/Galleryproduct/etc/config.xml:
<?xml version="1.0"?> <config> <modules> <Homerefit_Galleryproduct> <version>0.1.0</version> </Homerefit_Galleryproduct> </modules> <global> <models> <galleryproduct> <class>Homerefit_Galleryproduct_Model</class> </galleryproduct> </models> <helpers> <galleryproduct> <class>Homerefit_Galleryproduct_Helper</class> </galleryproduct> </helpers> <catalog> <product> <type> <gallery translate="label" module="galleryproduct"> <label>Gallery Product</label> <model>galleryproduct/product_type_gallery</model> <composite>1</composite> <allow_product_types> <simple/> <virtual/> </allow_product_types> <index_priority>51</index_priority> </gallery> </type> </product> </catalog> </global> <adminhtml> <translate> <modules> <Homerefit_Galleryproduct> <files> <default>Homerefit_Galleryproduct.csv</default> </files> </Homerefit_Galleryproduct> </modules> </translate> <layout> <updates> <galleryproduct> <file>galleryproduct.xml</file> </galleryproduct> </updates> </layout> </adminhtml> </config>
app/code/local/homerefit/Galleryproduct/Helper/Data.php:
<?php class Homerefit_Galleryproduct_Helper_Data extends Mage_Core_Helper_Abstract {
}
app/code/local/homerefit/Galleryproduct/Model/Product/Type/Gallery.php:
<?php class Homerefit_Galleryproduct_Model_Product_Type_Gallery extends Mage_Catalog_Model_Product_Type_Grouped { const TYPE_CODE = 'gallery'; }
|