{if file_exists("templates/orderforms/$carttpl/includes/viewcart/overwrites/promo-code.tpl")}
    {include file="templates/orderforms/$carttpl/includes/viewcart/overwrites/promo-code.tpl"}
{else}
    <div class="section">
        <div class="section-header">
            <h2 class="section-title">{$LANG.cartpromo}</h2>
        </div>
        <div class="section-body">
            <div class="alert alert-lagom alert-primary alert-danger {if !$promoerrormessage}hidden{/if}" role="alert" data-alert-promo-errormessage>
                <div class="alert-body">
                    {if $promoerrormessage}{$promoerrormessage}{/if}
                </div>
            </div>
            <div class="alert alert-lagom alert-primary alert-info {if $promotioncode && $rawdiscount eq "0.00"}{else}hidden{/if}" role="alert"  data-alert-promo-rawdiscount>
                <div class="alert-body">
                    {$LANG.promoappliedbutnodiscount}
                </div>
            </div>
            <div class="alert alert-lagom alert-primary alert-success {if !$promoaddedsuccess}hidden{/if}" role="alert"  data-alert-promo-success>
                <div class="alert-body">
                    {$LANG.orderForm.promotionAccepted}
                </div>
            </div>
            <div class="alert alert-lagom alert-primary alert-success hidden" role="alert"  data-alert-promo-removed>
                <div class="alert-body">
                    {$rslang->trans('order.promocode_removed')}
                </div>
            </div>
            <div class="panel panel-promo-code {if !$promotioncode}hidden{/if}" data-promotion-box>
                <div class="panel-heading">
                    <div class="promo-code-content">
                        <label class="label label-savings">
                            {include file="$template/assets/img/promocode-label-icon.svg"}
                            <span class="code" data-promotion-box-code>{$promotioncode} </span>
                        </label>
                        <div class="promo-code-content-desc">
                            {$lastDot = false}
                            {if $promotiondescription|strstr:" <br />"}{$lastDot = true}{/if}
                            <span data-promotion-desc>{$promotiondescription|replace:' <br />':'.</span><span class="font-weight-normal">'}</span>{if $lastDot}.{/if}
                        </div>
                    </div>
                    <div class="promo-code-action">
                        <button type="button" tabindex="0" onclick="removePromocode($(this))" class="btn btn-default btn-sm" aria-label="Remove" data-btn-loader>
                            <span><i class="ls ls-trash"></i> {$LANG.orderForm.removePromotionCode}</span>
                            <div class="loader loader-button hidden">
                                {include file="$template/includes/common/loader.tpl" classes="spinner-sm"}  
                            </div>
                        </button>
                    </div>
                </div>
            </div>
            <div class="search-box search-box-sm search-box-{$searchBoxStyle} {if $hookOutput}m-b-0{else}m-b-40{/if} {if $promotioncode}hidden{/if}" data-promotion-box-add>
                <form method="post" action="cart.php?a=checkout">
                    <div class="search-group">
                        <div class="search-field">
                            <input class="form-control" type="text" name="promocode" id="inputPromotionCode" placeholder="{$LANG.orderPromoCodePlaceholder}" required/>
                            <div class="search-field-icon"><i class="lm lm-search" aria-hidden="true"></i></div>     
                        </div>
                        <div class="search-group-btn">
                            <button tabindex="0" class="btn btn-primary{if $searchBoxStyle == 'primary'}-faded{/if}" type="button" onclick="addPromocode($(this))" name="validatepromo" data-btn-loader>
                                <span>{$LANG.orderpromovalidatebutton}</span>
                                <div class="loader loader-button hidden">
                                    {include file="$template/includes/common/loader.tpl" classes="spinner-sm spinner-light"}  
                                </div>
                            </button>
                        </div>
                    </div>
                </form>
            </div>        
            {if $promoBannerStatus}
                {include file="$template/core/extensions/PromoBanners/promo-slide.tpl" setting="cart-view" class="m-t-3x"}
            {/if}
        </div>
    </div>
{/if}    