{#
    Renders datagrid widget

    parameters:
        name: datagrid name
        params: additional parameters for url
        renderParams: parameters for grid UI
#}
{% macro renderGrid(name, params = {}, renderParams = {}) %}
    {% set datagrid = oro_datagrid_build(name, params) %}
    {% set metaData = oro_datagrid_metadata(datagrid, params) %}
    {% set data     = oro_datagrid_data(datagrid) %}

    <div id="grid-{{ name }}" data-type="datagrid" data-data="{{ data|json_encode|raw|escape }}"
         {% if renderParams.cssClass is defined %} class="{{ renderParams.cssClass }}" {% endif %}
         data-metadata="{{ metaData|json_encode|raw|escape }}"></div>
    <script type="text/javascript">
        require(['jquery', 'orodatagrid/js/datagrid-builder'].concat({{ metaData.requireJSModules|json_encode|raw }}),
        function ($, datagridBuilder) {
            var builders = _.toArray(arguments).slice(2);
            $(function () {
                datagridBuilder(builders, '#grid-{{ name }}');
            });
        });
    </script>
{% endmacro %}

{#
    Renders datagrid widget

    parameters:
        name: datagrid name
        params: additional parameters for url
        renderParams: parameters for grid UI
#}
{% macro renderGrid(name, params = {}, renderParams = {}) %}
    {% set datagrid = oro_datagrid_build(name, params) %}
    {% set metaData = oro_datagrid_metadata(datagrid, params) %}
    {% set data     = oro_datagrid_data(datagrid) %}
    {% set gridId   = 'grid-' ~ name  %}
    {% set gridSelector = gridId ~ '-' ~ random() %}

    <div id="{{ gridId }}"
         data-grid-selector="{{ gridSelector }}"
         data-type="datagrid"
         data-data="{{ data|json_encode|raw|escape }}"
         {% if renderParams.cssClass is defined %} class="{{ renderParams.cssClass }}" {% endif %}
         data-metadata="{{ metaData|json_encode|raw|escape }}"></div>
    <script type="text/javascript">
        require(['jquery', 'orodatagrid/js/datagrid-builder'].concat({{ metaData.requireJSModules|json_encode|raw }}),
        function ($, datagridBuilder) {
            var builders = _.toArray(arguments).slice(2);
            $(function () {
                datagridBuilder(builders, '[data-grid-selector="{{ gridSelector }}"]');
            });
        });
    </script>
{% endmacro %}

Merge Accounts from different channels. Broken Orders and Carts widgets
CRM-1143: Merge Accounts from different channels. Broken Orders and Carts widgets
