<?php
/* Smarty version 3.1.48, created on 2026-02-25 19:42:57
  from '/home/linq/public_html/clients/templates/six/store/order.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.48',
  'unifunc' => 'content_699f50c145d084_32594231',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'b7f810bf306882dd718754a217ce13f92a7df721' => 
    array (
      0 => '/home/linq/public_html/clients/templates/six/store/order.tpl',
      1 => 1732315588,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_699f50c145d084_32594231 (Smarty_Internal_Template $_smarty_tpl) {
?><div class="container">
    <div class="store-order-container">

        <form method="post" action="<?php echo routePath('cart-order-addtocart');?>
" id="frmAddToCart">
            <input type="hidden" name="pid" value="<?php echo $_smarty_tpl->tpl_vars['product']->value->id;?>
">
            <input type="hidden" name="domain_type" value="" id="inputDomainType">

            <div class="row">
                <div class="col-sm-7">
                    <h2><?php echo $_smarty_tpl->tpl_vars['product']->value->name;?>
</h2>

                    <p><?php echo $_smarty_tpl->tpl_vars['product']->value->description;?>
</p>
                </div>
                <div class="col-sm-5">

                    <div class="payment-term">
                        <h4><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.choosePaymentTerm'),$_smarty_tpl ) );?>
</h4>
                        <select name="billingcycle" class="form-control">
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['product']->value->pricing()->allAvailableCycles(), 'pricing');
$_smarty_tpl->tpl_vars['pricing']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['pricing']->value) {
$_smarty_tpl->tpl_vars['pricing']->do_else = false;
?>
                                <option value="<?php echo $_smarty_tpl->tpl_vars['pricing']->value->cycle();?>
"<?php if ($_smarty_tpl->tpl_vars['requestedCycle']->value == $_smarty_tpl->tpl_vars['pricing']->value->cycle()) {?> selected<?php }?>>
                                    <?php if ($_smarty_tpl->tpl_vars['pricing']->value->isRecurring()) {?>
                                        <?php if ($_smarty_tpl->tpl_vars['pricing']->value->isYearly()) {?>
                                            <?php echo $_smarty_tpl->tpl_vars['pricing']->value->cycleInYears();?>
 - <?php echo $_smarty_tpl->tpl_vars['pricing']->value->yearlyPrice();?>

                                        <?php } else { ?>
                                            <?php echo $_smarty_tpl->tpl_vars['pricing']->value->cycleInMonths();?>
 - <?php echo $_smarty_tpl->tpl_vars['pricing']->value->monthlyPrice();?>

                                        <?php }?>
                                    <?php } else { ?>
                                        <?php echo $_smarty_tpl->tpl_vars['pricing']->value->toFullString();?>

                                    <?php }?>
                                </option>
                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </select>
                    </div>

                </div>
            </div>

            <br>
            <h4><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.chooseDomain'),$_smarty_tpl ) );?>
</h4>

            <ul class="nav nav-tabs store-domain-tabs" role="tablist">
                <?php if ($_smarty_tpl->tpl_vars['requireDomain']->value) {?>
                    <?php if ((count($_smarty_tpl->tpl_vars['domains']->value) > 0 && $_smarty_tpl->tpl_vars['loggedin']->value)) {?>
                        <li role="presentation" class="active"><a href="#existing-domain" aria-controls="existing-domain" role="tab" data-toggle="tab"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.chooseExistingDomain'),$_smarty_tpl ) );?>
</a></li>
                    <?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['allowSubdomains']->value) {?>
                        <li role="presentation"><a href="#sub-domain" aria-controls="sub-domain" role="tab" data-toggle="tab"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.subOfExisting'),$_smarty_tpl ) );?>
</a></li>
                    <?php }?>
                    <li role="presentation"><a id="tabCustomDomainControl" href="#custom-domain" aria-controls="custom-domain" role="tab" data-toggle="tab"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.domainAlreadyOwned'),$_smarty_tpl ) );?>
</a></li>
                <?php } else { ?>
                    <li role="presentation" class="active">
                        <a id="tabNoDomain" href="#no-domain" role="tab" data-toggle="tab">
                            <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.noDomain'),$_smarty_tpl ) );?>

                        </a>
                    </li>
                <?php }?>
            </ul>
            <div class="tab-content store-domain-tab-content">
                <?php if ($_smarty_tpl->tpl_vars['requireDomain']->value) {?>
                    <?php if (count($_smarty_tpl->tpl_vars['domains']->value) > 0) {?>
                        <div role="tabpanel" class="tab-pane active" id="existing-domain">
                            <?php if ($_smarty_tpl->tpl_vars['loggedin']->value) {?>
                                <div class="row">
                                    <div class="col-sm-8">
                                        <select class="form-control" name="existing_domain">
                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['domains']->value, 'domain');
$_smarty_tpl->tpl_vars['domain']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['domain']->value) {
$_smarty_tpl->tpl_vars['domain']->do_else = false;
?>
                                                <option value="<?php echo $_smarty_tpl->tpl_vars['domain']->value;?>
"<?php if ($_smarty_tpl->tpl_vars['domain']->value == $_smarty_tpl->tpl_vars['selectedDomain']->value) {?> selected="selected"<?php }?>>
                                                    <?php echo $_smarty_tpl->tpl_vars['domain']->value;?>

                                                </option>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                        </select>
                                    </div>
                                    <div class="col-sm-4">
                                        <span class="domain-validation ok">
                                            <i class="fas fa-check"></i>
                                            <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.eligible'),$_smarty_tpl ) );?>

                                        </span>
                                    </div>
                                </div>
                            <?php } else { ?>
                                <a href="<?php echo routePath('cart-order-login');?>
"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.login'),$_smarty_tpl ) );?>
</a> <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.addToExistingPackage'),$_smarty_tpl ) );?>

                            <?php }?>
                        </div>
                    <?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['allowSubdomains']->value) {?>
                        <div role="tabpanel" class="tab-pane" id="sub-domain">
                            <div class="row">
                                <div class="col-sm-8">
                                    <div style="display:inline-block;width:47%;">
                                        <input type="text" class="form-control subdomain-input" name="sub_domain" placeholder="Your desired subdomain"></div>
                                    <div style="display:inline-block;width:2%;text-align:center;">
                                        .
                                    </div>
                                    <div style="display:inline-block;width:47%;">
                                        <select class="form-control" name="existing_sld_for_subdomain" id="existing_sld_for_subdomain">
                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['domains']->value, 'domain');
$_smarty_tpl->tpl_vars['domain']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['domain']->value) {
$_smarty_tpl->tpl_vars['domain']->do_else = false;
?>
                                                <option value="<?php echo $_smarty_tpl->tpl_vars['domain']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['domain']->value;?>
</option>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <span class="domain-validation subdomain-validation"></span>
                                </div>
                            </div>
                        </div>
                    <?php }?>
                    <div role="tabpanel" class="tab-pane" id="custom-domain">
                        <div class="row">
                            <div class="col-sm-8">
                                <input type="text" class="form-control domain-input" placeholder="example.com" name="custom_domain" value="<?php echo $_smarty_tpl->tpl_vars['customDomain']->value;?>
">
                            </div>
                            <div class="col-sm-4">
                                <span class="domain-validation domain-input-validation"></span>
                            </div>
                        </div>
                    </div>
                <?php } else { ?>
                    <div role="tabpanel" class="tab-pane" id="no-domain">
                        <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.noDomainRequired'),$_smarty_tpl ) );?>

                    </div>
                <?php }?>
            </div>
            <div class="row">
                <div class="col-sm-5">
                     <a href="javascript:history.go(-1)" class="btn btn-default">
                        <i class="fas fa-arrow-left"></i>
                        <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'back'),$_smarty_tpl ) );?>

                    </a>
                </div>
                <div class="col-sm-7 text-right">
                    <button type="submit" name="continue" value="1" class="btn btn-default">
                        <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'orderForm.continueShopping'),$_smarty_tpl ) );?>

                    </button>
                    <button type="submit" name="checkout" value="1" class="btn btn-primary">
                        <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'orderForm.checkout'),$_smarty_tpl ) );?>

                        <i class="fas fa-shopping-cart"></i>
                    </button>

                </div>
            </div>

        </form>
    </div>

    <?php if ($_smarty_tpl->tpl_vars['upsellProduct']->value && $_smarty_tpl->tpl_vars['promotion']->value) {?>
        <div class="store-promoted-product upsell-<?php echo $_smarty_tpl->tpl_vars['upsellProduct']->value->productKey;?>
">
            <div class="row">
                <div class="col-sm-3">
                    <div class="icon">
                        <img src="<?php echo $_smarty_tpl->tpl_vars['promotion']->value->getImagePath();?>
">
                    </div>
                </div>
                <div class="col-sm-9">

                    <h3><?php echo $_smarty_tpl->tpl_vars['promotion']->value->getHeadline();?>
</h3>
                    <h4><?php echo $_smarty_tpl->tpl_vars['promotion']->value->getTagline();?>
</h4>
                    <?php if ($_smarty_tpl->tpl_vars['promotion']->value->getDescription()) {?>
                        <p><?php echo $_smarty_tpl->tpl_vars['promotion']->value->getDescription();?>
</p>
                    <?php }?>
                    <?php if ($_smarty_tpl->tpl_vars['promotion']->value->hasFeatures()) {?>
                        <ul class="features">
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['promotion']->value->getFeatures(), 'highlight');
$_smarty_tpl->tpl_vars['highlight']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['highlight']->value) {
$_smarty_tpl->tpl_vars['highlight']->do_else = false;
?>
                                <li><i class="far fa-check-circle"></i> <?php echo $_smarty_tpl->tpl_vars['highlight']->value;?>
</li>
                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </ul>
                    <?php }?>
                    <form method="post" action="<?php echo routePath('cart-order');?>
">
                        <input type="hidden" name="pid" value="<?php echo $_smarty_tpl->tpl_vars['upsellProduct']->value->id;?>
">
                        <button type="submit" class="btn btn-success">
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['product']->value->pricing()->allAvailableCycles(), 'pricing');
$_smarty_tpl->tpl_vars['pricing']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['pricing']->value) {
$_smarty_tpl->tpl_vars['pricing']->do_else = false;
?>
                                <span class="span-upsell span-upsell-<?php echo $_smarty_tpl->tpl_vars['pricing']->value->cycle();?>
">
                                    <?php ob_start();
echo $_smarty_tpl->tpl_vars['pricing']->value->cycle();
$_prefixVariable1 = ob_get_clean();
if (is_null($_smarty_tpl->tpl_vars['upsellComparison']->value->diff($_prefixVariable1))) {?>
                                        <?php echo $_smarty_tpl->tpl_vars['promotion']->value->getCta();?>
 <?php echo $_smarty_tpl->tpl_vars['upsellProduct']->value->name;?>
 <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.fromJust'),$_smarty_tpl ) );?>
 <?php echo $_smarty_tpl->tpl_vars['upsellProduct']->value->pricing()->best()->breakdownPrice();?>

                                    <?php } else { ?>
                                        <?php echo $_smarty_tpl->tpl_vars['promotion']->value->getCta();?>
 <?php echo $_smarty_tpl->tpl_vars['upsellProduct']->value->name;?>
 <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'store.forJust'),$_smarty_tpl ) );?>
 <?php ob_start();
echo $_smarty_tpl->tpl_vars['pricing']->value->cycle();
$_prefixVariable2 = ob_get_clean();
echo $_smarty_tpl->tpl_vars['upsellComparison']->value->diff($_prefixVariable2)->breakdownPrice();?>
 <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang'][0], array( array('key'=>'more'),$_smarty_tpl ) );?>

                                    <?php }?>
                                </span>
                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </button>
                    </form>
                </div>
            </div>
        </div>
    <?php }?>
</div>

<?php echo '<script'; ?>
>
jQuery(document).ready(function(){

    var delay = (function(){
      var timer = 0;
      return function(callback, ms){
        clearTimeout (timer);
        timer = setTimeout(callback, ms);
      };
    })();

    jQuery('.store-order-container .subdomain-input').keyup(function() {
        delay(function(){
          jQuery('.subdomain-validation').html('<i class="fas fa-spinner fa-spin"></i> Validating...').removeClass('ok');

          jQuery('#frmAddToCart button[type="submit"]').prop('disabled', true);

          var domainName = jQuery('.subdomain-input').val() + '.' + jQuery('#existing_sld_for_subdomain').val();

          WHMCS.http.jqClient.post('<?php echo routePath('cart-order-validate');?>
', 'domain=' + domainName, function(data) {
              if (data.valid) {
                  jQuery('.subdomain-validation').html('<i class="fas fa-check"></i> Valid').addClass('ok');
                  jQuery('#frmAddToCart button[type="submit"]').removeProp('disabled');
              } else {
                  jQuery('.subdomain-validation').html('<i class="fas fa-times"></i> Invalid domain');
              }
          }, 'json');

        }, 1000 );
    });

    var delay2 = (function(){
      var timer = 0;
      return function(callback, ms){
        clearTimeout (timer);
        timer = setTimeout(callback, ms);
      };
    })();

    jQuery('.store-order-container .domain-input').keyup(function() {
        delay2(function(){
          jQuery('.domain-input-validation').html('<i class="fas fa-spinner fa-spin"></i> Validating...').removeClass('ok');
          jQuery('#frmAddToCart button[type="submit"]').prop('disabled', true);
          WHMCS.http.jqClient.post('<?php echo routePath('cart-order-validate');?>
', 'domain=' + jQuery('.domain-input').val(), function(data) {
            if (data.valid) {
                jQuery('.domain-input-validation').html('<i class="fas fa-check"></i> Valid').addClass('ok');
                jQuery('#frmAddToCart button[type="submit"]').removeProp('disabled');
            } else {
                jQuery('.domain-input-validation').html('<i class="fas fa-times"></i> Invalid domain');
            }
          }, 'json');
        }, 1000 );
    });
    <?php if ($_smarty_tpl->tpl_vars['requireDomain']->value) {?>
        jQuery('.store-domain-tabs a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
            var tab = jQuery(e.target).attr('aria-controls');
            jQuery('#inputDomainType').val(tab);
            if (tab == 'custom-domain' || tab == 'sub-domain') {
                var validationBlockSelector = tab == 'custom-domain' ? '.domain-input-validation' : '.subdomain-validation';
                var validationHtml = jQuery(validationBlockSelector).html();

                if (validationHtml == '<i class="fas fa-check"></i> Valid') {
                    jQuery('#frmAddToCart button[type="submit"]').removeProp('disabled');
                } else {
                    jQuery('#frmAddToCart button[type="submit"]').prop('disabled', true);
                }
            } else {
                <?php if ($_smarty_tpl->tpl_vars['loggedin']->value) {?>
                    jQuery('#frmAddToCart button[type="submit"]').removeProp('disabled');
                <?php } else { ?>
                    jQuery('#frmAddToCart button[type="submit"]').prop('disabled', true);
                <?php }?>
            }
        });
    <?php }?>

    jQuery('.store-domain-tabs li').removeClass('active');
    jQuery('.store-domain-tabs li:first-child a').click();
    <?php if (!$_smarty_tpl->tpl_vars['loggedin']->value && $_smarty_tpl->tpl_vars['requireDomain']->value) {?>
        jQuery('#frmAddToCart button[type="submit"]').prop('disabled', true);
    <?php }?>

    jQuery('.payment-term').find('select').change(function() {
        var cycle = jQuery('.payment-term').find('option:selected').val();
        updateUpsellDetailsOnBillingCycleChange(cycle);
    });
    updateUpsellDetailsOnBillingCycleChange(jQuery('.payment-term').find('option:selected').val());

    <?php if ($_smarty_tpl->tpl_vars['customDomain']->value) {?>
        jQuery('#tabCustomDomainControl').click();
        jQuery('.store-order-container .domain-input').trigger('keyup');
    <?php }?>
});

function updateUpsellDetailsOnBillingCycleChange(cycle) {
    jQuery('.span-upsell').hide();
    jQuery('.span-upsell-' + cycle).show();
}
<?php echo '</script'; ?>
>
<?php }
}
