41 minutes ago, Daresh said:There are methods to use, look for offsetSet method of the presented product.
Can you be a little more specific?
For instance, I'm looking to set 'show_price' to false for some specific products under certain conditions.
But
$params['presentedProduct']->offsetSet('show_price' false);
or
$params['presentedProduct']['show_price'] = false;
will both raise an exception, since 'show_price' is 'blocked' by a getter on the ProductLazyArray.
PrestaShop\PrestaShop\Core\Exception\CoreException: Trying to set the index show_price of the LazyArray PrestaShop\PrestaShop\Adapter\Presenter\Product\ProductLazyArray already defined by a method is not allowed
.png.022b5452a8f28f552bc9430097a16da2.png)