PHP code example of omikron / shopware5-factfinder

1. Go to this page and download the library: Download omikron/shopware5-factfinder 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/ */

    

omikron / shopware5-factfinder example snippets


interface FieldInterface
{
    public function getName(): string;

    public function getValue(Detail $detail): string;
}

class CustomColumn implements FieldInterface
{
     public function getName(): string
     {
        return 'MyColumnName'; // Will be used as column header in the CSV feed
     }

    public function getValue(Detail $detail): string
    {
        // Implement logic to fetch and transform data for a given article detail  
    }
}