$nextProduct =
isset($products[$index + 1
]) ?
$products[$index + 1
] : null;
$navigation =
[];
if ($previousProduct &&
$previousListProduct =
$this->listProductService->
get($previousProduct->
getNumber(),
$context)) { $navigation['previousProduct'
]['orderNumber'
] =
$previousListProduct->
getNumber();
$navigation['previousProduct'
]['link'
] =
$this->config->
get('sBASEFILE'
) . '?sViewport=detail&sDetails=' .
$previousListProduct->
getId() . '&sCategory=' .
$categoryId;
$navigation['previousProduct'
]['name'
] =
$previousListProduct->
getName();
$previousCover =
$previousListProduct->
getCover();
if ($previousCover) { $navigation['previousProduct'
]['image'
] =
$this->legacyStructConverter->
convertMediaStruct( $previousCover );
} } if ($nextProduct &&
$nextListProduct =
$this->listProductService->
get($nextProduct->
getNumber(),
$context)) { $navigation['nextProduct'
]['orderNumber'
] =
$nextListProduct->
getNumber();
$navigation['nextProduct'
]['link'
] =
$this->config->
get('sBASEFILE'
) . '?sViewport=detail&sDetails=' .
$nextListProduct->
getId() . '&sCategory=' .
$categoryId;
$navigation['nextProduct'
]['name'
] =
$nextListProduct->
getName();
$nextCover =
$nextListProduct->
getCover();