configurationsSettings

Guten Tag,

ich habe mit PHP dieses Produkt angelegt.

$parentProductData = [
    "id" => $randomString,
    "name" => "TESTTITEL Stanley/Stella \"" . $aArticle['StyleName'] . "\"",
    "productNumber" => $aArticle['StyleCode'],
    "stock" => $aArticle['Variants'][0]['Stock'], 
    "description" => $description,
    "taxId" => bin2hex($aTax['id']),
    "manufacturerId" => "0e73a062642247e3a634518826e30865",

    "configuratorSettings" => [
        [
            "productId" => $randomString,
            "optionId" => "9a424f702a434b1abfc09740f7a0cbb1",
        ],
        [
            "productId" => $randomString,
            "optionId" => "4c86f2e5047d4715971628d1f5f8d186",
        ],
    ],
    "price" => [
        [
            "currencyId" => bin2hex($aCurrency['id']),
            "gross" => $aArticle['Variants'][0]["Price<10 EUR"]*1.19, // oder ein anderer Wert
            "net" => $aArticle['Variants'][0]["Price<10 EUR"],  // oder ein anderer Wert
            "linked" => false
        ]
    ],
    "visibilities" => [
        [
            "productId" => $randomString,
            "salesChannelId" => "d54a310b363f4f3eaf2822c24783e1d9", // Ersetzen Sie dies mit der tatsächlichen Sales Channel-ID
            "visibility" => 30, // 30 bedeutet sichtbar in diesem Verkaufskanal
        ],
    ],
    "categories" => [
        ["id" => $categories[$aArticle['Gender']][$aArticle['CategoryCode']]]
    ],
];

Leider kommt wenn ich

    "configuratorSettings" => [
        [
            "productId" => $randomString,
            "optionId" => "9a424f702a434b1abfc09740f7a0cbb1",
        ],
        [
            "productId" => $randomString,
            "optionId" => "4c86f2e5047d4715971628d1f5f8d186",
        ],
    ],

Einfüge dieser Fehler…

`
object
{1}
errors
[1]
0
{4}
code
:
"1452"
detail
:
"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`admin_shopware`.`product_configurator_setting`, CONSTRAINT `fk.product_configurator_setting.property_group_option_id` FOREIGN KEY (`property_group_option_id`) REFERENCES `property_group_optio)"
status
:
"500"
title
:
"Internal Server Error"
`