Jump to content

add address state on address list


Ehsanai

Recommended Posts

Hi,

How to I can add address state on address list BO?

I can show the id_state but I don't know how to add state name.

 

 

<?php
class AdminAddressesController extends AdminAddressesControllerCore{
  public function __construct() {
    parent::__construct();
    $this->fields_list['id_state'] = array('title' => $this->l('id_state'), 'filter_key' => 'a!id_state');

  }
}

 

 

Link to comment
Share on other sites

Its advised to use the Core Developer forum for code related issues (Instead of General Topics)
https://www.prestashop.com/forums/forum/116-core-developers/

If you have able to add the id_state then what's the problem in adding the state name? Are you aware how this fields_list work? Have you checked the DB table for the same?

$this->fields_list['name'] = array('title' => $this->l('state_name'), 'filter_key' => 'a!name'); 

Where name OR id_state are DB columns. 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...