English 中文(简体)
扩大Magento产品类型
原标题:Extending product type in Magento

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, 而后一情况并非如此。 我对此进行调查。 如果有人会知道这一点,那是怎么说的。

问题回答

我知道你提到“组合产品”,但捆绑式产品类型使你能够建造一个“kit”物品,你可以具体指明dle子的价格。 为什么你使用dle类产品?

对于捆绑产品,你可以以客户从现有物品清单中选择的方式加以配置,或者将其锁定在你界定的某些物品中。

<>上>

添加以下评论意见的视频链接(Backend Configuration,Frontend)





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签