How to add approval status and activation in combined data import

mk00559179
mk00559179 Posts: 6 🧑🏻‍🚀 - Cadet

I am trying to import product with combined file and I've add prodcut_abstract.approval_status to approved column in csv file but it is not taking any effect on product.

So how can we add approval and activation column in combined csv file

Tagged:

Answers

  • profuel
    profuel Sprykee Posts: 55 🪐 - Explorer

    Hi!

    We're quite strict on the fields that are allowed to be important in order to keep control of the updates applied to the DB.

    To include approval status, please add corresponding assignment into this function, overridden in the class CombinedProductAbstractHydratorStep: \Pyz\Zed\DataImport\Business\Model\ProductAbstract\ProductAbstractHydratorStep::importProductAbstract

        protected function importProductAbstract(DataSetInterface $dataSet): void
        {
            parent::importProductAbstract($dataSet);
    
            $dataSet[static::DATA_PRODUCT_ABSTRACT_TRANSFER]->setApprovalStatus($dataSet['product_abstract.approval_status']);
        }
    

    p.s. you also have to chabge the column name to `product_abstract.approval_status`

  • mk00559179
    mk00559179 Posts: 6 🧑🏻‍🚀 - Cadet

    @profuel , thanks for the quick response, will check