how to insert configurable products programmatically
-
Re: How to insert configurable product programmatically?
Greetings - I did some research on inserting configurable products and variants and could not find a distinct list of data required for parents and the variant....
a, Do we need to have add super_attributes for the configurable product identifying attribute for variant?
b. is the configurable product inactive?any thoughts?
Thank you
Tony
-
You need super attributes for variants identification.
-
So the variants are connected via the parent_id field?
Is there a function already available for the super_attributes or a new one is required?Also, when the configurable record is created, do we need to assign a min and max price?
Thank you
Tony
-
super_attributes
is for the attributes which differentiate the variants like color, size, etc.parent_id
is for catching the parent model. -
Hi - I was able to navigate through setting up configurable and variants from api results...
wondering if there is a way to insert the default variant id into the "additional" field in the products tables.. seems that the field is setup a bit differently.... it is format like: '{"default_variant_id":"1357"}'.
thank you for all your help.
-
You can add one more key in the request i.e.,
{"selected_configurable_option" : <default-id>}