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

Bagisto

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

Cannot add new field to the addresses

Knowledge Base
4
5
639
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 9 Aug 2020, 11:59 9 Aug 2020, 11:50

    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 10 Aug 2020, 14:57

      @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 11 Aug 2020, 02:34

        @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 7 Oct 2020, 06:56 Reply Quote 0
        • 2 months later
        • N
          napsterrahul @otheriz last edited by 7 Oct 2020, 06:56

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

          E 1 Reply Last reply 17 Feb 2025, 15:48 Reply Quote 0
          • 4 years later
          • E
            Esti @napsterrahul last edited by 17 Feb 2025, 15:48

            @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
            1 out of 5
            • First post
              1/5
              Last post