backend_welcome

Allows adding custom content to the initial store setup page in the new interface (2.0).

Shop-Script

Input (passed by reference)

$params['countries'] array List of countries available for selection. Each list item is an array with the following keys:
$params['countries'][country_iso_code] array Country properties as an array with the following keys:
$params['countries'][country_iso_code]['name'] string Name.
$params['countries'][country_iso_code]['iso3letter'] string 3-letter code.
$params['countries'][country_iso_code]['iso2letter'] string 2-letter code.
$params['countries'][country_iso_code]['isonumeric'] int Numeric code.
$params['countries'][country_iso_code]['fav_sort'] int|null Sort value for the favorite countries list.
$params['country_iso'] string ISO code of the country selected by default.
$params['locale_currency'] string ISO code of the currency selected by default.
$params['currencies'] array List of currencies available for selection. Each list item is an array with the following keys:
$params['currencies'][]['code'] string Currency ISO code.
$params['currencies'][]['title'] string Currency name.
… your plugin code …

Output

{$backend_welcome.form_top}
Custom HTML code under the top part of the setup form.
{$backend_welcome.form_bottom}
Custom HTML code under the bottom part of the setup form.
Shop-Script

Plugin code example

PHP

public function backendWelcome(&$params)
{
    // Adding a desired country to the list
    $params['countries']['deu'] = [
        'name' => 'Germany',
        'iso3letter' => 'deu',
        'iso2letter' => 'de',
        'isonumeric' => '276',
        'fav_sort' => NULL,
    ];

    // Making it selected by default
    $params['country_iso'] = 'deu';

    // Making the appropriate currency selected by default
    $params['locale_currency'] = 'EUR';

    return [
        'form_top' => '<!-- custom HTML below the top form part -->',
        'form_bottom' => '<!-- custom HTML below the bottom form part -->',
    ];
}