PHP code example of brandung / factfinder-magento2
1. Go to this page and download the library: Download brandung/factfinder-magento2 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
public function afterToArray($subject, $result)
{
return ['CUSTOM_NAME' => $result['Master']] + $result;
}
class BrandLogo implements \Omikron\Factfinder\Api\Export\Catalog\ProductFieldInterface
{
public function getValue(Product $product): string
{
// Getting products brand logo URL...
}
}