Skip to content

Magento 2 : custom product type like bundle product

I am making a module Petka/BundleOverride. I want to make a new product type from it. I already made something but, the problem that is doesn’t have “Add Options” under the Bundle Items tab. The element is probably shown only when it senese that, it is bundle product.

But I also want it.

How can I do it…

This is what I have:
etc/product_types.xml

<?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  name="petka_bundle"  label="Petka Bundle"  modelInstance="PetkaBundleOverrideModelProductTypeNewProductType"  composite="true"  isQty="true"  sortOrder="120" />
</config>

NewProductType.php

<?php

namespace PetkaBundleOverrideModelProductType;

use MagentoBundleModelProductType as BundleType;

class NewProductType extends BundleType {}