backend_prod_list

Adds custom content to the “Catalog → Products” section in the Webasyst 2 interface.

Shop-Script

Input (passed by reference)

$params['products']: Currently displayed product list.
$params['products_total_count']: Number of all products matching the selected filters.
$params['current_page']: Current page number of the product list matching the selected filters and the per-page limit, starting with 1.
$params['pages_count']: Number of pages in the product list matching the selected filters and the per-page limit.
… your plugin code …

Output

{$backend_prod_list.header_left}
Custom content at the page top to the right of the “New product” button.
{$backend_prod_list.header_right}
Custom content at the page top to the left of the saved view selection link.
{$backend_prod_list.footer_left}
Custom content at the page bottom to the right of the page counter.
{$backend_prod_list.footer_right}
Custom content at the page bottom to the left of the product counter.
Shop-Script

Plugin code example

PHP

public function backendProdList($params)
{
    // $displayed_products = $params['products'];
    // $filtered_products_count = $params['products_total_count'];
    // $current_page = $params['current_page'];
    // $pages_count = $params['pages_count'];
    
    return [
        'header_left' => '<!-- link or button to the right of the "New product" button -->',
        'header_right' => '<!-- link or button to the left of the saved view selection link -->',
        'footer_left' => '<!-- custom content to the right of the page counter -->',
        'footer_right' => '<!-- custom content to the left of the product counter -->',
    ];
}