{block name='productdetails-pushed-success'}
    {$lazyLoadImages=$lazyLoadImages|default:true}
    {et_isShopVersionAtLeast value="5.2.0-beta" assign='shopIsAtLeast52'}
    <div id="pushed-success" {if $card}role="alert" class="card alert alert-dismissable"{/if}>
        {if isset($zuletztInWarenkorbGelegterArtikel)}
            {assign var=pushedArtikel value=$zuletztInWarenkorbGelegterArtikel}
        {else}
            {assign var=pushedArtikel value=$Artikel}
        {/if}
        {assign var=showXSellingCart value=isset($Xselling->Kauf) && count($Xselling->Kauf->Artikel) > 0}
        {if $card}
            {block name='productdetails-pushed-success-cart-note-heading'}
                <div class="card-header alert-success">
                    {if isset($cartNote)}
                        {et_getIcon key="alertSuccess" assign='icon'}
                        {if $icon}<i class="{$icon}"></i>{/if}
                        {$cartNote}
                    {/if}
                </div>
            {/block}
            <div class="card-body">
        {/if}

        <div class="row">
            {block name='productdetails-pushed-success-product-cell'}
                <div class="col col-12 col-md-{if $showXSellingCart}6{else}12{/if}">
                    {block name='productdetails-pushed-success-product-cell-content'}
                        <div class="productbox-inner{if isset($class)} {$class}{/if}">
                            <div class="row">
                                <div class="col col-12">
                                    {block name='productdetails-pushed-success-product-cell-subheading'}
                                        <div class="productbox-title subheadline">{$pushedArtikel->cName}</div>
                                    {/block}
                                </div>
                                <div class="col col-12 col-md-4 pushed-success-image-wrapper">
                                    {block name='productdetails-pushed-success-product-cell-image'}
                                        {include file='snippets/image.tpl'
                                            item=$pushedArtikel
                                            square=false
                                            class='image'
                                            srcSize='sm'}
                                    {/block}
                                </div>
                                <div class="col">
                                    {block name='productdetails-pushed-success-product-cell-details'}
                                        <div class="row">
                                            <div class="col col-12">
                                                <dl class="form-row">
                                                    {block name='et-productdetails-pushed-success-product-cell-product-number'}
                                                        <dt class="col-6">{lang key='productNo'}:</dt>
                                                        <dd class="col-6">{$pushedArtikel->cArtNr}</dd>
                                                    {/block}
                                                    {block name='et-productdetails-pushed-success-product-cell-manufacturer'}
                                                        {if $Einstellungen.artikeldetails.artikeldetails_hersteller_anzeigen !== 'N' && !empty($pushedArtikel->cHersteller)}
                                                            {block name='productdetails-pushed-success-manufacturer'}
                                                                <dt class="col-6">{lang key='manufacturer' section='productDetails'}:</dt>
                                                                <dd class="col-6">{$pushedArtikel->cHersteller}</dd>
                                                            {/block}
                                                        {/if}
                                                    {/block}
                                                    {block name='et-productdetails-pushed-success-product-cell-characteristics'}
                                                        {if $Einstellungen.artikeldetails.merkmale_anzeigen === 'Y' && !empty($pushedArtikel->oMerkmale_arr)}
                                                            <dt class="col-6">{lang key='characteristics' section='comparelist'}:</dt>
                                                            <dd class="col-6 attr-characteristic">
                                                                {block name='productdetails-pushed-success-characteristics'}
                                                                    <ul class="list-unstyled">
                                                                        {foreach $pushedArtikel->oMerkmale_arr as $oMerkmal}
                                                                            <li class="characteristic">
                                                                                <strong>
                                                                                    {strip}
                                                                                        {if $shopIsAtLeast52}
                                                                                            {$oMerkmal->getName()|escape:'html'}
                                                                                        {else}
                                                                                            {$oMerkmal->cName|escape:'html'}
                                                                                        {/if}:
                                                                                    {/strip}
                                                                                </strong>
                                                                                <span class="values">
                                                                                    {strip}
                                                                                        {if $shopIsAtLeast52}
                                                                                            {foreach $oMerkmal->getCharacteristicValues() as $characteristicValue}
                                                                                                {$characteristicValue->getValue()}
                                                                                                {if !$characteristicValue@last}, {/if}
                                                                                                {if $characteristicValue@index === 4 && !$characteristicValue@last}&hellip;{break}{/if}
                                                                                            {/foreach}
                                                                                        {else}
                                                                                            {foreach $oMerkmal->oMerkmalWert_arr as $characteristicValue}
                                                                                                {$characteristicValue->cWert}
                                                                                                {if !$characteristicValue@last}, {/if}
                                                                                                {if $characteristicValue@index === 4 && !$characteristicValue@last}&hellip;{break}{/if}
                                                                                            {/foreach}
                                                                                        {/if}
                                                                                    {/strip}
                                                                                </span>
                                                                            </li>
                                                                            {if $oMerkmal@index === 9 && !$oMerkmal@last}&hellip;{break}{/if}
                                                                        {/foreach}
                                                                    </ul>
                                                                {/block}
                                                            </dd>
                                                        {/if}
                                                    {/block}
                                                    {block name='productdetails-pushed-success-mhd'}
                                                        {if (!isset($Einstellungen.artikeldetails.show_shelf_life_expiration_date) || $Einstellungen.artikeldetails.show_shelf_life_expiration_date === 'Y') && isset($pushedArtikel->dMHD) && isset($pushedArtikel->dMHD_de)}
                                                            <dt class="col-6">{lang key='productMHDTool'}:</dt>
                                                            <dd class="col-6">{$pushedArtikel->dMHD_de}</dd>
                                                        {/if}
                                                    {/block}
                                                    {block name='et-productdetails-pushed-success-product-cell-shipping-weight'}
                                                        {if $Einstellungen.artikeluebersicht.artikeluebersicht_gewicht_anzeigen === 'Y'
                                                        && isset($pushedArtikel->cGewicht)
                                                        && $pushedArtikel->fGewicht > 0
                                                        && !$pushedArtikel->bHasKonfig}
                                                            <dt class="col-6">{lang key='shippingWeight'}:</dt>
                                                            <dd class="col-6">{$pushedArtikel->cGewicht} {lang key='weightUnit'}</dd>
                                                        {/if}
                                                    {/block}
                                                    {block name='et-productdetails-pushed-success-product-cell-product-weight'}
                                                        {if $Einstellungen.artikeluebersicht.artikeluebersicht_artikelgewicht_anzeigen === 'Y'
                                                        && isset($pushedArtikel->cArtikelgewicht)
                                                        && $pushedArtikel->fArtikelgewicht > 0
                                                        && !$pushedArtikel->bHasKonfig}
                                                            <dt class="col-6">{lang key='productWeight'}:</dt>
                                                            <dd class="col-6">{$pushedArtikel->cArtikelgewicht} {lang key='weightUnit'}</dd>
                                                        {/if}
                                                    {/block}
                                                    {block name='et-productdetails-pushed-success-product-cell-rating'}
                                                        {if $Einstellungen.bewertung.bewertung_anzeigen === 'Y' && (int)$pushedArtikel->fDurchschnittsBewertung !== 0}
                                                            <dt class="col-6">{lang key='ratingAverage'}:</dt>
                                                            <dd class="col-6">
                                                                {block name='productdetails-pushed-success-include-rating'}
                                                                    {include file='productdetails/rating.tpl' stars=$pushedArtikel->fDurchschnittsBewertung}
                                                                {/block}
                                                            </dd>
                                                        {/if}
                                                    {/block}
                                                </dl>
                                            </div>
                                        </div>
                                    {/block}
                                </div>
                            </div>
                        </div>
                    {/block}
                    {block name='productdetails-pushed-success-product-cell-links'}
                        <div class="row pushed-success-buttons">
                            <div class="col col-12 col-md-6">
                                {block name='productdetails-pushed-success-product-cell-link-basket'}
                                    {include file="widgets/base/button.tpl" href="{get_static_route id='warenkorb.php'}" variant="cart" classes="btn-block" label="{lang key='gotoBasket'}"}
                                {/block}
                            </div>
                            <div class="col col-12 col-md-6">
                                {block name='productdetails-pushed-success-product-cell-link-checkout'}
                                    {include file="widgets/base/button.tpl" href="{get_static_route id='bestellvorgang.php'}?wk=1" variant="checkout" classes="btn-block" label="{lang key='nextStepCheckout' section='checkout'}" icon="{et_getIcon key="navigationNext"}"}
                                {/block}
                            </div>
                        </div>
                    {/block}
                </div>
            {/block}
            {block name='productdetails-pushed-success-x-sell'}
                {if $showXSellingCart}
                    <div class="col col-6 x-selling">
                        <div class="row">
                            <div class="col col-12">
                                {block name='productdetails-pushed-success-x-sell-heading'}
                                    <div class="productbox-title subheadline">{lang key='customerWhoBoughtXBoughtAlsoY' section='productDetails'}</div>
                                {/block}
                            </div>
                            <div class="col col-12">
                                {block name='productdetails-pushed-success-include-product-slider'}
                                    {include file='snippets/product_slider.tpl'
                                        id=''
                                        productlist=$Xselling->Kauf->Artikel
                                        title=''
                                        lazyLoadImages=$lazyLoadImages
                                        tplscope='half'
                                        slidesToShow=[
                                            'xl' => 2,
                                            'lg' => 2,
                                            'md' => 1,
                                            'sm' => 1,
                                            'xs' => 1
                                        ]
                                    }
                                {/block}
                            </div>
                        </div>
                    </div>
                {/if}
            {/block}
        </div>
        {if $card}</div>{/if}
    </div>
{/block}
