{if file_exists("templates/orderforms/$carttpl/includes/viewcart/overwrites/summary-table.tpl")}
    {include file="templates/orderforms/$carttpl/includes/viewcart/overwrites/summary-table.tpl"}
{else}
    <div class="section">
        <div class="section-body">
            <form method="post" action="{$smarty.server.PHP_SELF}?a=view">
                <div class="panel panel-cart{if $showqtyoptions || $showAddonQtyOptions} has-qty{/if}">
                    <div class="panel-heading cart-heading">
                        <div class="title-col">
                            {$LANG.orderForm.productOptions}
                        </div>
                        {if $showqtyoptions || $showAddonQtyOptions}
                            <div class="qty-col">
                                {$LANG.orderForm.qty}
                            </div>
                        {/if}
                        <div class="price-col">
                            {$LANG.orderForm.priceCycle}
                        </div>
                        <div class="actions-col"></div>
                    </div>
                    <div class="panel-body" data-setup-fee-lang="{$LANG.ordersetupfee}" data-mo-cycle-lang="{$LANG.pricingCycleShort.monthly}" data-3mo-cycle-lang="{$LANG.pricingCycleShort.quarterly}" data-6mo-cycle-lang="{$LANG.pricingCycleShort.semiannually}" data-yr-cycle-lang="{$LANG.pricingCycleShort.annually}" data-2yr-cycle-lang="{$LANG.pricingCycleShort.biennially}" data-3yr-cycle-lang="{$LANG.pricingCycleShort.triennially}">
                        {foreach $products as $num => $product}
                            <div class="cart-item" data-input-number>
                                <div class="cart-item-title gap-2x" data-content="{$LANG.orderproduct}">
                                    {if is_array($graphics['product']) && $graphics['product'][$product.pid]->enabled && $graphics['product'][$product.pid]->getJson()->condensed->type}
                                        <div class="graphic-item graphic-item-sm">
                                            {assign var=graphic value=$graphics['product'][$product.pid]->getJson()->condensed->graphic}
                                            {assign var=graphicType value=$graphics['product'][$product.pid]->getJson()->condensed->type}
                                            {if $graphicType == "icon"}
                                                {include file="$template/assets/svg-icon/{$graphic}"}
                                            {else if $graphicType == "font-icon"}
                                                <span class="graphic-item-bg">
                                                    <i class="{$graphic}"></i>
                                                </span>
                                            {else if $graphicType == "media"}
                                                <img src="{$WEB_ROOT}/templates/{$template}/assets/img/page-manager/{$graphic}" alt="{$product.productinfo.name}">
                                            {/if}
                                        </div>
                                    {/if}
                                    <div>
                                        <span class="cart-item-title-main">{if isset($RSThemes['pages'][$templatefile]) && $RSThemes['pages'][$templatefile]['config']['removeProductGroupName'] != "1"}{$product.productinfo.groupname} - {/if}{$product.productinfo.name}</span>
                                        {assign var="hideServerFields" value=false}
                                        {if $RSThemes['addonSettings']['hide_password_fields'] != "displayed" && isset($RSThemes['addonSettings']['hide_hostname_on_checkout']) && $RSThemes['addonSettings']['hide_hostname_on_checkout'] == "1"}
                                            {assign var="ns_groups" value=","|explode:$RSThemes['addonSettings']['hide_password_fields']}
                                            {if $product.productinfo.gid|in_array:$ns_groups}
                                                {assign var="hideServerFields" value=true}
                                            {/if}
                                        {/if}
                                        {if $product.domain && !$hideServerFields}
                                            <span class="cart-item-title-small">{$product.domain}</span>
                                        {/if}
                                    </div>
                                </div>
                                {if $showqtyoptions || $showAddonQtyOptions}
                                    <div class="cart-item-qty {if !$product.allowqty} cart-item-qty-empty{/if}" data-content="{$LANG.quantity}">
                                        {if $product.allowqty}
                                            <div class="input-number input-number-sm">
                                                <label for="qty" class="sr-only">{$LANG.orderForm.qty}</label>
                                                <input type="number" data-input-number-input name="qty[{$num}]" id="qty" min=1 value="{$product.qty}" min="0" />
                                                <div class="input-number-actions">
                                                    <div class="plus" data-input-number-inc><i class="ls ls-caret"></i></div>
                                                    <div class="minus" data-input-number-dec><i class="ls ls-caret"></i></div>
                                                </div>
                                            </div>
                                        {else}
                                            -
                                        {/if}
                                    </div>
                                {/if}
                                <div class="cart-item-pricing" data-content="{$LANG.orderprice}">
                                    {if $RSThemes['pages'][$templatefile]['config']['hideProductBillingCycleDropdown'] == "1" || $product.billingcycle =="onetime" || $product.billingcycle =="free"}
                                        <div class="item-price" data-input-number-price>
                                            {if (
                                                    $product.pricing.totalTodayExcludingTaxSetup|replace:$WHMCSCurrency.prefix:""|replace:$WHMCSCurrency.suffix:"" == '0.00' ||
                                                    $product.pricing.totalTodayExcludingTaxSetup|replace:$WHMCSCurrency.prefix:""|replace:$WHMCSCurrency.suffix:"" == '0,00'
                                                ) && (
                                                    isset($RSThemes.addonSettings.free_product_price) && 
                                                    $RSThemes.addonSettings.free_product_price == "enabled" &&
                                                    isset($RSThemes.addonSettings.free_product_price_value) &&
                                                    $RSThemes.addonSettings.free_product_price_value == "all"
                                                )
                                            }
                                                {$LANG.orderfree}
                                            {else}
                                                {$product.pricing.totalTodayExcludingTaxSetup}<span class="price-cycle-inline">{if $product.billingcycle !="free" && $product.billingcycle != "onetime"}/{/if}{if $product.billingcycle =="onetime"} {$LANG.orderpaymenttermonetime}{elseif $product.billingcycle eq "monthly"}{$rslang->trans('order.period.short.monthly')}{elseif $product.billingcycle eq "quarterly"}{$rslang->trans('order.period.short.quarterly')}{elseif $product.billingcycle eq "semiannually"}{$rslang->trans('order.period.short.semiannually')}{elseif $product.billingcycle eq "annually"}{$rslang->trans('order.period.short.annually')}{elseif $product.billingcycle eq "biennially"}{$rslang->trans('order.period.short.biennially')}{elseif $product.billingcycle eq "triennially"}{$rslang->trans('order.period.short.triennially')}{/if}</span>
                                            {/if}
                                            {if $product.pricing.productonlysetup}
                                               <span class="renewal"> + {$product.pricing.productonlysetup->toPrefixed()} {$LANG.ordersetupfee} </span>
                                            {/if}
                                        </div>
                                    {else}
                                        <div class="cart-item-pricing-dropdown dropdown" data-input-number-price>
                                            <button tabindex="0" class="btn btn-sm btn-default dropdown-toggle" type="button" id="{$num}ProductPricing" name="{$num}ProductPricing" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                                <span  class="cart-item-price" data-input-number-price>{$product.pricing.totalTodayExcludingTaxSetup}{if $product.billingcycle !="free"}/{/if}{if $product.billingcycle eq "monthly"}{$rslang->trans('order.period.short.monthly')}{elseif $product.billingcycle eq "quarterly"}{$rslang->trans('order.period.short.quarterly')}{elseif $product.billingcycle eq "semiannually"}{$rslang->trans('order.period.short.semiannually')}{elseif $product.billingcycle eq "annually"}{$rslang->trans('order.period.short.annually')}{elseif $product.billingcycle eq "biennially"}{$rslang->trans('order.period.short.biennially')}{elseif $product.billingcycle eq "triennially"}{$rslang->trans('order.period.short.triennially')}{/if}
                                                    {if $product.pricing.productonlysetup}
                                                        + {$product.pricing.productonlysetup->toPrefixed()} {$LANG.ordersetupfee}</span>
                                                    {/if}
                                                </span>
                                                <span class="caret" aria-hidden="true"></span>
                                            </button>     
                                            <ul class="dropdown-menu" aria-labelledby="{$num}ProductPricing" >
                                                {foreach $allAvailableCycles[$num] as $cycle}
                                                    {if is_null($permittedBillingCycles) || in_array($cycle['cycle'], $permittedBillingCycles)}
                                                    <li {if $cycle['active'] == true}class="active"{/if}>
                                                            <a tabindex="0" href="" onclick="selectProductPeriodInCart(this, '{$num}', '{$cycle['cycle']}', '{$cycle['totalPriceFormatted']}'); return false;">
                                                                {$cycle['totalPriceFormatted']}
                                                            </a>
                                                        </li>
                                                    {/if}
                                                {/foreach}
                                            </ul>
                                        </div>
                                    {/if}    
                                    {if $product.proratadate}
                                    <span class="renewal cycle" data-input-number-price>({$LANG.orderprorata} <span class="prorata-date">{$product.proratadate}</span>)</span>
                                    {/if}
                                    <button tabindex="0" class="btn btn-sm btn-primary-faded hidden" data-btn-loader data-input-number-update title="">
                                        <span class="d-flex align-items-center"><i tabindex="0" class="ls ls-refresh"></i>{$LANG.carttaxupdateselectionsupdate}</span>
                                        <div class="loader loader-button hidden">
                                            {include file="$template/includes/common/loader.tpl" classes="spinner-sm"}  
                                        </div>
                                    </button>
                                </div>
                                <div class="cart-item-actions">
                                    <a tabindex="0" href="{$WEB_ROOT}/cart.php?a=confproduct&i={$num}" data-toggle="tooltip" data-html="true" data-original-title="{$LANG.orderForm.edit}" aria-label="{$LANG.orderForm.edit}" title="" class="btn btn-sm btn-icon">
                                        <i class="ls ls-edit"></i>
                                    </a>
                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeItem('p', '{$num}')">
                                        <i class="ls ls-trash"></i>
                                    </button>
                                </div>
                                {if $product.configoptions}
                                    <div class="cart-item-config">
                                        {foreach key=confnum item=configoption from=$product.configoptions}
                                            <div class="config-option {if $RSThemes['addonSettings']['show_included_config_costs'] == 'hidden'}hoverable{/if}" tabindex="0">
                                                <div class="config-option-title">
                                                    <span class="item-name">{$configoption.name}:</span>
                                                    <span class="item-value" data-product-config-option-option="{$num}-{$confnum}"> {if $configoption.type eq 1 || $configoption.type eq 2}{$configoption.optionname}{elseif $configoption.type eq 3}{if $configoption.qty}{$configoption.option}{else}{$LANG.no}{/if}{elseif $configoption.type eq 4}{$configoption.qty} x {$configoption.option}{/if}</span>
                                                </div>
                                                {if $showqtyoptions || $showAddonQtyOptions}
                                                    <div class="config-option-qty">
                                                            {* - *}
                                                    </div>
                                                {/if}
                                                <div class="config-option-price">
                                                    <span class="item-price" data-currency-prefix="{$WHMCSCurrency.prefix}" data-currency-suffix="{$WHMCSCurrency.suffix}" data-product-config-option="{$num}-{$confnum}">{if $configoption.recurring->toNumeric() && $configoption.recurring->toNumeric() != 0}{$configoption.recurring}{else}-{/if}</span>
                                                    {if $configoption.setup} + {$configoption.setup->toPrefixed()} {$LANG.ordersetupfee}{/if}
                                                </div>
                                                <div class="config-option-actions">

                                                </div>
                                            </div>
                                        {/foreach}
                                    </div>
                                {/if}
                            </div>
                            {if $product.addons}
                                {foreach key=addonnum item=addon from=$product.addons}
                                    <div class="cart-item" {if $showAddonQtyOptions && $addon.allowqty===2} data-input-number-secondary{/if}>                                
                                        <div class="cart-item-title gap-2x" tabindex="0">
                                            {if is_array($graphics['addon']) && $graphics['addon'][$addon.addonid]->enabled && $graphics['addon'][$addon.addonid]->getJson()->condensed->type}
                                                {assign var=graphic value=$graphics['addon'][$addon.addonid]->getJson()->condensed->graphic}
                                                {assign var=graphicType value=$graphics['addon'][$addon.addonid]->getJson()->condensed->type}
                                                <div class="graphic-item graphic-item-sm">
                                                    {if $graphicType == "icon"}
                                                        {include file="$template/assets/svg-icon/{$graphic}"}
                                                    {else if $graphicType == "font-icon"}
                                                        <span class="graphic-item-bg">
                                                            <i class="{$graphic}"></i>
                                                        </span>
                                                    {else if $graphicType == "media"}
                                                        <img src="{$WEB_ROOT}/templates/{$template}/assets/img/page-manager/{$graphic}" alt="{$product.productinfo.name}">
                                                    {/if}
                                                </div>
                                            {/if}
                                            <div>
                                                <span class="cart-item-title-main">{$addon.name}</span>
                                                <span class="cart-item-title-small">{$rslang->trans('generals.for')} {if isset($RSThemes['pages'][$templatefile]) && $RSThemes['pages'][$templatefile]['config']['removeProductGroupName'] != "1"}{$product.productinfo.groupname} - {/if}{$product.productinfo.name} ({$product.domain})</span>
                                            </div>
                                        </div>
                                        {if $showqtyoptions || $showAddonQtyOptions}
                                            <div class="cart-item-qty{if $addon.allowqty !== 2} cart-item-qty-empty{/if}">
                                                {if $addon.allowqty === 2}
                                                    <div class="input-number input-number-sm">
                                                        <input type="number" data-input-number-secondary-input name="paddonqty[{$num}][{$addonnum}]" value="{$addon.qty}" min="1" />
                                                        <div class="input-number-actions">
                                                            <div class="plus" data-input-number-secondary-inc>
                                                                <i class="ls ls-caret"></i>
                                                            </div>
                                                            <div class="minus" data-input-number-secondary-dec>
                                                                <i class="ls ls-caret"></i>
                                                            </div>
                                                        </div>
                                                    </div>
                                                {else if $addon.allowqty === 0 && $product.allowqty === 1}
                                                    <div class="input-number input-number-sm disabled">
                                                        <input type="number" value="{$product.qty}" min="1" />
                                                        <div class="input-number-actions">
                                                            <div class="plus"><i class="ls ls-caret"></i></div>
                                                            <div class="minus"><i class="ls ls-caret"></i></div>
                                                        </div>
                                                    </div>
                                                {else}
                                                    - 
                                                {/if}
                                            </div>
                                        {/if}
                                        <div class="cart-item-pricing">
                                            <span class="item-price" {if $showAddonQtyOptions && $addon.allowqty===2}data-input-number-secondary-price{/if} data-product-addon-price="{$num}-{$addonnum}">
                                                {if $addon.billingcycle != "free"}
                                                    <span>{$addon.totaltoday}/{if $addon.billingcycle =="free"}{$LANG.orderpaymenttermfree}{elseif $addon.billingcycle =="onetime"}{$LANG.orderpaymenttermonetime}{elseif $addon.billingcycle eq "monthly"}{$rslang->trans('order.period.short.monthly')}{elseif $addon.billingcycle eq "quarterly"}{$rslang->trans('order.period.short.quarterly')}{elseif $addon.billingcycle eq "semiannually"}{$rslang->trans('order.period.short.semiannually')}{elseif $addon.billingcycle eq "annually"}{$rslang->trans('order.period.short.annually')}{elseif $addon.billingcycle eq "biennially"}{$rslang->trans('order.period.short.biennially')}{elseif $addon.billingcycle eq "triennially"}{$rslang->trans('order.period.short.triennially')}{/if}</span>
                                                {else}
                                                    -
                                                {/if}
                                                {if $addon.setup} <span class="setup-fee">+ {$addon.setup->toPrefixed()} {$LANG.ordersetupfee}</span>{/if}
                                                {if $addon.isProrated}<br />({$LANG.orderprorata} {$addon.prorataDate}){/if}
                                            </span>
                                            <button tabindex="0" data-btn-loader class="btn btn-sm btn-primary-faded hidden" {if $showAddonQtyOptions && $addon.allowqty===2}data-input-number-secondary-update{/if} title="">
                                                <span><i tabindex="0" class="ls ls-refresh"></i>{$LANG.carttaxupdateselectionsupdate}</span>
                                                <div class="loader loader-button hidden">
                                                    {include file="$template/includes/common/loader.tpl" classes="spinner-sm"}  
                                                </div>
                                            </button>
                                            </div>
                                        <div class="cart-item-actions">
                                            <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeAddonItem('{$num}', 'products', '{$addonnum}')">
                                                <i class="ls ls-trash"></i>
                                            </button>
                                        </div>
                                    </div>
                                {/foreach}
                            {/if}
                        {/foreach}
                        {foreach $domains as $num => $domain}
                            <div class="cart-item">
                                <div class="cart-item-title gap-2x" data-content="{$LANG.orderdomain}">
                                    {foreach from=$graphics['domain'] key=num item=domainGraphic}
                                        {if $domainGraphic->enabled && $domainGraphic->getJson()->type == $domain.type && $domainGraphic->getJson()->condensed->graphic}
                                            {assign var=graphic value=$domainGraphic->getJson()->condensed->graphic}
                                            {assign var=graphicType value=$domainGraphic->getJson()->condensed->type}
                                            <div class="graphic-item graphic-item-sm">
                                                {if $graphicType == "icon"}
                                                    {include file="$template/assets/svg-icon/{$graphic}"}
                                                {else if $graphicType == "font-icon"}
                                                    <span class="graphic-item-bg">
                                                        <i class="{$graphic}"></i>
                                                    </span>
                                                {else if $graphicType == "media"}
                                                    <img src="{$WEB_ROOT}/templates/{$template}/assets/img/page-manager/{$graphic}" alt="{if $domain.type eq "register"}{$LANG.orderdomainregistration}{else}{$LANG.orderdomaintransfer}{/if}">
                                                {/if}
                                            </div>
                                        {/if}
                                    {/foreach}
                                    <div>
                                        {if $domain.domain}
                                            <span class="cart-item-title-main">{$domain.domain}</span>
                                        {/if}
                                        <span class="cart-item-title-small">{if $domain.type eq "register"}{$LANG.orderdomainregistration}{else}{$LANG.orderdomaintransfer}{/if}</span>
                                    </div>
                                </div>
                                {if $showqtyoptions || $showAddonQtyOptions}
                                    <div class="cart-item-qty cart-item-qty-empty" data-content="{$LANG.quantity}">
                                            -
                                    </div>
                                {/if}
                                <div class="cart-item-pricing" data-content="{$LANG.orderprice}">
                                    <span class="cart-item-price">
                                        <span class="{if count($domain.pricing) == 1 || $domain.type == 'transfer'}{else}hidden{/if}" data-domain-price-single="{$domain.domain}" >
                                            <span data-domain-price-single-price>{$domain.price}{$domain.shortYearsLanguage}</span>
                                            <span class="renewal cycle">
                                                {if isset($domain.renewprice)}{lang key='domainrenewalprice'} <span class="renewal-price cycle">{$domain.renewprice}{$domain.shortRenewalYearsLanguage}</span>{/if}
                                            </span>
                                        </span>
                                        <span class="{if count($domain.pricing) == 1 || $domain.type == 'transfer'}hidden{else}{/if}" data-domain-price-multi="{$domain.domain}">
                                            <div class="cart-item-pricing-dropdown dropdown">
                                                <button tabindex="0" class="btn btn-sm btn-default dropdown-toggle" type="button" id="{$domain.domain}Pricing" name="{$domain.domain}Pricing" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                                    <span data-domain-price-multi-price>{$domain.price}{$domain.shortYearsLanguage}</span>
                                                    <span class="caret" aria-hidden="true"></span>
                                                </button>
                                                <ul class="dropdown-menu" aria-labelledby="{$domain.domain}Pricing" data-domain-lang-year="{lang key='orderForm.year'}" data-domain-lang-years="{lang key='orderForm.years'}">
                                                    {foreach $domain.pricing as $years => $price}
                                                    {* Calculate addon prices for this period *}
                                                    {assign var="addonTotal" value=0}
                                                    {if $domain.dnsmanagement && isset($domain.dnsmanagementPriceBase)}
                                                        {assign var="addonTotal" value=$addonTotal+($domain.dnsmanagementPriceBase*$years)}
                                                    {/if}
                                                    {if $domain.emailforwarding && isset($domain.emailforwardingPriceBase)}
                                                        {assign var="addonTotal" value=$addonTotal+($domain.emailforwardingPriceBase*$years)}
                                                    {/if}
                                                    {if $domain.idprotection && isset($domain.idprotectionPriceBase)}
                                                        {assign var="addonTotal" value=$addonTotal+($domain.idprotectionPriceBase*$years)}
                                                    {/if}
                                                    {* Get base register price numeric value *}
                                                    {assign var="registerPriceNumeric" value=0}
                                                    {if isset($price.register) && !is_array($price.register)}
                                                        {assign var="registerPriceNumeric" value=$price.register|replace:$WHMCSCurrency.prefix:""|replace:$WHMCSCurrency.suffix:""|replace:" ":""|replace:",":"."}
                                                    {elseif isset($price.transfer) && !is_array($price.transfer)}
                                                        {assign var="registerPriceNumeric" value=$price.transfer|replace:$WHMCSCurrency.prefix:""|replace:$WHMCSCurrency.suffix:""|replace:" ":""|replace:",":"."}
                                                    {elseif isset($price.renew) && !is_array($price.renew)}
                                                        {assign var="registerPriceNumeric" value=$price.renew|replace:$WHMCSCurrency.prefix:""|replace:$WHMCSCurrency.suffix:""|replace:" ":""|replace:",":"."}
                                                    {/if}
                                                    {* Calculate total price with addons *}
                                                    {assign var="totalPriceNumeric" value=$registerPriceNumeric|floatval + $addonTotal|floatval}
                                                    {* Format total price using formatCurrency *}
                                                    {assign var="totalPriceFormatted" value=formatCurrency($totalPriceNumeric)}
                                                    <li {if {$domain.regperiod} == {$years}}class="active"{/if}>
                                                            <a tabindex="0" href="#" data-period-domain-option={$years} onclick="selectDomainPeriodInCart(this,'{$domain.domain}', '{$totalPriceFormatted}', {$years}, '{if $years == 1}{$rslang->trans('order.period.short.annually')}{else}{$rslang->trans('order.period.short.annually_multi')}{/if}');return false;">
                                                                {if $language == 'arabic' || $language == 'hebrew' || $language == 'farsi'}
                                                                    <span dir="rtl">
                                                                        {$years} {if $years == 1}{lang key='orderForm.year'}{else}{lang key='orderForm.years'}{/if} @
                                                                        <span dir="ltr">{$totalPriceFormatted}</span>
                                                                    </span>
                                                                {else}
                                                                    {$years} {if $years == 1}{lang key='orderForm.year'}{else}{lang key='orderForm.years'}{/if} @ {$totalPriceFormatted}
                                                                {/if}
                                                            </a>
                                                        </li>
                                                    {/foreach}
                                                </ul>
                                            </div>
                                            <span class="renewal cycle">
                                                {if isset($domain.renewprice)}
                                                    {if $language == 'arabic' || $language == 'hebrew' || $language == 'farsi'}
                                                        <span>{$domain.shortRenewalYearsLanguage|replace:'/':''}/</span> <span class="renewal-price cycle">{$domain.renewprice}</span> <span>{lang key='domainrenewalprice'}</span>
                                                    {else}
                                                        <span>{lang key='domainrenewalprice'}</span> <span class="renewal-price cycle">{$domain.renewprice} {$domain.shortRenewalYearsLanguage}</span>
                                                    {/if}
                                                {/if}
                                            </span>
                                        </span>
                                    </span>
                                </div>
                                <div class="cart-item-actions">
                                    <a tabindex="0" href="{$WEB_ROOT}/cart.php?a=confdomains" data-toggle="tooltip" data-html="true" data-original-title="{$LANG.orderForm.edit}" aria-label="{$LANG.orderForm.edit}" title="" class="btn btn-sm btn-icon">
                                        <i class="ls ls-edit"></i>
                                    </a>
                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeItem('d', '{$num}')">
                                        <i class="ls ls-trash"></i>
                                    </button>
                                </div> 
                                {if $domain.dnsmanagement || $domain.emailforwarding || $domain.idprotection}                       
                                    <div class="cart-item-config" data-domain-addons="{$domain.domain}">
                                        {if $domain.dnsmanagement}
                                        <div class="config-option {if $RSThemes['addonSettings']['show_included_config_costs'] == 'hidden'}hoverable{/if}" tabindex="0">
                                                <div class="config-option-title">
                                                    <span class="item-name">{$LANG.orderaddon}:</span>
                                                    <span class="item-value">{$LANG.domaindnsmanagement}</span>
                                                </div>
                                                {if $showqtyoptions || $showAddonQtyOptions}
                                                    <div class="config-option-qty cart-item-qty-empty">
                                                        {* - *}
                                                    </div>
                                                {/if}
                                                <div class="config-option-price">
                                                    <span class="item-price" data-domain-addon="dnsmanagement" data-domain-addon-base="{if isset($domain.dnsmanagementPriceBase)}{$domain.dnsmanagementPriceBase}{else}0{/if}" data-domain-addon-current="{if isset($domain.regperiod)}{$domain.regperiod}{else}1{/if}" data-currency-prefix="{$WHMCSCurrency.prefix}" data-currency-suffix="{$WHMCSCurrency.suffix}">{if isset($domain.dnsmanagementPrice)}{$domain.dnsmanagementPrice}{else}-{/if}</span>
                                                </div>
                                                <div class="config-option-actions">
                                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeAddonItem('{$num}', 'domains', 'dnsmanagement')">
                                                        <i class="ls ls-trash"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        {/if}
                                        {if $domain.emailforwarding}
                                            <div class="config-option {if $RSThemes['addonSettings']['show_included_config_costs'] == 'hidden'}hoverable{/if}" tabindex="0">
                                                <div class="config-option-title">
                                                    <span class="item-name">{$LANG.orderaddon}:</span>
                                                    <span class="item-value">{$LANG.domainemailforwarding}</span>
                                                </div>
                                                {if $showqtyoptions || $showAddonQtyOptions}
                                                    <div class="config-option-qty cart-item-qty-empty">
                                                        {* - *}
                                                    </div>
                                                {/if}
                                                <div class="config-option-price">
                                                    <span class="item-price" data-domain-addon="emailforwarding" data-domain-addon-base="{if isset($domain.emailforwardingPriceBase)}{$domain.emailforwardingPriceBase}{else}0{/if}" data-domain-addon-current="{if isset($domain.regperiod)}{$domain.regperiod}{else}1{/if}" data-currency-prefix="{$WHMCSCurrency.prefix}" data-currency-suffix="{$WHMCSCurrency.suffix}">{if isset($domain.emailforwardingPrice)}{$domain.emailforwardingPrice}{else}-{/if}</span>
                                                </div>
                                                <div class="config-option-actions">
                                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeAddonItem('{$num}', 'domains' , 'emailforwarding')">
                                                        <i class="ls ls-trash"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        {/if}
                                        {if $domain.idprotection}
                                            <div class="config-option {if $RSThemes['addonSettings']['show_included_config_costs'] == 'hidden'}hoverable{/if}" tabindex="0">
                                                <div class="config-option-title">
                                                    <span class="item-name">{$LANG.orderaddon}:</span>
                                                    <span class="item-value">{$LANG.domainidprotection}</span>
                                                </div>  
                                                {if $showqtyoptions || $showAddonQtyOptions}
                                                    <div class="config-option-qty cart-item-qty-empty">
                                                        {* - *}
                                                    </div>
                                                {/if}
                                                <div class="config-option-price">
                                                    <span class="item-price" data-domain-addon="idprotection" data-domain-addon-base="{if isset($domain.idprotectionPriceBase)}{$domain.idprotectionPriceBase}{else}0{/if}" data-domain-addon-current="{if isset($domain.regperiod)}{$domain.regperiod}{else}1{/if}" data-currency-prefix="{$WHMCSCurrency.prefix}" data-currency-suffix="{$WHMCSCurrency.suffix}">{if isset($domain.idprotectionPrice)}{$domain.idprotectionPrice}{else}-{/if}</span>
                                                </div>
                                                <div class="config-option-actions">
                                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeAddonItem('{$num}', 'domains' , 'idprotection')">
                                                        <i class="ls ls-trash"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        {/if}
                                    </div>
                                {/if}
                            </div>
                        {/foreach}
                        {foreach $renewalsByType['services'] as $num => $service}
                            <div class="cart-item"> 
                                <div class="cart-item-title">
                                    <div>
                                        <span class="cart-item-title-main">{$service.name}</span>
                                        <span class="cart-item-title-small">{$service.domainName}</span>
                                    </div>
                                </div>
                                {if $showqtyoptions || $showAddonQtyOptions}
                                    <div class="cart-item-qty cart-item-qty-empty" data-content="{$LANG.quantity}">
                                        -
                                    </div>
                                {/if}
                                <div class="cart-item-pricing" data-content="{$LANG.orderprice}">
                                    {$service.recurringBeforeTax}<span class="price-cycle-inline">/{$LANG['pricingCycleShort'][$service.billingCycle|lower]}</span>
                                </div>
                                <div class="cart-item-actions">
                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeItem('r','{$num}','service')">
                                        <i class="ls ls-trash"></i>
                                    </button>
                                </div>
                            </div>
                        {/foreach}
                        {foreach $renewalsByType['addons'] as $num => $service}
                            <div class="item">
                                <div class="row">
                                    <div class="col-sm-7">
                                        <span class="item-title">
                                            {lang key='renewServiceAddon.titleAltSingular'}
                                        </span>
                                        <span class="item-group">
                                            {$service.name}
                                        </span>
                                        <span class="item-domain">
                                            {$service.domainName}
                                        </span>
                                    </div>
                                    <div class="col-sm-4 item-price">
                                        <span>{$service.recurringBeforeTax}</span>
                                        <span class="cycle">{$service.billingCycle}</span>
                                    </div>
                                    <div class="col-sm-1">
                                        <button tabindex="0" type="button" class="btn btn-link btn-sm btn-remove-from-cart" onclick="removeItem('r','{$num}','addon')">
                                            <i class="fas fa-times"></i>
                                            <span class="visible-xs d-block d-sm-none">{lang key='orderForm.remove'}</span>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        {/foreach}
                        {foreach $renewalsByType['domains'] as $num => $domain}
                            <div class="cart-item">
                                <div class="cart-item-title gap-2x" data-content="{$LANG.orderdomain}">
                                    {foreach from=$graphics['domain'] key=num item=domainGraphic}
                                        {if $domainGraphic->enabled && $domainGraphic->getJson()->type == "renew" && $domainGraphic->getJson()->condensed->graphic} 
                                            <div class="graphic-item graphic-item-sm">
                                                {assign var=graphic value=$domainGraphic->getJson()->condensed->graphic}
                                                {assign var=graphicType value=$domainGraphic->getJson()->condensed->type}
                                                {if $graphicType == "icon"}
                                                    {include file="$template/assets/svg-icon/{$graphic}"}
                                                {else if $graphicType == "font-icon"}
                                                    <span class="domain-graphic-bg">
                                                        <i class="{$graphic}"></i>
                                                    </span>
                                                {else if $graphicType == "media"}
                                                    <img src="{$WEB_ROOT}/templates/{$template}/assets/img/page-manager/{$graphic}" alt="{$LANG.domainrenewal}">
                                                {/if}
                                            </div>
                                        {/if}
                                    {/foreach}
                                    <div>
                                        <span class="cart-item-title-main">{$domain.domain}</span>
                                        <span class="cart-item-title-small">{$LANG.domainrenewal}</span>
                                    </div>
                                </div>
                                {if $showqtyoptions || $showAddonQtyOptions}
                                    <div class="cart-item-qty cart-item-qty-empty" data-content="{$LANG.quantity}">
                                        -
                                    </div>
                                {/if}
                                <div class="cart-item-pricing" data-content="{$LANG.orderprice}">
                                    {$domain.price}<span class="price-cycle-inline">/{$domain.regperiod}{$rslang->trans('order.period.short.annually')}</span>
                                </div>
                                <div class="cart-item-actions">
                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeItem('r', '{$num}', 'domain')">
                                        <i class="ls ls-trash"></i>
                                    </button>
                                </div>
                                {if $domain.dnsmanagement || $domain.emailforwarding || $domain.idprotection}
                                    <div class="cart-item-config" data-domain-addons="{$domain.domain}">
                                        {if $domain.dnsmanagement}
                                            <div class="config-option {if $RSThemes['addonSettings']['show_included_config_costs'] == 'hidden'}hoverable{/if}" tabindex="0">
                                                <div class="config-option-title">
                                                    <span class="item-name">{$LANG.orderaddon}:</span>
                                                    <span class="item-value">{$LANG.domaindnsmanagement}</span>
                                                </div>
                                                {if $showqtyoptions || $showAddonQtyOptions}
                                                    <div class="config-option-qty cart-item-qty-empty">
                                                        {* - *}
                                                    </div>
                                                {/if}
                                                <div class="config-option-price">
                                                    <span class="item-price" data-domain-addon="dnsmanagement" data-domain-addon-base="{if isset($domain.dnsmanagementPriceBase)}{$domain.dnsmanagementPriceBase}{else}0{/if}" data-domain-addon-current="{if isset($domain.regperiod)}{$domain.regperiod}{else}1{/if}" data-currency-prefix="{$WHMCSCurrency.prefix}" data-currency-suffix="{$WHMCSCurrency.suffix}">{if isset($domain.dnsmanagementPrice)}{$domain.dnsmanagementPrice}{else}-{/if}</span>
                                                </div>
                                                <div class="config-option-actions"></div>
                                            </div>
                                        {/if}
                                        {if $domain.emailforwarding}
                                            <div class="config-option {if $RSThemes['addonSettings']['show_included_config_costs'] == 'hidden'}hoverable{/if}" tabindex="0">
                                                <div class="config-option-title">
                                                    <span class="item-name">{$LANG.orderaddon}:</span>
                                                    <span class="item-value">{$LANG.domainemailforwarding}</span>
                                                </div>
                                                {if $showqtyoptions || $showAddonQtyOptions}
                                                    <div class="config-option-qty cart-item-qty-empty">
                                                        {* - *}
                                                    </div>
                                                {/if}
                                                <div class="config-option-price">
                                                    <span class="item-price" data-domain-addon="emailforwarding" data-domain-addon-base="{if isset($domain.emailforwardingPriceBase)}{$domain.emailforwardingPriceBase}{else}0{/if}" data-domain-addon-current="{if isset($domain.regperiod)}{$domain.regperiod}{else}1{/if}" data-currency-prefix="{$WHMCSCurrency.prefix}" data-currency-suffix="{$WHMCSCurrency.suffix}">{if isset($domain.emailforwardingPrice)}{$domain.emailforwardingPrice}{else}-{/if}</span>
                                                </div>
                                                <div class="config-option-actions"></div>
                                            </div>
                                        {/if}
                                        {if $domain.idprotection}
                                            <div class="config-option {if $RSThemes['addonSettings']['show_included_config_costs'] == 'hidden'}hoverable{/if}" tabindex="0">
                                                <div class="config-option-title">
                                                    <span class="item-name">{$LANG.orderaddon}:</span>
                                                    <span class="item-value">{$LANG.domainidprotection}</span>
                                                </div>
                                                {if $showqtyoptions || $showAddonQtyOptions}
                                                    <div class="config-option-qty cart-item-qty-empty">
                                                        {* - *}
                                                    </div>
                                                {/if}
                                                <div class="config-option-price">
                                                    <span class="item-price" data-domain-addon="idprotection" data-domain-addon-base="{if isset($domain.idprotectionPriceBase)}{$domain.idprotectionPriceBase}{else}0{/if}" data-domain-addon-current="{if isset($domain.regperiod)}{$domain.regperiod}{else}1{/if}" data-currency-prefix="{$WHMCSCurrency.prefix}" data-currency-suffix="{$WHMCSCurrency.suffix}">{if isset($domain.idprotectionPrice)}{$domain.idprotectionPrice}{else}-{/if}</span>
                                                </div>
                                                <div class="config-option-actions"></div>
                                            </div>
                                        {/if}
                                    </div>
                                {/if}
                            </div>
                        {/foreach}
                        {foreach $addons as $num => $addon}
                            <div class="cart-item" data-input-number>
                                <div class="cart-item-title gap-2x" data-content="{$LANG.orderaddon}">
                                    {if is_array($graphics['addon']) && $graphics['addon'][$addon.addonid]->enabled && $graphics['addon'][$addon.addonid]->getJson()->condensed->type}
                                        <div class="graphic-item graphic-item-sm">
                                            {assign var=graphic value=$graphics['addon'][$addon.addonid]->getJson()->condensed->graphic}
                                            {assign var=graphicType value=$graphics['addon'][$addon.addonid]->getJson()->condensed->type}
                                            {if $graphicType == "icon"}
                                                {include file="$template/assets/svg-icon/{$graphic}"}
                                            {else if $graphicType == "font-icon"}
                                                <span class="graphic-item-bg">
                                                    <i class="{$graphic}"></i>
                                                </span>
                                            {else if $graphicType == "media"}
                                                <img src="{$WEB_ROOT}/templates/{$template}/assets/img/page-manager/{$graphic}" alt="{$product.productinfo.name}">
                                            {/if}
                                        </div>
                                    {/if}
                                    <div>
                                        <span class="cart-item-title-main">{$addon.name} - {$addon.productname}</span>
                                        {if $addon.domainname}
                                            <span class="cart-item-title-small">{$addon.domainname}</span>
                                        {/if}
                                    </div>
                                </div>
                                {if $showqtyoptions || $showAddonQtyOptions}
                                    <div class="cart-item-qty{if $addon.allowqty !== 2} cart-item-qty-empty{/if}" data-content="{$LANG.quantity}">
                                        {if $addon.allowqty === 2}
                                            <div class="input-number">
                                                <input type="number" data-input-number-input name="addonqty[{$num}]" value="{$addon.qty}" min="0" />
                                                <div class="input-number-actions">
                                                    <div class="plus" data-input-number-inc><i class="ls ls-caret"></i></div>
                                                    <div class="minus" data-input-number-dec><i class="ls ls-caret"></i></div>
                                                </div>
                                            </div>
                                        {else}
                                            -
                                        {/if}
                                    </div>
                                {/if}
                                <div class="cart-item-pricing" data-content="{$LANG.orderprice}">
                                    <span data-input-number-price>
                                        {$addon.totaltoday}{if $addon.billingcycle != 'Free'}<span class="price-cycle-inline">/{if $addon.billingcycle =="free"}{$LANG.orderpaymenttermfree}{elseif $addon.billingcycle =="onetime"}{$LANG.orderpaymenttermonetime}{elseif $addon.billingcycle eq "monthly"}{$rslang->trans('order.period.short.monthly')}{elseif $addon.billingcycle eq "quarterly"}{$rslang->trans('order.period.short.quarterly')}{elseif $addon.billingcycle eq "semiannually"}{$rslang->trans('order.period.short.semiannually')}{elseif $addon.billingcycle eq "annually"}{$rslang->trans('order.period.short.annually')}{elseif $addon.billingcycle eq "biennially"}{$rslang->trans('order.period.short.biennially')}{elseif $addon.billingcycle eq "triennially"}{$rslang->trans('order.period.short.triennially')}{/if}</span>
                                        {/if}
                                        {if $addon.setup} + {$addon.setup->toPrefixed()} {$LANG.ordersetupfee}{/if}
                                        {if $addon.isProrated}<br /><small>({$LANG.orderprorata} {$addon.prorataDate})</small>{/if}
                                    </span>
                                    <button tabindex="0" class="btn btn-sm btn-primary-faded hidden" data-btn-loader data-input-number-update title="">
                                        <span class="d-flex align-items-center"><i tabindex="0" class="ls ls-refresh"></i>{$LANG.carttaxupdateselectionsupdate}</span>
                                        <div class="loader loader-button hidden">
                                            {include file="$template/includes/common/loader.tpl" classes="spinner-sm"}  
                                        </div>
                                    </button>
                                </div>
                                <div class="cart-item-actions">
                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeItem('a', '{$num}')">
                                        <i class="ls ls-trash"></i>
                                    </button>
                                </div>
                            </div>
                        {/foreach}
                        {foreach $upgrades as $num => $upgrade}
                            <div class="cart-item" data-input-number>
                                <div class="cart-item-title" data-content="{$LANG.upgrade}">
                                    <div>
                                        <span class="cart-item-title-main">{$LANG.upgrade}</span>                                                
                                        {if $upgrade->type == 'service'}
                                            <span class="cart-item-title-small">{$upgrade->originalProduct->productGroup->name}<br>{$upgrade->originalProduct->name} => {$upgrade->newProduct->name}</span>
                                        {elseif $upgrade->type == 'addon'}
                                            <span class="cart-item-title-small">{$upgrade->originalAddon->name} => {$upgrade->newAddon->name}</span>
                                        {/if}
                                        {if $upgrade->type == 'service'}
                                            <span class="cart-item-title-small">{$upgrade->service->domain}</span>
                                        {/if}
                                    </div>
                                </div>
                                {if $showqtyoptions || $showUpgradeQtyOptions}
                                    <div class="cart-item-qty{if !$upgrade->allowMultipleQuantities} prod-qty-empty{/if}" data-content="{$LANG.quantity}">
                                        {if $upgrade->allowMultipleQuantities}
                                            <div class="input-number input-number-sm">
                                                <input type="number" data-input-number-input name="upgradeqty[{$num}]" value="{$upgrade->qty}" min="{$upgrade->minimumQuantity}" />
                                                <div class="input-number-actions">
                                                    <div class="plus" data-input-number-inc><i class="ls ls-caret"></i></div>
                                                    <<div class="minus" data-input-number-dec><i class="ls ls-caret"></i></div>
                                                </div>
                                            </div>
                                        {else}
                                            -
                                        {/if}
                                    </div>
                                {/if}
                                <div class="cart-item-pricing">
                                    <span class="cart-item-price" data-input-number-price>
                                        <span>
                                            {if (
                                                    $upgrade->newRecurringAmount|replace:$WHMCSCurrency.prefix:""|replace:$WHMCSCurrency.suffix:"" == '0.00' ||
                                                    $upgrade->newRecurringAmount|replace:$WHMCSCurrency.prefix:""|replace:$WHMCSCurrency.suffix:"" == '0,00'
                                                ) && (
                                                    isset($RSThemes.addonSettings.free_product_price) && 
                                                    $RSThemes.addonSettings.free_product_price == "enabled" &&
                                                    isset($RSThemes.addonSettings.free_product_price_value) &&
                                                    $RSThemes.addonSettings.free_product_price_value == "all"
                                                )
                                            }
                                                {$LANG.orderfree}
                                            {else}
                                                {$upgrade->newRecurringAmount}
                                            {/if}    
                                        </span>
                                        <span class="price-cycle-inline">{$upgrade->localisedNewCycle}</span>
                                    </span>
                                    <button tabindex="0" class="btn btn-sm btn-primary-faded hidden" data-btn-loader data-input-number-update data-html="true"  title="">
                                        <span class="d-flex align-items-center"><i tabindex="0" class="ls ls-refresh"></i>{$LANG.carttaxupdateselectionsupdate}</span>
                                        <div class="loader loader-button hidden">
                                            {include file="$template/includes/common/loader.tpl" classes="spinner-sm"}  
                                        </div>
                                    </button>
                                </div>
                                <div class="cart-item-actions">
                                    <button tabindex="0" type="button" class="btn btn-sm btn-icon btn-hover-danger" data-toggle="tooltip" data-html="true" aria-label="{$LANG.orderForm.remove}" data-original-title=" {$LANG.orderForm.remove}" aria-label="{$LANG.orderForm.remove}" onclick="removeItem('u', '{$num}')">
                                        <i class="ls ls-trash"></i>
                                    </button>
                                </div>
                                {if $upgrade->totalDaysInCycle > 0}
                                    <div class="cart-item-config">
                                        <div class="config-option {if $RSThemes['addonSettings']['show_included_config_costs'] == 'hidden'}hoverable{/if}" tabindex="0">
                                            <div class="config-option-title">
                                                <span class="config-option-name">
                                                    {$LANG.upgradeCredit}
                                                </span>
                                                <div class="upgrade-calc-msg">
                                                    {lang key="upgradeCreditDescription" daysRemaining=$upgrade->daysRemaining totalDays=$upgrade->totalDaysInCycle}
                                                </div>
                                            </div>
                                            {if $showqtyoptions || $showAddonQtyOptions}
                                                <div class="config-option-qty cart-item-qty-empty">
                                                        -
                                                </div>
                                            {/if}
                                            <div class="config-option-price">
                                                <span>{$upgrade->creditAmount}</span>
                                            </div>
                                        </div>
                                    </div>
                                {/if}
                            </div>
                        {/foreach}
                    </div>
                    <div class="panel-footer d-flex space-between">
                        <div class="content {if $RSThemes['pages'][$templatefile]['config']['displayVatBasedOnSelectedCountry'] != "0"}d-flex space-between w-100 flex-nowrap{else}{if $taxenabled && !$loggedin}{else}d-flex space-between w-100 flex-nowrap{/if}{/if}">
                            <a tabindex="0" href="cart.php" class="btn btn-default btn-sm">{$LANG.orderForm.continueShopping}<i class="ls ls-reply"></i></a>
                                {if $RSThemes['pages'][$templatefile]['config']['displayVatBasedOnSelectedCountry'] != "0"}
                                    <button tabindex="0" type="button" class="btn btn-default btn-sm" id="btnEmptyCart">{$LANG.emptycart}<i aria-hidden="true" class="ls ls-trash"></i></button>
                                {else}
                                {if $taxenabled && !$loggedin}
                                    <a tabindex="0" data-toggle="modal" data-target="#estimate-taxes" class="btn btn-default btn-sm" href="#">{$LANG.orderForm.estimateTaxes}<i aria-hidden="true" class="ls ls-bank-note"></i></a>
                                {else}
                                    <button tabindex="0" type="button" class="btn btn-default btn-sm" id="btnEmptyCart" aria-label="{$LANG.emptycart}">{$LANG.emptycart}<i aria-hidden="true" class="ls ls-trash"></i></button>
                                {/if}
                            {/if}    
                        </div>            
                        <div class="content">
                            {if $RSThemes['pages'][$templatefile]['config']['displayVatBasedOnSelectedCountry'] != "0"}
                            {else}
                                {if $taxenabled && !$loggedin}
                                    <button tabindex="0" type="button" class="btn btn-default btn-sm" id="btnEmptyCart" aria-label="{$LANG.emptycart}"><i aria-hidden="true" class="ls ls-trash"></i>{$LANG.emptycart}</button>
                                {/if}
                            {/if}
                        </div>            
                    </div>
                </div>
            </form>
        </div>
    </div>
{/if}