• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

how to insert configurable products programmatically

General Discussion
2
6
385
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    AnthonySica last edited by 29 Dec 2021, 16:52

    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

    1 Reply Last reply Reply Quote 0
    • devansh-webkul
      devansh-webkul last edited by 30 Dec 2021, 03:49

      You need super attributes for variants identification.

      1 Reply Last reply Reply Quote 0
      • A
        AnthonySica last edited by 30 Dec 2021, 15:22

        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

        1 Reply Last reply Reply Quote 0
        • devansh-webkul
          devansh-webkul last edited by 31 Dec 2021, 03:32

          super_attributes is for the attributes which differentiate the variants like color, size, etc.

          parent_id is for catching the parent model.

          1 Reply Last reply Reply Quote 0
          • 12 days later
          • A
            AnthonySica last edited by 12 Jan 2022, 03:31

            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.

            1 Reply Last reply Reply Quote 0
            • devansh-webkul
              devansh-webkul last edited by 12 Jan 2022, 05:47

              You can add one more key in the request i.e.,
              {"selected_configurable_option" : <default-id>}

              1 Reply Last reply Reply Quote 0
              4 out of 6
              • First post
                4/6
                Last post