Page 1 of 1

how to add select all

Posted: Mon Jun 04, 2012 2:40 am
by dirtboy
i have a multistore setup with 41 stores. i have added a select all / unselect all links in the category page under stores on the data tab, like there is on the product links tab for categories. i have added this same links under stores for products and it works fine. the links in the category page doesn't work. i get this error

Code: Select all

Notice: Undefined variable: text_select_all in /home/shop/public_html/store/vqmod/vqcache/vq2-admin_view_template_catalog_category_form.tpl on line 186 / Notice: Undefined variable: text_unselect_all in /home/shop/public_html/store/vqmod/vqcache/vq2-admin_view_template_catalog_category_form.tpl on line 186
any idea how to fix this?

Re: how to add select all

Posted: Sun Jun 10, 2012 11:47 pm
by Avvici
Hey Dirt, hope all is well.
Seems you have been around the forums a while. My suggestion would be to start looking at Open Cart for what it is, an MVC(L). If you see an undefined variable then you simply trace where it's coming from. In this case admin_view_template_catalog_category_form.tpl on line 186. Open up the controller file that correlates with the variable in question "text_unselect_all". You will find that it probably is not there in the control or if it is it's misspelled. If it said "undefined index" then it probably WOULD exist but just be empty. These types of errors normally can be fixed by adding an isset(), or some other type of similar validation.

Re: how to add select all

Posted: Mon Jun 11, 2012 1:03 am
by dirtboy
Thank you for the reply Avvici, i was able to solve this error by adding these lines of code

Code: Select all

$this->data['text_select_all'] = $this->language->get('text_select_all');
$this->data['text_unselect_all'] = $this->language->get('text_unselect_all');
under the get form function.

Re: how to add select all

Posted: Mon Jun 11, 2012 4:52 am
by Avvici
bueno bueno