How To Add One More Images Group To Product?

Hi evryone! I need to add some new images group to product. It's not default image, and not additional images for main product image. I need to add absolutely diferent images group. In practic it's floor plans for building. I found this: https://www.cs-cart.ru/docs/4.6.x/developer_guide/core/images_subsystem.html, but can't understand how to make it for product page. In my module I have this 2 files: update_detailed_images.post.tpl as template, and hook for controller - products.post.php.

In first file I put this:

{include file="common/attach_images.tpl" image_name="a_parser" image_object_type="a_parser" image_pair=$a_parser.main_pair image_object_id=$a_parser.product_id no_detailed=true hide_titles=true}

In second I can't to understood what I must to write, now it's:

$a_parser_images_links = fn_attach_image_pairs('a_parser', 'a_parser', 0, 'a_parser');
$a_parser_images_links['main_pair'] = fn_get_image_pairs($a_parser, 'a_parser', 'M', 'a_parser');
Tygh::$app['view']->assign('a_parser_images_links', $a_parser);

And in addon.xml I put this:

        DROP TABLE IF EXISTS ?:a_parser_images;
        DROP TABLE IF EXISTS ?:a_parser_images_links;
        
            CREATE TABLE IF NOT EXISTS `?:a_parser_images_links` (
            `pair_id` mediumint(8) unsigned NOT NULL,
            `object_id` int(11) unsigned NOT NULL DEFAULT '0',
            `object_type` varchar(24) NOT NULL DEFAULT '',
            `image_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
            `detailed_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
            `type` char(1) NOT NULL DEFAULT 'M',
            `position` int(11) NOT NULL DEFAULT '0'
            ) ENGINE=MyISAM AUTO_INCREMENT=2155 DEFAULT CHARSET=utf8;
        
        
            CREATE TABLE `?:a_parser_images` (
            `a_parser_image_id` mediumint(8) unsigned NOT NULL auto_increment,
            `a_parser_id` mediumint(8) unsigned NOT NULL default 0,
            `lang_code` char(2) NOT NULL default '',
            PRIMARY KEY  (`a_parser_image_id`),
            UNIQUE KEY  `a_parser` (`a_parser_id`,`lang_code`)
            ) Engine=MyISAM DEFAULT CHARSET UTF8;
        
        DROP TABLE IF EXISTS ?:a_parser_images;
        DROP TABLE IF EXISTS ?:a_parser_images_links;

GURU, plese help me!!! :confused: