Source of file _config.php

Size: 1,576 Bytes - Last Modified: 2021-12-23T10:21:29+00:00

/var/www/docs.ssmods.com/process/src/_config.php

1234567891011121314151617181920212223242526
<?php

use SilverCart\Admin\Dev\ExampleData;
use SilverCart\Model\ShopEmail;
use SilverCart\Prepayment\Model\Prepayment;

/***********************************************************************************************
 ***********************************************************************************************
 **                                                                                           ** 
 ** Registers the email template to send bank account information to the customer after an    ** 
 ** order was placed using prepayment.                                                        ** 
 **                                                                                           ** 
 ** Registers a callback function to use for the email example data to show a preview in      ** 
 ** backend.                                                                                  ** 
 **                                                                                           ** 
 ***********************************************************************************************
 **********************************************************************************************/
ShopEmail::register_email_template('PaymentPrepaymentBankAccountInfo');
ExampleData::register_email_example_data('PaymentPrepaymentBankAccountInfo', function() {
    $order   = ExampleData::get_order();
    $payment = Prepayment::get()->filter('PaymentChannel', 'prepayment')->first();
    $order->PaymentMethodID = $payment->ID;
    return [
        'Order' => $order,
    ];
});