0

I have created custom Entity Type in Magento 2 but not showing Entity Attributes list after selecting entity type.

enter image description here

Here is my code :-

<?php

namespace Test\Vendor\Model\Export;

/**
 * Class Constructs
 */
class Constructs extends \Magento\ImportExport\Model\Export\AbstractEntity
{
    /**
     * Permanent column names
     */
    const PATTERN_ID = 'pattern_id';
    const NAME = 'name';
    const SKU_PATTERN = 'sku_pattern';
    const SKU_LIST = 'sku_list';
    const STATUS = 'status';
    const STORE_ID = 'store_ids';

    /**
     * Permanent entity columns
     *
     * @var string[]
     */
    protected $_permanentAttributes = [
        self::PATTERN_ID,
        self::NAME,
        self::SKU_PATTERN,
        self::SKU_LIST,
        self::STATUS,
        self::STORE_ID,
    ];

    public function export()
    {
        // TODO: Implement export() method.
    }

    public function exportItem($item)
    {
        // TODO: Implement exportItem() method.
    }

    public function getEntityTypeCode()
    {
        return  'constructs';
    }

    protected function _getHeaderColumns()
    {
        return $this->_permanentAttributes;
    }

    protected function _getEntityCollection()
    {
        // TODO: Implement _getEntityCollection() method.
    }
}

Also i have click on continue button showing this error :- Please correct the data sent value.

6
  • bro I have debugged core code actually Magento call Magento\ImportExport\Controller\Adminhtml\Export\Export.php controller
    – Devidas
    Jun 30, 2021 at 11:31
  • and Magento store data into queue
    – Devidas
    Jun 30, 2021 at 11:32
  • Thanks. So its possible or not? Jun 30, 2021 at 13:40
  • it's possible but we need to check how to set correct data. I tried a different way but no luck bro.
    – Devidas
    Jul 1, 2021 at 6:34
  • Thanks bro i will check Jul 1, 2021 at 8:02

1 Answer 1

0

follow this link. I hope this help for you

https://github.com/Smile-SA/magento2-module-custom-entity-import-export

https://firebearstudio.com/blog/how-to-export-a-custom-entity-from-magento-2.html

12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.