Returned array index uses record id instead of row count
Question
I have the same script running on the same version of Opencart.
Normally this line returns an array of all products:
$data = $this->model_catalog_product->getProducts();
and is indexed from zero to n
Here is the product.php containing getProucts() function.
In this case (different server) it returns an array with a single value - only the last record. Strangely, there are total of 131 records in the table, the id of last record is 191, the returned array is:
Array
(
[191] => Array
(
[product_id] => 191
[model] => Product 15
[sku] =>
[upc] =>
...
)
)
Anybody knows what's going on?
La solution
So the project uses CodeIgniter framework and it's caching library (see the line 418 for example).
There is a probability that results are taken from the cache instead of a database directly, disable cache from the configuration temporary. If the results satisfy you then you should clean a cache depending on what driver cache uses.