I’m wanting to have ‘All’ in the ‘Show’ drop down menu within the opencart website when viewing products in categories. I’ve been told it would take a lot of coding to do it in the correct manner so I’ve just tweaked the code as follows:
$this->data['limits'][] = array(
'text' => "All",
'value' => 5000,
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . $url . '&limit=5000')
);
This seems to give an error in my error log as follows:
2013-02-07 11:22:12 - PHP Notice: Use of undefined constant All - assumed 'All' in /home/a6997914/public_html/catalog/controller/product/search.php on line 373
Do I need to define this ‘All’ or is my syntax incorrect? This method works as required as far as i know but delivering this error none the less.
the lines you shown are of product/category.php not seacrh.php
open your catalog/controller/product/search.php i am sure you are using ALL there and not putting it in quotes like “ALL”. use “ALL” and error should go away