<?xml version="1.0"?>
<!--
/**
 * @license http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @author Hervé Guétin <herve.guetin@gmail.com> <@herveguetin>
 * @copyright Copyright (c) 2018 Kaliop Digital Commerce (http://digitalcommerce.kaliop.com)
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <soon_merchandizer>
            <!--
                Decorators are all operations that rework the canvas generated from products
            -->
            <grid_decorators>
                <admin>
                    <promoted>
                        <!--
                            Append products that have been set as "go to top".
                            Each product gets a canvas slot at the very top.
                        -->
                        <class>\Soon\Merchandizer\Model\Grid\Decorator\Admin\Promoted</class>
                        <sort_order>10</sort_order>
                    </promoted>
                    <saving>
                        <!--
                            Append products that are in the Merchandizer that has just been created/updated/posted.
                            Slots those products have in the canvas are calculated based on the page they belong to.
                        -->
                        <class>\Soon\Merchandizer\Model\Grid\Decorator\Admin\Saving</class>
                        <sort_order>20</sort_order>
                    </saving>
                    <saved>
                        <!--
                            Append products that are already saved in DB.
                            Empty slots are filled with products from DB that are not "slotted" yet
                        -->
                        <class>\Soon\Merchandizer\Model\Grid\Decorator\Admin\Saved</class>
                        <sort_order>30</sort_order>
                    </saved>
                    <added>
                        <!--
                            Append new products from category save.
                            There may be some products that are added thru the "Category Products" tab. Those need to be added at the end of the canvas.
                        -->
                        <class>\Soon\Merchandizer\Model\Grid\Decorator\Admin\Added</class>
                        <sort_order>40</sort_order>
                    </added>
                    <removed>
                        <!--
                            Remove products
                        -->
                        <class>\Soon\Merchandizer\Model\Grid\Decorator\Admin\Removed</class>
                        <sort_order>50</sort_order>
                    </removed>
                    <common>
                        <!--
                            Add info that must be in all canvas items
                        -->
                        <class>\Soon\Merchandizer\Model\Grid\Decorator\Admin\Common</class>
                        <sort_order>60</sort_order>
                    </common>
                </admin>
            </grid_decorators>
        </soon_merchandizer>
        <catalog>
            <soon_merchandizer>
                <hide_invisible_products>1</hide_invisible_products>
                <hide_disabled_products>1</hide_disabled_products>
                <hide_out_of_stock_products>2</hide_out_of_stock_products>
                <column_count_options>1,2,3,4,5,6,7</column_count_options>
                <column_count>3</column_count>
                <use_grid_template>1</use_grid_template>
                <default_col_size_x>1</default_col_size_x>
                <default_col_size_y>1</default_col_size_y>
            </soon_merchandizer>
        </catalog>
    </default>
</config>
