2

I'm creating a product attribute with input type 'swatch_text'.

But I'm able to save option value but swatch text value is not saving.

Can anyone help me in saving the marked field in screenshot programatically?

I am using below code :

    $option = [
        'values' => [ 'X','Y','Z'
        ],
        'attribute_id' => $attributeId,
    ];       
    $eavSetup->addAttributeOption($option);

enter image description here

Your Answer

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

Browse other questions tagged or ask your own question.