Jump to content

How product status enabled/disabled works under the hood


Recommended Posts

I'm curious to know how prestashop implements status enabled/disabled in backoffice product list.

 

Someone can indicate where i can find code that handle visualization of that button and relative "on click" functionality?

post-321853-0-79875200-1404308224_thumb.png

Edited by longy (see edit history)
Link to comment
Share on other sites

Yes because I would like to do the same with some custom columns I added to product list in backoffice.
That columns contain boolean values that should be changed like status column.

So I need to know how to create something that looks and works in a similar way.

Edited by longy (see edit history)
Link to comment
Share on other sites

Yes because I would like to do the same with some custom columns I added to product list in backoffice.

That columns contain boolean values that should be changed like status column.

So I need to know how to create something that looks and works in a similar way.

 

so you aren't interested in css / design styles but in php / controller things

in your controller you can use:

 

		$this->fields_list['active'] = array(
			'title' => $this->l('Status'),
			'active' => 'status',
			'filter_key' => $alias.'!active',
			'align' => 'text-center',
			'type' => 'bool',
			'class' => 'fixed-width-sm',
			'orderby' => false
		);

(it's for status! you have to change variable names to own)

Link to comment
Share on other sites

Thanks for reply.

I'm already using similar code to add custom columns.

I could use class attribute to manage style and ajax call to some controller action.

I would like to see how prestashop manage these things to know what I've to override or where I should put my code.

Link to comment
Share on other sites

×
×
  • Create New...