0

I'm working on Mix and Match Product, I have to create New Product type which extended from Bundle Product Like class Box extends \Magento\Bundle\Model\Product\Type everything is working perfectly fine but my Bundle Option (Product Selection ) is not saving, Like I add all the data from backend, after saving it, Bundle Option are not saving those here is my code

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd">
    <type label="Box Product" modelInstance="FME\MixAndMatch\Model\Product\Type\Box" name="box" composite='true' indexPriority="40" sortOrder="50" isQty="true">
        <priceModel instance="FME\MixAndMatch\Model\Product\Price"/>
        <allowedSelectionTypes>
            <type name="simple" />
            <type name="virtual" />
        </allowedSelectionTypes>
        <customAttributes>
            <attribute name="refundable" value="true"/>
        </customAttributes>
    </type>
</config>

lass Box extends \Magento\Bundle\Model\Product\Type

//\Magento\Bundle\Model\Product\Type {

const TYPE_ID = 'box';
public function save($product) {

    parent::save($product);
}
public function afterSave($product)
{

    parent::afterSave($product);

}
public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $product)
{
    // method intentionally empty
}
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.