Jump to content

[Solved] BO Product Listing - Available for Order & Online Only FIELDs - to show in column listing


perusi

Recommended Posts

Hello,

 

How can i add in the BackOffice Product Listing two new columns with the "Available for Order" field and "Online Only" field?

 

 

Something like this was done in this thread: http://www.prestashop.com/forums/topic/275522-solved-add-backoffice-columns-products-list/

 

 

 

 

 

But how can it be done with Available for Order field and Online Only field?

 

Thanks

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

sorry i missed your replies, here is the solution:
 

in adminProductsController.php file extend object definition with these fields:

        $this->fields_list['online_only'] = array(
			'title' => $this->l('Online Only'),
			'width' => 90,
			'type' => 'bool',
			'align' => 'right',
            'active' => 'online_only',
			'filter_key' => $alias.'!online_only'
		);
        $this->fields_list['Available_for_order'] = array(
			'title' => $this->l('Available For order'),
			'width' => 90,
			'type' => 'bool',
			'align' => 'right',
            'active' => 'available_for_order',
			'filter_key' => $alias.'!available_for_order'
		);

effect:
becDzTt.png

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 6 months later...

sorry i missed your replies, here is the solution:

 

in adminProductsController.php file extend object definition with these fields:

        $this->fields_list['online_only'] = array(
			'title' => $this->l('Online Only'),
			'width' => 90,
			'type' => 'bool',
			'align' => 'right',
            'active' => 'online_only',
			'filter_key' => $alias.'!online_only'
		);
        $this->fields_list['Available_for_order'] = array(
			'title' => $this->l('Available For order'),
			'width' => 90,
			'type' => 'bool',
			'align' => 'right',
            'active' => 'available_for_order',
			'filter_key' => $alias.'!available_for_order'
		);

effect:

becDzTt.png

Hi Vekia

 

Please can you tell me how this works in v1.6.0.5 for 'Available for order' appears in product/search lists? Much appreciated.

 

Kaye

Link to comment
Share on other sites

Sorry to be a pain, but which file do I need to edit to repeat the same in my product search results?

 

Also, I just tried to filter by 'Available of order', and then to click the field to change the status, and each time I got this error and I am unable to see my product lists anymore:

 

  • Bad SQL query
    Column 'Available_for_order' in where clause is ambiguous

 

Is there another tweak I need to do?

 

Regards

Kaye

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

Hi there

 

I followed the instructions quoted as I also wanted to the 'Available for order' option to my product lists and searches, but which file do I need to edit to repeat the same in my product search results?

 

Also, I just tried to filter by 'Available of order', and then to click the field to change the status, and each time I got this error and I am unable to see any product lists anymore, other than searches:

 

  • Bad SQL query
    Column 'Available_for_order' in where clause is ambiguous

 

Is there another tweak I need to do?

 

Regards

Kaye

 

 

Hello,

 

How can i add in the BackOffice Product Listing two new columns with the "Available for Order" field and "Online Only" field?

 

 

Something like this was done in this thread: http://www.prestashop.com/forums/topic/275522-solved-add-backoffice-columns-products-list/

 

 

 

 

 

But how can it be done with Available for Order field and Online Only field?

 

Thanks

 

 

sorry i missed your replies, here is the solution:
 

in adminProductsController.php file extend object definition with these fields:

        $this->fields_list['online_only'] = array(
			'title' => $this->l('Online Only'),
			'width' => 90,
			'type' => 'bool',
			'align' => 'right',
            'active' => 'online_only',
			'filter_key' => $alias.'!online_only'
		);
        $this->fields_list['Available_for_order'] = array(
			'title' => $this->l('Available For order'),
			'width' => 90,
			'type' => 'bool',
			'align' => 'right',
            'active' => 'available_for_order',
			'filter_key' => $alias.'!available_for_order'
		);

effect:
becDzTt.png

 

Link to comment
Share on other sites

  • 2 years later...

 

Hi there

 

I followed the instructions quoted as I also wanted to the 'Available for order' option to my product lists and searches, but which file do I need to edit to repeat the same in my product search results?

 

Also, I just tried to filter by 'Available of order', and then to click the field to change the status, and each time I got this error and I am unable to see any product lists anymore, other than searches:

 

  • Bad SQL query

    Column 'Available_for_order' in where clause is ambiguous

 

Is there another tweak I need to do?

 

Regards

Kaye

 

 

Have you found any solution?

 

Bad SQL query

Column 'Available_for_order' in where clause is ambiguous.

 

It's work only for view. Change status (available for order) from product list not working only with this one.

 

Have any solution.

Link to comment
Share on other sites

sorry i missed your replies, here is the solution:

 

in adminProductsController.php file extend object definition with these fields:

        $this->fields_list['online_only'] = array(
			'title' => $this->l('Online Only'),
			'width' => 90,
			'type' => 'bool',
			'align' => 'right',
            'active' => 'online_only',
			'filter_key' => $alias.'!online_only'
		);
        $this->fields_list['Available_for_order'] = array(
			'title' => $this->l('Available For order'),
			'width' => 90,
			'type' => 'bool',
			'align' => 'right',
            'active' => 'available_for_order',
			'filter_key' => $alias.'!available_for_order'
		);

effect:

becDzTt.png

 

 

Hi vekia.

 

Thank you for your solution.

 

I try your solution for (Available for order) and all it's ok for view only, but filter_key and enable\disable from the list not working.

 

1. For filter_key problem is in SQL Query (WHERE 1 AND available_for_order = 0/1), but i can't find a solution.

 

2. How can solve enable\disable from list? Like as Status (green/red icons ).

 

Thank you for your suggestion and help.

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