PHP code example of dashed / dashed-ecommerce-rendabiliteit

1. Go to this page and download the library: Download dashed/dashed-ecommerce-rendabiliteit 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/ */

    

dashed / dashed-ecommerce-rendabiliteit example snippets


use Dashed\DashedEcommerceRendabiliteit\DashedEcommerceRendabiliteitPlugin;

$panel->plugin(new DashedEcommerceRendabiliteitPlugin());

rendabiliteit()->kostprijsBron(KostprijsBron $bron);                          // waar de kostprijs vandaan komt
rendabiliteit()->sluitGroepenUit(Closure(): array<int>);                       // groep-id's die niet meetellen in kostprijs en marge
rendabiliteit()->kostprijsLink(Closure(int $groepId, string $sleutel): ?array); // ['url', 'label'], optioneel 'reden' en 'maat'
rendabiliteit()->maatsleutel(Closure(Product): string);                        // maatsleutel per product
rendabiliteit()->maatsleutels(Closure(iterable): array<int, string>);          // idem in batch (sneller)
rendabiliteit()->extraSignalen(Closure(Collection): list<array>);              // bv. ['soort' => 'verwacht_duurder', 'product_id' => 12]