{% block econda_cross_sell %}
{% set element = block.slots.getSlot('cross_sell') %}
{% set cs_config = element.config|json_encode()%}
{% set categories = page.header.navigation.active.breadcrumb %}
{% if page.product.productNumber != null %}
{% set productid = page.product.productNumber %}
{% endif %}
{% set columns = 1 %}
{% if ecFlag == false %}
<div class="col-12" id="ec-{{ element.id }}" data-element-id="{{ element.id }}" data-element-type="{{ element.type }}" data-widget-id="{{ element.config.widgetId.value }}" data-cross-sell-instance="{{ ECS['econdCrossSelll.config.clientId'] }}" data-csConfig="{{ cs_config }}" data-category="{{ categories|json_encode }}" data-productid="{{ productid }}" data-econda-cross-sell>
{% endif %}
{% if cs_response %}
{% if (cs_response.emcsParams == null) %}
<div>
<p style="background: red;text-align: center;color: white;font-size: 20px;height: 60px;">
{{ "ecdcrosssell.crosssell.errMsg"|trans }}
</p>
</div>
{% else %}
{% set emcsParams = cs_response.emcsParams %}
{% set sliderConfig = cs_response.csConfig %}
{% set element = cs_response.elementType %}
{% sw_include "@Storefront/storefront/element/cms-element-econda-cross-sell.html.twig" ignore missing %}
{% endif %}
{% endif %}
{% if ecFlag == false %}
</div>
{% endif %}
{% endblock %}