Bagisto Forum

    Bagisto

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

    Getting Call to a member function toArray() on null error on saving address API

    General Discussion
    4
    8
    1750
    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
      ali_infotech last edited by

      e8e1c264-52aa-4ca9-9409-39c7b0f0fc8f-image.png
      I am trying to save address after adding product to my cart but getting this error.
      Anyone have idea about this issue how I can fix it.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @ali_infotech,

        Please share with me the full request body and headers. So that I can check.

        1 Reply Last reply Reply Quote 0
        • A
          ali_infotech last edited by ali_infotech

          Thanks for your response. Its fixed now, I was passing address id without saving any address

          1 Reply Last reply Reply Quote 0
          • F
            Farhatkausar last edited by

            I have same issue and I am also passing address id same in both shipping and billing..

            1 Reply Last reply Reply Quote 0
            • devansh-webkul
              devansh-webkul last edited by

              This is because JSON is not sent properly. Please check your JSON request.

              1 Reply Last reply Reply Quote 0
              • F
                Farhatkausar last edited by

                Thanks for your response .. It is working now

                1 Reply Last reply Reply Quote 0
                • A
                  abdalhadi last edited by

                  i have the same error how did u fix it?
                  here is my json body :
                  {
                  "billing": {
                  "address1": {
                  "0": ""
                  },
                  "use_for_shipping": "false",
                  "first_name": "john",
                  "last_name": "doe",
                  "email": "john@gmail.com",
                  "address_id": 1
                  },
                  "shipping": {
                  "address1": {
                  "0": ""
                  },
                  "first_name": "john",
                  "last_name": "doe",
                  "email": "john@gmail.com",
                  "address_id": 2
                  }
                  }

                  1 Reply Last reply Reply Quote 0
                  • A
                    abdalhadi last edited by

                    same error

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post