Jump to content

Change Value of a field in a Helper List


kelkel

Recommended Posts

Hello everyone,

 

I have to add a field to the product list in the backoffice. It work great with this code 

class AdminProductsController extends AdminProductsControllerCore {
	public function __construct() {
		parent::__construct();	
		
		if (Shop::isFeatureActive()) {
            $alias = 'sa';
        } else {
            $alias = 'a';
        }
		
		$this->fields_list['visibility'] = array(
            'title' => $this->l('Visibility'),
            'width' => 100,
            'align' => 'center',
            'type' => 'select',
            'list' => array('none' => $this->l('none'),'both' => $this->l('both'), 'catalog' => $this->l('catalog'),  'search' => $this->l('search')),
            'filter_key' => $alias.'!visibility',
        );		
	}
}

But now, i want to change the value of the field "visibility" by clicking on it (toggle between none & both). Maybe in Ajax ? but i don't know how to use the URL system to make mine...

 

Any suggestion ? 

 

Thanks !

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...