0

I'm trying to create a migration class for my product displays. I already have one for the product variations which is seperate because it has a different CSV source.

So I'm just trying to create the drupal nodes of the product displays. When I check the database in the node table, the nodes are there with the correct type. However when I go to the product page, I don't see the new items there.

I think it has something to do with this line:

$this->destination = new MigrateDestinationNode('video_storage_recorder');

or

$this->map = new MigrateSQLMap($this->machineName,
      array(
        'Name' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
          'description' => 'Recorder',
        ),
      ),
      //MigrateDestinationCommerceProduct::getKeySchema('commerce_product')
      //MigrateDestinationEntityAPI::getKeySchema('video_storage_recorder')
      MigrateDestinationNode::getKeySchema('video_storage_recorder')
    );

where video_storage_recorder is my content type.

Also I tried

$this->destination = new MigrateDestinationEntityAPI('video_storage_recorder');

But no different behaviour.

I think the nodes are created but not considered products for Drupal Commerce. But I don't know why. Also Migrate does not give any (error) messages and just says 9 items were created.

0

When I added a product variation in code the product appeared in the list. It's required to have at least one variation to be linked for the product display to be considerd a product display.

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.