backend_product_sku_settings

Adds custom content to SKU-editing area in product properties in backend.

Shop-Script

Input (passed by reference)

$params array Parameters.
$params['product'] array Product data.
$params['sku'] array SKU data.
$params['sku_id'] array SKU ID.
… your plugin code …

Output

{$backend_product_sku_settings.%plugin_id%}

Extra HTML code to be displayed within the SKU-editing area.

Shop-Script

Plugin code example

PHP

public function backendProductSkuSettings($params)
{
    return waHtmlControl::getControl(waHtmlControl::INPUT, 'myplugin_field', array(
        'value'               => isset($params['sku']['myplugin_field']) ? isset($params['sku']['myplugin_field']) : null,
        'title'               => _wp('My custom field'),
        'description'         => _wp('Useful hint for users.'),
        'title_wrapper'       => '%s',
        'control_wrapper'     => '<div class="field"><div class="name">%s</div><div class="value">%s%s</div></div>',
        'description_wrapper' => '<br><span class="hint">%s</span>',
    ));
}