Perfect. Thanks for your help.
Where I should replace this ?
I just want to have random product
I tried
if($category->getProducts((int)Context::getContext()->language->id, 1) != '') {
$cat['name'] = $category->name[(int)Context::getContext()->language->id];
$cat['products'] = $this->prepareBlocksProducts($category->getProducts((int)Context::getContext()->language->id, 1, 10, 'date_add', 'RAND'));
array_push($categories,$cat);
but nothing change
.png.022b5452a8f28f552bc9430097a16da2.png)