PHP code example of justinholtweb / craft-econz

1. Go to this page and download the library: Download justinholtweb/craft-econz 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/ */

    

justinholtweb / craft-econz example snippets


use justinholtweb\econz\events\DraftPayloadEvent;
use justinholtweb\econz\services\Invoices;
use yii\base\Event;

Event::on(Invoices::class, Invoices::EVENT_MODIFY_DRAFT_PAYLOAD, function(DraftPayloadEvent $e) {
    $e->payload['references']['other'] = $e->order->reference;
});
twig
<form method="post">
    {{ csrfInput() }}
    {{ actionInput('econz/checkout/save-business') }}
    {{ craft.econz.businessFields(cart) }}
    <button>Save</button>
</form>