Bagisto Forum

    Bagisto

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

    Cannot add new field to the addresses

    Knowledge Base
    4
    5
    641
    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.
    • O
      otheriz last edited by otheriz

      Dear bagisto,

      i try to add two fields in the addresses which is 'province' and 'area',
      i already add new input fields in the view and add new those two column in the table 'addresses'

      i also already add the new field into the 'validate()' on this route.
      "Webkul\Customer\Http\Controllers\AddressController@update"

      when i want to save..everything is saved except this two new field..
      Am i missing some step ?

      Edit :
      I just realise there's this file..
      "packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php"

      do i need to add that two new field in here also?
      Please advice..

      1 Reply Last reply Reply Quote 0
      • V
        Vaishali Agarwal last edited by

        @otheriz
        you can add the more fields in addresses form as mention here https://forums.bagisto.com/topic/1646/lines-in-a-street-address

        1 Reply Last reply Reply Quote 0
        • O
          otheriz last edited by

          @Vaishali-Agarwal,

          It seems only add the field within the 'address' label..the user will be not knowing that they have to input 'province' and 'area' when there's no label..

          maybe if we can put the label/classes of the additional field, and the design has some margin like the other field(not stacked on the 'street address' field) would be better..

          i still looking for a way to add these two field..

          1. on table 'addresses' already added two column
          2. the POST data already shows/send the 'province' and 'area' data (not a null data)
          3. the update method seem like a normal method "$address->update($data)"
          4. i debug the $data variable just before the update method and the 'province' and 'area' value was there..somehow the ->update() method didn't insert it into the table field...

          I still wondering why..or there's another 'bagisto' configuration for these addresses?

          N 1 Reply Last reply Reply Quote 0
          • N
            napsterrahul @otheriz last edited by

            @otheriz u need to add those 2 fields in model as well .

            E 1 Reply Last reply Reply Quote 0
            • E
              Esti @napsterrahul last edited by

              @napsterrahul said in Cannot add new field to the addresses:

              model

              There's no model though regarding addresses, am I wrong? The version I'm using is 2.2.3

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