/** * Get user info */ function fn_twg_get_user_info($user_id) { $profile = array(); if (!$user_id) { $profile['user_id'] = 0; } else { $profile = fn_get_user_info($user_id); if (empty($profile)) { return false; } } if (AREA == 'C' && !empty($_SESSION['cart']['user_data'])) { $profile = array_merge($profile, $_SESSION['cart']['user_data']); } // Clear empty profile fields if (!empty($profile['fields'])) { $profile['fields'] = array_filter($profile['fields']); } $profile['ship_to_another']['profile'] = fn_check_shipping_billing($profile, fn_get_profile_fields()); $checkout_pfields = fn_get_profile_fields('O'); $profile['ship_to_another']['cart'] = fn_check_shipping_billing($profile, $checkout_pfields) || !fn_compare_shipping_billing($checkout_pfields); if ($user_id) { $profile['b_email'] = !empty($profile['b_email']) ? $profile['b_email'] : $profile['email']; $profile['s_email'] = !empty($profile['s_email']) ? $profile['s_email'] : $profile['email']; } return $profile; }
function content_55e61e6bb11d10_64552035($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/var/www/html/market/app/functions/smarty_plugins/block.hook.php'; } fn_preload_lang_vars(array('contact_information', 'user_profile_info', 'text_multiprofile_notice', 'billing_address', 'shipping_address', 'shipping_address', 'usergroup', 'status', 'no_data', 'allow_api_access', 'api_key', 'new_profile', 'editing_profile', 'editing_profile', 'editing_profile', 'view_all_orders', 'act_on_behalf', 'delete', 'create', 'notify_user')); if ($_smarty_tpl->tpl_vars['user_data']->value) { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable($_smarty_tpl->tpl_vars['user_data']->value['user_id'], null, 0); } else { ?> <?php $_smarty_tpl->tpl_vars["id"] = new Smarty_variable(0, null, 0); } ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <form name="profile_form" action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post" class="form-horizontal form-edit form-table <?php if ($_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['id']->value && $_smarty_tpl->tpl_vars['user_data']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['id']->value != $_smarty_tpl->tpl_vars['auth']->value['user_id'] || $_smarty_tpl->tpl_vars['hide_inputs']->value) { ?> cm-hide-inputs<?php } ?> "> <?php $_smarty_tpl->_capture_stack[0][] = array("mainbox", null, null); ob_start(); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null); ob_start(); ?> <?php $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(false, null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['user_type'] == $_smarty_tpl->tpl_vars['auth']->value['user_type'] && $_smarty_tpl->tpl_vars['user_data']->value['is_root'] == 'Y' && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] && (!$_smarty_tpl->tpl_vars['user_data']->value['company_id'] || $_smarty_tpl->tpl_vars['user_data']->value['company_id'] == $_smarty_tpl->tpl_vars['auth']->value['company_id'])) { ?> <?php $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if (fn_allowed_for("ULTIMATE") && !fn_allow_save_object($_smarty_tpl->tpl_vars['user_data']->value, "users") && $_smarty_tpl->tpl_vars['id']->value && !fn_ult_check_users_usergroup_companies($_smarty_tpl->tpl_vars['id']->value) && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id']) { ?> <?php $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if (fn_allowed_for("MULTIVENDOR") && (!fn_allow_save_object($_smarty_tpl->tpl_vars['user_data']->value, "users") || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && ($_REQUEST['user_type'] == 'C' || fn_string_not_empty($_smarty_tpl->tpl_vars['user_data']->value['company_id']) && $_smarty_tpl->tpl_vars['user_data']->value['company_id'] != $_smarty_tpl->tpl_vars['runtime']->value['company_id'])) && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id']) { ?> <?php $_smarty_tpl->tpl_vars['hide_inputs'] = new Smarty_variable(true, null, 0); ?> <?php } ?> <input type="hidden" name="user_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <input type="hidden" class="cm-no-hide-input" name="selected_section" id="selected_section" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['selected_section']->value, ENT_QUOTES, 'UTF-8'); ?> " /> <input type="hidden" class="cm-no-hide-input" name="user_type" value="<?php echo htmlspecialchars($_REQUEST['user_type'], ENT_QUOTES, 'UTF-8'); ?> " /> <div id="content_general"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:general_content")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:general_content"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_account.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php if ((fn_allowed_for("ULTIMATE") || $_smarty_tpl->tpl_vars['user_type']->value == "V") && $_smarty_tpl->tpl_vars['id']->value != $_smarty_tpl->tpl_vars['auth']->value['user_id']) { ?> <?php $_smarty_tpl->tpl_vars['zero_company_id_name_lang_var'] = new Smarty_variable(false, null, 0); ?> <?php if (fn_allowed_for("ULTIMATE") && fn_check_user_type_admin_area($_smarty_tpl->tpl_vars['user_type']->value)) { ?> <?php $_smarty_tpl->tpl_vars['zero_company_id_name_lang_var'] = new Smarty_variable('all_vendors', null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("views/companies/components/company_field.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('name' => "user_data[company_id]", 'id' => "user_data_company_id", 'selected' => $_smarty_tpl->tpl_vars['user_data']->value['company_id'], 'zero_company_id_name_lang_var' => $_smarty_tpl->tpl_vars['zero_company_id_name_lang_var']->value, 'disable_company_picker' => $_smarty_tpl->tpl_vars['hide_inputs']->value), 0); ?> <?php } else { ?> <input type="hidden" name="user_data[company_id]" value="<?php echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['user_data']->value['company_id']) === null || $tmp === '' ? 0 : $tmp, ENT_QUOTES, 'UTF-8'); ?> "> <?php } ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:general_content"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "C", 'title' => __("contact_information")), 0); ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['user_multiple_profiles'] == "Y" && $_smarty_tpl->tpl_vars['id']->value) { ?> <?php echo $_smarty_tpl->getSubTemplate("common/subheader.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => __("user_profile_info")), 0); ?> <p class="form-note"><?php echo $_smarty_tpl->__("text_multiprofile_notice"); ?> </p> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/multiple_profiles.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['profile_fields']->value['B']) { ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "B", 'title' => __("billing_address")), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "S", 'title' => __("shipping_address"), 'body_id' => "sa", 'shipping_flag' => fn_compare_shipping_billing($_smarty_tpl->tpl_vars['profile_fields']->value)), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "S", 'title' => __("shipping_address"), 'shipping_flag' => false), 0); ?> <?php } ?> </div> <?php if (!fn_allowed_for("ULTIMATE:FREE")) { ?> <?php if ($_smarty_tpl->tpl_vars['id']->value && ((!fn_check_user_type_admin_area($_smarty_tpl->tpl_vars['user_data']->value) || !$_smarty_tpl->tpl_vars['user_data']->value['user_id']) && !$_smarty_tpl->tpl_vars['runtime']->value['company_id'] || fn_check_user_type_admin_area($_smarty_tpl->tpl_vars['user_data']->value) && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] && $_smarty_tpl->tpl_vars['usergroups']->value && !$_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['auth']->value['is_root'] == 'Y' && ($_smarty_tpl->tpl_vars['user_data']->value['company_id'] != 0 || $_smarty_tpl->tpl_vars['user_data']->value['company_id'] == 0 && $_smarty_tpl->tpl_vars['user_data']->value['is_root'] != 'Y') || $_smarty_tpl->tpl_vars['user_data']->value['user_type'] == 'V' && $_smarty_tpl->tpl_vars['runtime']->value['company_id'] && $_smarty_tpl->tpl_vars['auth']->value['is_root'] == 'Y' && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] && $_smarty_tpl->tpl_vars['user_data']->value['company_id'] == $_smarty_tpl->tpl_vars['runtime']->value['company_id'])) { ?> <div id="content_usergroups" class="cm-hide-save-button"> <?php if ($_smarty_tpl->tpl_vars['usergroups']->value) { ?> <table width="100%" class="table table-middle"> <thead> <tr> <th width="50%"><?php echo $_smarty_tpl->__("usergroup"); ?> </th> <th class="right" width="10%"><?php echo $_smarty_tpl->__("status"); ?> </th> </tr> </thead> <?php $_smarty_tpl->tpl_vars['usergroup'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['usergroup']->_loop = false; $_from = $_smarty_tpl->tpl_vars['usergroups']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['usergroup']->key => $_smarty_tpl->tpl_vars['usergroup']->value) { $_smarty_tpl->tpl_vars['usergroup']->_loop = true; ?> <tr> <td><a href="<?php echo htmlspecialchars(fn_url("usergroups.manage#group" . (string) $_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['usergroup']->value['usergroup'], ENT_QUOTES, 'UTF-8'); ?> </a></td> <td class="right"> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['usergroups'][$_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']]) { ?> <?php $_smarty_tpl->tpl_vars["ug_status"] = new Smarty_variable($_smarty_tpl->tpl_vars['user_data']->value['usergroups'][$_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']]['status'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["ug_status"] = new Smarty_variable("F", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("common/select_popup.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('id' => $_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id'], 'status' => $_smarty_tpl->tpl_vars['ug_status']->value, 'hidden' => '', 'items_status' => fn_get_predefined_statuses("profiles"), 'extra' => "&user_id=" . (string) $_smarty_tpl->tpl_vars['id']->value, 'update_controller' => "usergroups", 'notify' => true, 'hide_for_vendor' => $_smarty_tpl->tpl_vars['runtime']->value['company_id']), 0); ?> </td> </tr> <?php } ?> </table> <?php } else { ?> <p class="no-items"><?php echo $_smarty_tpl->__("no_data"); ?> </p> <?php } ?> </div> <?php } ?> <?php } ?> <div id="content_addons"> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:detailed_content")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:detailed_content"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:detailed_content"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </div> <?php if ($_smarty_tpl->tpl_vars['show_api_tab']->value) { ?> <div id="content_api"> <div class="control-group <?php if ($_smarty_tpl->tpl_vars['hide_api_checkbox']->value) { ?> hidden<?php } ?> "> <div class="controls"> <label class="checkbox" for="sw_api_container"> <input <?php if ($_smarty_tpl->tpl_vars['user_data']->value['api_key'] != '') { ?> checked="checked"<?php } ?> class="cm-combination" type="checkbox" name="user_api_status" value="Y" id="sw_api_container" /><?php echo $_smarty_tpl->__("allow_api_access"); ?> </label> </div> </div> <div id="api_container" <?php if ($_smarty_tpl->tpl_vars['user_data']->value['api_key'] == '') { ?> class="hidden"<?php } ?> > <div class="control-group"> <label class="control-label"><?php echo $_smarty_tpl->__("api_key"); ?> </label> <div class="controls"> <input type="text" class="input-large" name="user_data[api_key]" value="<?php if ($_smarty_tpl->tpl_vars['user_data']->value['api_key']) { echo htmlspecialchars($_smarty_tpl->tpl_vars['user_data']->value['api_key'], ENT_QUOTES, 'UTF-8'); } else { echo htmlspecialchars($_smarty_tpl->tpl_vars['new_api_key']->value, ENT_QUOTES, 'UTF-8'); } ?> " readonly="readonly"/> </div> </div> </div> </div> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:tabs_content")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:tabs_content"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:tabs_content"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php if (!fn_allow_save_object($_smarty_tpl->tpl_vars['user_data']->value, "users") && $_smarty_tpl->tpl_vars['id']->value && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] || $_smarty_tpl->tpl_vars['hide_inputs']->value) { ?> <?php $_smarty_tpl->tpl_vars["hide_first_button"] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['id']->value) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:tabs_extra")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:tabs_extra"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:tabs_extra"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['tabsbox'], 'group_name' => $_smarty_tpl->tpl_vars['runtime']->value['controller'], 'active_tab' => $_smarty_tpl->tpl_vars['selected_section']->value, 'track' => true), 0); ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if (!$_smarty_tpl->tpl_vars['id']->value) { ?> <?php $_smarty_tpl->tpl_vars["_user_desc"] = new Smarty_variable(fn_get_user_type_description($_smarty_tpl->tpl_vars['user_type']->value), null, 0); ?> <?php ob_start(); echo $_smarty_tpl->__("new_profile"); $_tmp1 = ob_get_clean(); $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp1 . " (" . (string) $_smarty_tpl->tpl_vars['_user_desc']->value . ")", null, 0); } else { ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['firstname']) { ?> <?php ob_start(); echo $_smarty_tpl->__("editing_profile"); $_tmp2 = ob_get_clean(); $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp2 . ": " . (string) $_smarty_tpl->tpl_vars['user_data']->value['firstname'] . " " . (string) $_smarty_tpl->tpl_vars['user_data']->value['lastname'], null, 0); ?> <?php } elseif ($_smarty_tpl->tpl_vars['user_data']->value['b_firstname']) { ?> <?php ob_start(); echo $_smarty_tpl->__("editing_profile"); $_tmp3 = ob_get_clean(); $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp3 . ": " . (string) $_smarty_tpl->tpl_vars['user_data']->value['b_firstname'] . " " . (string) $_smarty_tpl->tpl_vars['user_data']->value['b_lastname'], null, 0); ?> <?php } else { ?> <?php ob_start(); echo $_smarty_tpl->__("editing_profile"); $_tmp4 = ob_get_clean(); $_smarty_tpl->tpl_vars["_title"] = new Smarty_variable($_tmp4 . ": " . (string) $_smarty_tpl->tpl_vars['user_data']->value['email'], null, 0); ?> <?php } } ?> <?php $_smarty_tpl->tpl_vars['_title'] = new Smarty_variable(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['_title']->value), null, 0); $_smarty_tpl->tpl_vars["redirect_url"] = new Smarty_variable("profiles.manage%26user_type=" . (string) $_smarty_tpl->tpl_vars['user_data']->value['user_type'], null, 0); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("buttons", null, null); ob_start(); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tools_list", null, null); ob_start(); ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:update_tools_list")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:update_tools_list"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['user_type'] == "C") { ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("view_all_orders"), 'href' => "orders.manage?user_id=" . (string) $_smarty_tpl->tpl_vars['id']->value)); ?> </li> <?php } ?> <?php if (fn_user_need_login($_smarty_tpl->tpl_vars['user_data']->value['user_type']) && (!$_smarty_tpl->tpl_vars['runtime']->value['company_id'] || $_smarty_tpl->tpl_vars['runtime']->value['company_id'] == $_smarty_tpl->tpl_vars['auth']->value['company_id']) && $_smarty_tpl->tpl_vars['user_data']->value['user_id'] != $_smarty_tpl->tpl_vars['auth']->value['user_id'] && !($_smarty_tpl->tpl_vars['user_data']->value['user_type'] == 'A' && $_smarty_tpl->tpl_vars['user_data']->value['is_root'] == 'Y' && !$_smarty_tpl->tpl_vars['user_data']->value['company_id'])) { ?> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'target' => "_blank", 'text' => __("act_on_behalf"), 'href' => "profiles.act_as_user?user_id=" . (string) $_smarty_tpl->tpl_vars['id']->value)); ?> </li> <li class="divider"></li> <li><?php smarty_template_function_btn($_smarty_tpl, array('type' => "list", 'text' => __("delete"), 'class' => "cm-confirm cm-post", 'href' => "profiles.delete?user_id=" . (string) $_smarty_tpl->tpl_vars['id']->value . "&redirect_url=" . (string) $_smarty_tpl->tpl_vars['redirect_url']->value)); ?> </li> <?php } ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:update_tools_list"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if ($_smarty_tpl->tpl_vars['id']->value && trim(Smarty::$_smarty_vars['capture']['tools_list']) !== '') { ?> <?php smarty_template_function_dropdown($_smarty_tpl, array('content' => Smarty::$_smarty_vars['capture']['tools_list'])); ?> <?php } ?> <div class="btn-group btn-hover dropleft"> <?php if ($_smarty_tpl->tpl_vars['id']->value) { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/save_changes.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_meta' => "dropdown-toggle", 'but_role' => "submit-link", 'but_name' => "dispatch[profiles." . (string) $_smarty_tpl->tpl_vars['runtime']->value['mode'] . "]", 'but_target_form' => "profile_form", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_text' => __("create"), 'but_meta' => "dropdown-toggle", 'but_role' => "submit-link", 'but_name' => "dispatch[profiles." . (string) $_smarty_tpl->tpl_vars['runtime']->value['mode'] . "]", 'but_target_form' => "profile_form", 'save' => $_smarty_tpl->tpl_vars['id']->value), 0); ?> <?php } ?> <ul class="dropdown-menu"> <li><a><input type="checkbox" name="notify_customer" value="Y" checked="checked" id="notify_customer" /> <?php echo $_smarty_tpl->__("notify_user"); ?> </a></li> </ul> </div> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo $_smarty_tpl->getSubTemplate("common/mainbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => $_smarty_tpl->tpl_vars['_title']->value, 'content' => Smarty::$_smarty_vars['capture']['mainbox'], 'buttons' => Smarty::$_smarty_vars['capture']['buttons']), 0); ?> </form><?php }
} // update products quantity and etc. if ($mode == 'update_totals') { fn_update_cart_by_data($cart, $_REQUEST, $customer_auth); } if ($mode == 'customer_info') { if (!empty($_REQUEST['profile_id'])) { $cart['profile_id'] = $_REQUEST['profile_id']; } $profile_fields = fn_get_profile_fields('O', $customer_auth); // Clean up saved shipping rates unset($_SESSION['shipping_rates']); if (is_array($_REQUEST['user_data'])) { // Fill shipping info with billing if needed if (empty($_REQUEST['ship_to_another'])) { fn_fill_address($_REQUEST['user_data'], $profile_fields, !fn_compare_shipping_billing($profile_fields)); } // Add descriptions for countries and states fn_add_user_data_descriptions($_REQUEST['user_data']); $cart['user_data'] = $_REQUEST['user_data']; $cart['ship_to_another'] = !empty($_REQUEST['ship_to_another']); if (empty($cart['order_id']) && (Registry::get('settings.Checkout.disable_anonymous_checkout') == 'Y' && !empty($_REQUEST['user_data']['password1']))) { $cart['profile_registration_attempt'] = true; list($user_id) = fn_update_user(0, $cart['user_data'], $customer_auth, !empty($_REQUEST['ship_to_another']), true); if ($user_id == false) { $action = ''; } else { $cart['user_id'] = $user_id; $u_data = db_get_row("SELECT user_id, tax_exempt, user_type FROM ?:users WHERE user_id = ?i", $cart['user_id']); $customer_auth = fn_fill_auth($u_data, array(), false, 'C'); $cart['user_data'] = array();
function content_55d5c539a11507_47603819($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } if (!is_callable('smarty_function_set_id')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php'; } fn_preload_lang_vars(array('text_profile_benefits', 'register_new_account', 'contact_information', 'select_profile', 'text_multiprofile_notice', 'billing_address', 'shipping_address', 'shipping_address', 'billing_address', 'revert', 'usergroup', 'status', 'action', 'active', 'remove', 'available', 'join', 'declined', 'join', 'pending', 'cancel', 'profile_details', 'text_profile_benefits', 'register_new_account', 'contact_information', 'select_profile', 'text_multiprofile_notice', 'billing_address', 'shipping_address', 'shipping_address', 'billing_address', 'revert', 'usergroup', 'status', 'action', 'active', 'remove', 'available', 'join', 'declined', 'join', 'pending', 'cancel', 'profile_details')); if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") { $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null); ob_start(); echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <span style="display: none" class="ls_test_profile_fields"><?php echo htmlspecialchars(var_dump($_smarty_tpl->tpl_vars['profile_fields']->value), ENT_QUOTES, 'UTF-8'); ?> </span> <?php if ($_smarty_tpl->tpl_vars['runtime']->value['mode'] == "add" && $_smarty_tpl->tpl_vars['settings']->value['General']['quick_registration'] == "Y") { ?> <div class="ty-account"> <form name="profiles_register_form" action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "C", 'nothing_extra' => "Y", 'register' => true), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_account.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('nothing_extra' => "Y", 'location' => "checkout", 'register' => true, 'section' => "C"), 0); ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "checkout:checkout_steps")); $_block_repeat = true; echo smarty_block_hook(array('name' => "checkout:checkout_steps"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "checkout:checkout_steps"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php $_smarty_tpl->tpl_vars["image_verification"] = new Smarty_variable($_smarty_tpl->getSubTemplate("common/image_verification.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('option' => "use_for_register", 'align' => "left"), 0)); ?> <?php if ($_smarty_tpl->tpl_vars['image_verification']->value) { ?> <div class="ty-control-group"> <?php echo $_smarty_tpl->tpl_vars['image_verification']->value; ?> </div> <?php } ?> <div class="ty-account-benefits"> <?php echo $_smarty_tpl->__("text_profile_benefits"); ?> </div> <div class="ty-profile-field__buttons buttons-container"> <?php echo $_smarty_tpl->getSubTemplate("buttons/register_profile.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[profiles.update]"), 0); ?> </div> </form> </div> <?php $_smarty_tpl->_capture_stack[0][] = array("mainbox_title", null, null); ob_start(); echo $_smarty_tpl->__("register_new_account"); list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } } else { ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/profile_home_menu.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null); ob_start(); ?> <div class="ty-profile-field ty-account form-wrap" id="content_general"> <form name="profile_form" action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post" enctype="multipart/form-data"> <input id="selected_section" type="hidden" value="general" name="selected_section"/> <input id="default_card_id" type="hidden" value="" name="default_cc"/> <input type="hidden" name="profile_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user_data']->value['profile_id'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php $_smarty_tpl->_capture_stack[0][] = array("group", null, null); ob_start(); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "C", 'title' => __("contact_information"), 'ls_upload_img_container' => true), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_account.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("blocks/static_templates/profile_info.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php if ($_smarty_tpl->tpl_vars['profile_fields']->value['B'] || $_smarty_tpl->tpl_vars['profile_fields']->value['S']) { ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['user_multiple_profiles'] == "Y" && $_smarty_tpl->tpl_vars['runtime']->value['mode'] == "update") { ?> <div class="clearfix profiles-profile_fields ls_select_profile_wrapper ls_profile_left_container"> <h3 class="ty-subheader"> <?php echo $_smarty_tpl->__("select_profile"); ?> </h3> <div class="ls_profile_contact_details_container"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/multiple_profiles.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('profile_id' => $_smarty_tpl->tpl_vars['user_data']->value['profile_id']), 0); ?> </div> <div class="ls_profile_contact_details_container"> <p><?php echo $_smarty_tpl->__("text_multiprofile_notice"); ?> </p> </div> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['address_position'] == "billing_first") { ?> <?php $_smarty_tpl->tpl_vars["first_section"] = new Smarty_variable("B", null, 0); ?> <?php $_smarty_tpl->tpl_vars["first_section_text"] = new Smarty_variable($_smarty_tpl->__("billing_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section"] = new Smarty_variable("S", null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section_text"] = new Smarty_variable($_smarty_tpl->__("shipping_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["body_id"] = new Smarty_variable("sa", null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["first_section"] = new Smarty_variable("S", null, 0); ?> <?php $_smarty_tpl->tpl_vars["first_section_text"] = new Smarty_variable($_smarty_tpl->__("shipping_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section"] = new Smarty_variable("B", null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section_text"] = new Smarty_variable($_smarty_tpl->__("billing_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["body_id"] = new Smarty_variable("ba", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => $_smarty_tpl->tpl_vars['first_section']->value, 'body_id' => '', 'ship_to_another' => false, 'title' => $_smarty_tpl->tpl_vars['first_section_text']->value), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => $_smarty_tpl->tpl_vars['sec_section']->value, 'body_id' => $_smarty_tpl->tpl_vars['body_id']->value, 'ship_to_another' => $_smarty_tpl->tpl_vars['ship_to_another']->value, 'title' => $_smarty_tpl->tpl_vars['sec_section_text']->value, 'address_flag' => fn_compare_shipping_billing($_smarty_tpl->tpl_vars['profile_fields']->value)), 0); ?> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:account_update")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:account_update"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:account_update"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php echo $_smarty_tpl->getSubTemplate("common/image_verification.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('option' => "use_for_register", 'align' => "center"), 0); ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo Smarty::$_smarty_vars['capture']['group']; ?> <div class="ty-profile-field__buttons buttons-container"> <?php if ($_smarty_tpl->tpl_vars['runtime']->value['mode'] == "add") { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/register_profile.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[profiles.update]", 'but_id' => "save_profile_but"), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/save.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[profiles.update]", 'but_meta' => "ty-btn__secondary", 'but_id' => "save_profile_but"), 0); ?> <input class="ty-profile-field__reset ty-btn ty-btn__tertiary" type="reset" name="reset" value="<?php echo $_smarty_tpl->__("revert"); ?> " id="shipping_address_reset"/> <script type="text/javascript"> (function(_, $) { var address_switch = $('input:radio:checked', '.ty-address-switch'); $("#shipping_address_reset").on("click", function(e) { setTimeout(function() { address_switch.click(); }, 50); }); }(Tygh, Tygh.$)); </script> <?php } ?> </div> </form> </div> <?php $_smarty_tpl->_capture_stack[0][] = array("additional_tabs", null, null); ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['runtime']->value['mode'] == "update") { ?> <?php if (!fn_allowed_for("ULTIMATE:FREE")) { ?> <?php if ($_smarty_tpl->tpl_vars['usergroups']->value && !fn_check_user_type_admin_area($_smarty_tpl->tpl_vars['user_data']->value)) { ?> <div id="content_usergroups"> <table class="ty-table"> <tr> <th style="width: 30%"><?php echo $_smarty_tpl->__("usergroup"); ?> </th> <th style="width: 30%"><?php echo $_smarty_tpl->__("status"); ?> </th> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_usergroup_signup'] == "Y") { ?> <th style="width: 40%"><?php echo $_smarty_tpl->__("action"); ?> </th> <?php } ?> </tr> <?php $_smarty_tpl->tpl_vars['usergroup'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['usergroup']->_loop = false; $_from = $_smarty_tpl->tpl_vars['usergroups']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['usergroup']->key => $_smarty_tpl->tpl_vars['usergroup']->value) { $_smarty_tpl->tpl_vars['usergroup']->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['usergroups'][$_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']]) { ?> <?php $_smarty_tpl->tpl_vars["ug_status"] = new Smarty_variable($_smarty_tpl->tpl_vars['user_data']->value['usergroups'][$_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']]['status'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["ug_status"] = new Smarty_variable("F", null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_usergroup_signup'] == "Y" || $_smarty_tpl->tpl_vars['settings']->value['General']['allow_usergroup_signup'] != "Y" && $_smarty_tpl->tpl_vars['ug_status']->value == "A") { ?> <tr> <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['usergroup']->value['usergroup'], ENT_QUOTES, 'UTF-8'); ?> </td> <td class="ty-center"> <?php if ($_smarty_tpl->tpl_vars['ug_status']->value == "A") { ?> <?php echo $_smarty_tpl->__("active"); ?> <?php $_smarty_tpl->tpl_vars["_link_text"] = new Smarty_variable($_smarty_tpl->__("remove"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["_req_type"] = new Smarty_variable("cancel", null, 0); ?> <?php } elseif ($_smarty_tpl->tpl_vars['ug_status']->value == "F") { ?> <?php echo $_smarty_tpl->__("available"); ?> <?php $_smarty_tpl->tpl_vars["_link_text"] = new Smarty_variable($_smarty_tpl->__("join"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["_req_type"] = new Smarty_variable("join", null, 0); ?> <?php } elseif ($_smarty_tpl->tpl_vars['ug_status']->value == "D") { ?> <?php echo $_smarty_tpl->__("declined"); ?> <?php $_smarty_tpl->tpl_vars["_link_text"] = new Smarty_variable($_smarty_tpl->__("join"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["_req_type"] = new Smarty_variable("join", null, 0); ?> <?php } elseif ($_smarty_tpl->tpl_vars['ug_status']->value == "P") { ?> <?php echo $_smarty_tpl->__("pending"); ?> <?php $_smarty_tpl->tpl_vars["_link_text"] = new Smarty_variable($_smarty_tpl->__("cancel"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["_req_type"] = new Smarty_variable("cancel", null, 0); ?> <?php } ?> </td> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_usergroup_signup'] == "Y") { ?> <td> <a class="cm-ajax" data-ca-target-id="content_usergroups" href="<?php echo htmlspecialchars(fn_url("profiles.usergroups?usergroup_id=" . (string) $_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id'] . "&type=" . (string) $_smarty_tpl->tpl_vars['_req_type']->value), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['_link_text']->value, ENT_QUOTES, 'UTF-8'); ?> </a> </td> <?php } ?> </tr> <?php } ?> <?php } ?> </table> <!--content_usergroups--></div> <?php } ?> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:tabs")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:tabs"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:tabs"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo Smarty::$_smarty_vars['capture']['additional_tabs']; ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if (trim(Smarty::$_smarty_vars['capture']['additional_tabs']) != '') { ?> <?php echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['tabsbox'], 'active_tab' => $_REQUEST['selected_section'], 'track' => true), 0); ?> <?php } else { ?> <?php echo Smarty::$_smarty_vars['capture']['tabsbox']; ?> <?php } ?> <?php $_smarty_tpl->_capture_stack[0][] = array("mainbox_title", null, null); ob_start(); echo $_smarty_tpl->__("profile_details"); list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } } list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } if (trim(Smarty::$_smarty_vars['capture']['template_content'])) { if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") { ?> <span class="cm-template-box template-box" data-ca-te-template="views/profiles/update.tpl" id="<?php echo smarty_function_set_id(array('name' => "views/profiles/update.tpl"), $_smarty_tpl); ?> "><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php echo Smarty::$_smarty_vars['capture']['template_content']; ?> <!--[/tpl_id]--></span><?php } else { echo Smarty::$_smarty_vars['capture']['template_content']; } } } else { echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_scripts.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <span style="display: none" class="ls_test_profile_fields"><?php echo htmlspecialchars(var_dump($_smarty_tpl->tpl_vars['profile_fields']->value), ENT_QUOTES, 'UTF-8'); ?> </span> <?php if ($_smarty_tpl->tpl_vars['runtime']->value['mode'] == "add" && $_smarty_tpl->tpl_vars['settings']->value['General']['quick_registration'] == "Y") { ?> <div class="ty-account"> <form name="profiles_register_form" action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "C", 'nothing_extra' => "Y", 'register' => true), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_account.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('nothing_extra' => "Y", 'location' => "checkout", 'register' => true, 'section' => "C"), 0); ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "checkout:checkout_steps")); $_block_repeat = true; echo smarty_block_hook(array('name' => "checkout:checkout_steps"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "checkout:checkout_steps"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php $_smarty_tpl->tpl_vars["image_verification"] = new Smarty_variable($_smarty_tpl->getSubTemplate("common/image_verification.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('option' => "use_for_register", 'align' => "left"), 0)); ?> <?php if ($_smarty_tpl->tpl_vars['image_verification']->value) { ?> <div class="ty-control-group"> <?php echo $_smarty_tpl->tpl_vars['image_verification']->value; ?> </div> <?php } ?> <div class="ty-account-benefits"> <?php echo $_smarty_tpl->__("text_profile_benefits"); ?> </div> <div class="ty-profile-field__buttons buttons-container"> <?php echo $_smarty_tpl->getSubTemplate("buttons/register_profile.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[profiles.update]"), 0); ?> </div> </form> </div> <?php $_smarty_tpl->_capture_stack[0][] = array("mainbox_title", null, null); ob_start(); echo $_smarty_tpl->__("register_new_account"); list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } } else { ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/profile_home_menu.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php $_smarty_tpl->_capture_stack[0][] = array("tabsbox", null, null); ob_start(); ?> <div class="ty-profile-field ty-account form-wrap" id="content_general"> <form name="profile_form" action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="post" enctype="multipart/form-data"> <input id="selected_section" type="hidden" value="general" name="selected_section"/> <input id="default_card_id" type="hidden" value="" name="default_cc"/> <input type="hidden" name="profile_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user_data']->value['profile_id'], ENT_QUOTES, 'UTF-8'); ?> " /> <?php $_smarty_tpl->_capture_stack[0][] = array("group", null, null); ob_start(); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => "C", 'title' => __("contact_information"), 'ls_upload_img_container' => true), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profiles_account.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("blocks/static_templates/profile_info.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0); ?> <?php if ($_smarty_tpl->tpl_vars['profile_fields']->value['B'] || $_smarty_tpl->tpl_vars['profile_fields']->value['S']) { ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['user_multiple_profiles'] == "Y" && $_smarty_tpl->tpl_vars['runtime']->value['mode'] == "update") { ?> <div class="clearfix profiles-profile_fields ls_select_profile_wrapper ls_profile_left_container"> <h3 class="ty-subheader"> <?php echo $_smarty_tpl->__("select_profile"); ?> </h3> <div class="ls_profile_contact_details_container"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/multiple_profiles.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('profile_id' => $_smarty_tpl->tpl_vars['user_data']->value['profile_id']), 0); ?> </div> <div class="ls_profile_contact_details_container"> <p><?php echo $_smarty_tpl->__("text_multiprofile_notice"); ?> </p> </div> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['address_position'] == "billing_first") { ?> <?php $_smarty_tpl->tpl_vars["first_section"] = new Smarty_variable("B", null, 0); ?> <?php $_smarty_tpl->tpl_vars["first_section_text"] = new Smarty_variable($_smarty_tpl->__("billing_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section"] = new Smarty_variable("S", null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section_text"] = new Smarty_variable($_smarty_tpl->__("shipping_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["body_id"] = new Smarty_variable("sa", null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["first_section"] = new Smarty_variable("S", null, 0); ?> <?php $_smarty_tpl->tpl_vars["first_section_text"] = new Smarty_variable($_smarty_tpl->__("shipping_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section"] = new Smarty_variable("B", null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section_text"] = new Smarty_variable($_smarty_tpl->__("billing_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["body_id"] = new Smarty_variable("ba", null, 0); ?> <?php } ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => $_smarty_tpl->tpl_vars['first_section']->value, 'body_id' => '', 'ship_to_another' => false, 'title' => $_smarty_tpl->tpl_vars['first_section_text']->value), 0); ?> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => $_smarty_tpl->tpl_vars['sec_section']->value, 'body_id' => $_smarty_tpl->tpl_vars['body_id']->value, 'ship_to_another' => $_smarty_tpl->tpl_vars['ship_to_another']->value, 'title' => $_smarty_tpl->tpl_vars['sec_section_text']->value, 'address_flag' => fn_compare_shipping_billing($_smarty_tpl->tpl_vars['profile_fields']->value)), 0); ?> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:account_update")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:account_update"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:account_update"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php echo $_smarty_tpl->getSubTemplate("common/image_verification.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('option' => "use_for_register", 'align' => "center"), 0); ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo Smarty::$_smarty_vars['capture']['group']; ?> <div class="ty-profile-field__buttons buttons-container"> <?php if ($_smarty_tpl->tpl_vars['runtime']->value['mode'] == "add") { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/register_profile.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[profiles.update]", 'but_id' => "save_profile_but"), 0); ?> <?php } else { ?> <?php echo $_smarty_tpl->getSubTemplate("buttons/save.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name' => "dispatch[profiles.update]", 'but_meta' => "ty-btn__secondary", 'but_id' => "save_profile_but"), 0); ?> <input class="ty-profile-field__reset ty-btn ty-btn__tertiary" type="reset" name="reset" value="<?php echo $_smarty_tpl->__("revert"); ?> " id="shipping_address_reset"/> <script type="text/javascript"> (function(_, $) { var address_switch = $('input:radio:checked', '.ty-address-switch'); $("#shipping_address_reset").on("click", function(e) { setTimeout(function() { address_switch.click(); }, 50); }); }(Tygh, Tygh.$)); </script> <?php } ?> </div> </form> </div> <?php $_smarty_tpl->_capture_stack[0][] = array("additional_tabs", null, null); ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['runtime']->value['mode'] == "update") { ?> <?php if (!fn_allowed_for("ULTIMATE:FREE")) { ?> <?php if ($_smarty_tpl->tpl_vars['usergroups']->value && !fn_check_user_type_admin_area($_smarty_tpl->tpl_vars['user_data']->value)) { ?> <div id="content_usergroups"> <table class="ty-table"> <tr> <th style="width: 30%"><?php echo $_smarty_tpl->__("usergroup"); ?> </th> <th style="width: 30%"><?php echo $_smarty_tpl->__("status"); ?> </th> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_usergroup_signup'] == "Y") { ?> <th style="width: 40%"><?php echo $_smarty_tpl->__("action"); ?> </th> <?php } ?> </tr> <?php $_smarty_tpl->tpl_vars['usergroup'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['usergroup']->_loop = false; $_from = $_smarty_tpl->tpl_vars['usergroups']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['usergroup']->key => $_smarty_tpl->tpl_vars['usergroup']->value) { $_smarty_tpl->tpl_vars['usergroup']->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['user_data']->value['usergroups'][$_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']]) { ?> <?php $_smarty_tpl->tpl_vars["ug_status"] = new Smarty_variable($_smarty_tpl->tpl_vars['user_data']->value['usergroups'][$_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id']]['status'], null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["ug_status"] = new Smarty_variable("F", null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_usergroup_signup'] == "Y" || $_smarty_tpl->tpl_vars['settings']->value['General']['allow_usergroup_signup'] != "Y" && $_smarty_tpl->tpl_vars['ug_status']->value == "A") { ?> <tr> <td><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['usergroup']->value['usergroup'], ENT_QUOTES, 'UTF-8'); ?> </td> <td class="ty-center"> <?php if ($_smarty_tpl->tpl_vars['ug_status']->value == "A") { ?> <?php echo $_smarty_tpl->__("active"); ?> <?php $_smarty_tpl->tpl_vars["_link_text"] = new Smarty_variable($_smarty_tpl->__("remove"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["_req_type"] = new Smarty_variable("cancel", null, 0); ?> <?php } elseif ($_smarty_tpl->tpl_vars['ug_status']->value == "F") { ?> <?php echo $_smarty_tpl->__("available"); ?> <?php $_smarty_tpl->tpl_vars["_link_text"] = new Smarty_variable($_smarty_tpl->__("join"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["_req_type"] = new Smarty_variable("join", null, 0); ?> <?php } elseif ($_smarty_tpl->tpl_vars['ug_status']->value == "D") { ?> <?php echo $_smarty_tpl->__("declined"); ?> <?php $_smarty_tpl->tpl_vars["_link_text"] = new Smarty_variable($_smarty_tpl->__("join"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["_req_type"] = new Smarty_variable("join", null, 0); ?> <?php } elseif ($_smarty_tpl->tpl_vars['ug_status']->value == "P") { ?> <?php echo $_smarty_tpl->__("pending"); ?> <?php $_smarty_tpl->tpl_vars["_link_text"] = new Smarty_variable($_smarty_tpl->__("cancel"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["_req_type"] = new Smarty_variable("cancel", null, 0); ?> <?php } ?> </td> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['allow_usergroup_signup'] == "Y") { ?> <td> <a class="cm-ajax" data-ca-target-id="content_usergroups" href="<?php echo htmlspecialchars(fn_url("profiles.usergroups?usergroup_id=" . (string) $_smarty_tpl->tpl_vars['usergroup']->value['usergroup_id'] . "&type=" . (string) $_smarty_tpl->tpl_vars['_req_type']->value), ENT_QUOTES, 'UTF-8'); ?> "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['_link_text']->value, ENT_QUOTES, 'UTF-8'); ?> </a> </td> <?php } ?> </tr> <?php } ?> <?php } ?> </table> <!--content_usergroups--></div> <?php } ?> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "profiles:tabs")); $_block_repeat = true; echo smarty_block_hook(array('name' => "profiles:tabs"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "profiles:tabs"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php echo Smarty::$_smarty_vars['capture']['additional_tabs']; ?> <?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } ?> <?php if (trim(Smarty::$_smarty_vars['capture']['additional_tabs']) != '') { ?> <?php echo $_smarty_tpl->getSubTemplate("common/tabsbox.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('content' => Smarty::$_smarty_vars['capture']['tabsbox'], 'active_tab' => $_REQUEST['selected_section'], 'track' => true), 0); ?> <?php } else { ?> <?php echo Smarty::$_smarty_vars['capture']['tabsbox']; ?> <?php } ?> <?php $_smarty_tpl->_capture_stack[0][] = array("mainbox_title", null, null); ob_start(); echo $_smarty_tpl->__("profile_details"); list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } } } }
function content_55d2f3636f2f12_11913114($_smarty_tpl) { if (!is_callable('smarty_block_hook')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/block.hook.php'; } if (!is_callable('smarty_function_set_id')) { include '/home/coriolan/public_html/lead/app/functions/smarty_plugins/function.set_id.php'; } fn_preload_lang_vars(array('change', 'billing_shipping_address', 'billing_shipping_address', 'billing_address', 'shipping_address', 'text_ship_to_billing', 'shipping_address', 'billing_address', 'text_billing_same_with_shipping', 'continue', 'change', 'billing_shipping_address', 'billing_shipping_address', 'billing_address', 'shipping_address', 'text_ship_to_billing', 'shipping_address', 'billing_address', 'text_billing_same_with_shipping', 'continue')); if ($_smarty_tpl->tpl_vars['runtime']->value['customization_mode']['design'] == "Y" && @constant('AREA') == "C") { $_smarty_tpl->_capture_stack[0][] = array("template_content", null, null); ob_start(); if ($_smarty_tpl->tpl_vars['runtime']->value['action']) { ?> <?php $_smarty_tpl->tpl_vars["_action"] = new Smarty_variable("." . (string) $_smarty_tpl->tpl_vars['runtime']->value['action'], null, 0); } ?> <div class="ty-step__container<?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> -active<?php } ?> ty-step-two" data-ct-checkout="billing_shipping_address" id="step_two"> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['checkout_style'] != "multi_page") { ?> <h3 class="ty-step__title<?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> -active<?php } if ($_smarty_tpl->tpl_vars['complete']->value && !$_smarty_tpl->tpl_vars['edit']->value) { ?> -complete<?php } ?> clearfix"> <span class="ty-step__title-left"><?php if (!$_smarty_tpl->tpl_vars['complete']->value || $_smarty_tpl->tpl_vars['edit']->value) { ?> 2<?php } if ($_smarty_tpl->tpl_vars['complete']->value && !$_smarty_tpl->tpl_vars['edit']->value) { ?> <i class="ty-step__title-icon ty-icon-ok"></i><?php } ?> </span> <i class="ty-step__title-arrow ty-icon-down-micro"></i> <?php if ($_smarty_tpl->tpl_vars['complete']->value && !$_smarty_tpl->tpl_vars['edit']->value) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "checkout:edit_link")); $_block_repeat = true; echo smarty_block_hook(array('name' => "checkout:edit_link"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <span class="ty-step__title-right"> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_meta' => "ty-btn__secondary cm-ajax", 'but_href' => "checkout.checkout?edit_step=step_two&from_step=" . (string) $_smarty_tpl->tpl_vars['edit_step']->value, 'but_target_id' => "checkout_*", 'but_text' => __("change"), 'but_role' => "tool"), 0); ?> </span> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "checkout:edit_link"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "checkout:edit_link_title")); $_block_repeat = true; echo smarty_block_hook(array('name' => "checkout:edit_link_title"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['complete']->value && !$_smarty_tpl->tpl_vars['edit']->value) { ?> <a class="ty-step__title-txt cm-ajax" href="<?php echo htmlspecialchars(fn_url("checkout.checkout?edit_step=step_two&from_step=" . (string) $_smarty_tpl->tpl_vars['edit_step']->value), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id="checkout_*"><?php echo $_smarty_tpl->__("billing_shipping_address"); ?> </a> <?php } else { ?> <span class="ty-step__title-txt"><?php echo $_smarty_tpl->__("billing_shipping_address"); ?> </span> <?php } ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "checkout:edit_link_title"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </h3> <?php } ?> <div id="step_two_body" class="ty-step__body<?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> -active<?php } if (!$_smarty_tpl->tpl_vars['edit']->value) { ?> hidden<?php } ?> cm-skip-save-fields"> <form name="step_two_billing_address" class="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_form']->value, ENT_QUOTES, 'UTF-8'); ?> cm-ajax-full-render" action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="<?php if (!$_smarty_tpl->tpl_vars['edit']->value) { ?> get<?php } else { ?> post<?php } ?> "> <input type="hidden" name="update_step" value="step_two" /> <input type="hidden" name="next_step" value="<?php if ($_REQUEST['from_step'] && $_REQUEST['from_step'] != "step_two" && $_REQUEST['from_step'] != "step_one") { echo htmlspecialchars($_REQUEST['from_step'], ENT_QUOTES, 'UTF-8'); } else { ?> step_three<?php } ?> " /> <input type="hidden" name="result_ids" value="checkout*,account*" /> <input type="hidden" name="dispatch" value="checkout.checkout" /> <?php if ($_REQUEST['profile'] == "new") { ?> <?php $_smarty_tpl->tpl_vars["hide_profile_name"] = new Smarty_variable(false, null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["hide_profile_name"] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> <div class="clearfix"> <div class="checkout__block"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/multiple_profiles.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('show_text' => true, 'hide_profile_name' => $_smarty_tpl->tpl_vars['hide_profile_name']->value, 'hide_profile_delete' => true, 'profile_id' => $_smarty_tpl->tpl_vars['cart']->value['profile_id'], 'create_href' => "checkout.checkout?edit_step=step_two&from_step=" . (string) $_smarty_tpl->tpl_vars['edit_step']->value . "&profile=new"), 0); ?> </div> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['address_position'] == "billing_first") { ?> <?php $_smarty_tpl->tpl_vars["first_section"] = new Smarty_variable("B", null, 0); ?> <?php $_smarty_tpl->tpl_vars["first_section_text"] = new Smarty_variable($_smarty_tpl->__("billing_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section"] = new Smarty_variable("S", null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section_text"] = new Smarty_variable($_smarty_tpl->__("shipping_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["ship_to_another_text"] = new Smarty_variable($_smarty_tpl->__("text_ship_to_billing"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["body_id"] = new Smarty_variable("sa", null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["first_section"] = new Smarty_variable("S", null, 0); ?> <?php $_smarty_tpl->tpl_vars["first_section_text"] = new Smarty_variable($_smarty_tpl->__("shipping_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section"] = new Smarty_variable("B", null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section_text"] = new Smarty_variable($_smarty_tpl->__("billing_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["ship_to_another_text"] = new Smarty_variable($_smarty_tpl->__("text_billing_same_with_shipping"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["body_id"] = new Smarty_variable("ba", null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> <?php if ($_smarty_tpl->tpl_vars['profile_fields']->value[$_smarty_tpl->tpl_vars['first_section']->value]) { ?> <div class="clearfix" data-ct-address="billing-address"> <div class="checkout__block"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => $_smarty_tpl->tpl_vars['first_section']->value, 'body_id' => '', 'ship_to_another' => true, 'title' => $_smarty_tpl->tpl_vars['first_section_text']->value), 0); ?> </div> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['profile_fields']->value[$_smarty_tpl->tpl_vars['sec_section']->value]) { ?> <div class="clearfix shipping-address__switch" data-ct-address="shipping-address"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => $_smarty_tpl->tpl_vars['sec_section']->value, 'body_id' => $_smarty_tpl->tpl_vars['body_id']->value, 'address_flag' => fn_compare_shipping_billing($_smarty_tpl->tpl_vars['profile_fields']->value), 'ship_to_another' => $_smarty_tpl->tpl_vars['cart']->value['ship_to_another'], 'title' => $_smarty_tpl->tpl_vars['sec_section_text']->value, 'grid_wrap' => "checkout__block"), 0); ?> </div> <?php } ?> <div class="ty-checkout-buttons"> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_meta' => "ty-btn__secondary", 'but_onclick' => "ls_checkout_estimation_cart_continue('checkout_step_two','dispatch[checkout.update_steps" . (string) $_smarty_tpl->tpl_vars['_action']->value . "]');", 'but_id' => "checkout_step_two", 'but_role' => "text", 'but_text' => __("continue")), 0); ?> </div> <?php } ?> </form> </div> <!--step_two--></div><?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) { $_smarty_tpl->assign($_capture_assign, ob_get_contents()); } if (isset($_capture_append)) { $_smarty_tpl->append($_capture_append, ob_get_contents()); } Smarty::$_smarty_vars['capture'][$_capture_buffer] = ob_get_clean(); } else { $_smarty_tpl->capture_error(); } if (trim(Smarty::$_smarty_vars['capture']['template_content'])) { if ($_smarty_tpl->tpl_vars['auth']->value['area'] == "A") { ?> <span class="cm-template-box template-box" data-ca-te-template="views/checkout/components/steps/step_two.tpl" id="<?php echo smarty_function_set_id(array('name' => "views/checkout/components/steps/step_two.tpl"), $_smarty_tpl); ?> "><div class="cm-template-icon icon-edit ty-icon-edit hidden"></div><?php echo Smarty::$_smarty_vars['capture']['template_content']; ?> <!--[/tpl_id]--></span><?php } else { echo Smarty::$_smarty_vars['capture']['template_content']; } } } else { if ($_smarty_tpl->tpl_vars['runtime']->value['action']) { ?> <?php $_smarty_tpl->tpl_vars["_action"] = new Smarty_variable("." . (string) $_smarty_tpl->tpl_vars['runtime']->value['action'], null, 0); } ?> <div class="ty-step__container<?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> -active<?php } ?> ty-step-two" data-ct-checkout="billing_shipping_address" id="step_two"> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['checkout_style'] != "multi_page") { ?> <h3 class="ty-step__title<?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> -active<?php } if ($_smarty_tpl->tpl_vars['complete']->value && !$_smarty_tpl->tpl_vars['edit']->value) { ?> -complete<?php } ?> clearfix"> <span class="ty-step__title-left"><?php if (!$_smarty_tpl->tpl_vars['complete']->value || $_smarty_tpl->tpl_vars['edit']->value) { ?> 2<?php } if ($_smarty_tpl->tpl_vars['complete']->value && !$_smarty_tpl->tpl_vars['edit']->value) { ?> <i class="ty-step__title-icon ty-icon-ok"></i><?php } ?> </span> <i class="ty-step__title-arrow ty-icon-down-micro"></i> <?php if ($_smarty_tpl->tpl_vars['complete']->value && !$_smarty_tpl->tpl_vars['edit']->value) { ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "checkout:edit_link")); $_block_repeat = true; echo smarty_block_hook(array('name' => "checkout:edit_link"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <span class="ty-step__title-right"> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_meta' => "ty-btn__secondary cm-ajax", 'but_href' => "checkout.checkout?edit_step=step_two&from_step=" . (string) $_smarty_tpl->tpl_vars['edit_step']->value, 'but_target_id' => "checkout_*", 'but_text' => __("change"), 'but_role' => "tool"), 0); ?> </span> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "checkout:edit_link"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> <?php } ?> <?php $_smarty_tpl->smarty->_tag_stack[] = array('hook', array('name' => "checkout:edit_link_title")); $_block_repeat = true; echo smarty_block_hook(array('name' => "checkout:edit_link_title"), null, $_smarty_tpl, $_block_repeat); while ($_block_repeat) { ob_start(); ?> <?php if ($_smarty_tpl->tpl_vars['complete']->value && !$_smarty_tpl->tpl_vars['edit']->value) { ?> <a class="ty-step__title-txt cm-ajax" href="<?php echo htmlspecialchars(fn_url("checkout.checkout?edit_step=step_two&from_step=" . (string) $_smarty_tpl->tpl_vars['edit_step']->value), ENT_QUOTES, 'UTF-8'); ?> " data-ca-target-id="checkout_*"><?php echo $_smarty_tpl->__("billing_shipping_address"); ?> </a> <?php } else { ?> <span class="ty-step__title-txt"><?php echo $_smarty_tpl->__("billing_shipping_address"); ?> </span> <?php } ?> <?php $_block_content = ob_get_clean(); $_block_repeat = false; echo smarty_block_hook(array('name' => "checkout:edit_link_title"), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack); ?> </h3> <?php } ?> <div id="step_two_body" class="ty-step__body<?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> -active<?php } if (!$_smarty_tpl->tpl_vars['edit']->value) { ?> hidden<?php } ?> cm-skip-save-fields"> <form name="step_two_billing_address" class="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['ajax_form']->value, ENT_QUOTES, 'UTF-8'); ?> cm-ajax-full-render" action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8'); ?> " method="<?php if (!$_smarty_tpl->tpl_vars['edit']->value) { ?> get<?php } else { ?> post<?php } ?> "> <input type="hidden" name="update_step" value="step_two" /> <input type="hidden" name="next_step" value="<?php if ($_REQUEST['from_step'] && $_REQUEST['from_step'] != "step_two" && $_REQUEST['from_step'] != "step_one") { echo htmlspecialchars($_REQUEST['from_step'], ENT_QUOTES, 'UTF-8'); } else { ?> step_three<?php } ?> " /> <input type="hidden" name="result_ids" value="checkout*,account*" /> <input type="hidden" name="dispatch" value="checkout.checkout" /> <?php if ($_REQUEST['profile'] == "new") { ?> <?php $_smarty_tpl->tpl_vars["hide_profile_name"] = new Smarty_variable(false, null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["hide_profile_name"] = new Smarty_variable(true, null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> <div class="clearfix"> <div class="checkout__block"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/multiple_profiles.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('show_text' => true, 'hide_profile_name' => $_smarty_tpl->tpl_vars['hide_profile_name']->value, 'hide_profile_delete' => true, 'profile_id' => $_smarty_tpl->tpl_vars['cart']->value['profile_id'], 'create_href' => "checkout.checkout?edit_step=step_two&from_step=" . (string) $_smarty_tpl->tpl_vars['edit_step']->value . "&profile=new"), 0); ?> </div> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['settings']->value['General']['address_position'] == "billing_first") { ?> <?php $_smarty_tpl->tpl_vars["first_section"] = new Smarty_variable("B", null, 0); ?> <?php $_smarty_tpl->tpl_vars["first_section_text"] = new Smarty_variable($_smarty_tpl->__("billing_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section"] = new Smarty_variable("S", null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section_text"] = new Smarty_variable($_smarty_tpl->__("shipping_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["ship_to_another_text"] = new Smarty_variable($_smarty_tpl->__("text_ship_to_billing"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["body_id"] = new Smarty_variable("sa", null, 0); ?> <?php } else { ?> <?php $_smarty_tpl->tpl_vars["first_section"] = new Smarty_variable("S", null, 0); ?> <?php $_smarty_tpl->tpl_vars["first_section_text"] = new Smarty_variable($_smarty_tpl->__("shipping_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section"] = new Smarty_variable("B", null, 0); ?> <?php $_smarty_tpl->tpl_vars["sec_section_text"] = new Smarty_variable($_smarty_tpl->__("billing_address"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["ship_to_another_text"] = new Smarty_variable($_smarty_tpl->__("text_billing_same_with_shipping"), null, 0); ?> <?php $_smarty_tpl->tpl_vars["body_id"] = new Smarty_variable("ba", null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['edit']->value) { ?> <?php if ($_smarty_tpl->tpl_vars['profile_fields']->value[$_smarty_tpl->tpl_vars['first_section']->value]) { ?> <div class="clearfix" data-ct-address="billing-address"> <div class="checkout__block"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => $_smarty_tpl->tpl_vars['first_section']->value, 'body_id' => '', 'ship_to_another' => true, 'title' => $_smarty_tpl->tpl_vars['first_section_text']->value), 0); ?> </div> </div> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['profile_fields']->value[$_smarty_tpl->tpl_vars['sec_section']->value]) { ?> <div class="clearfix shipping-address__switch" data-ct-address="shipping-address"> <?php echo $_smarty_tpl->getSubTemplate("views/profiles/components/profile_fields.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('section' => $_smarty_tpl->tpl_vars['sec_section']->value, 'body_id' => $_smarty_tpl->tpl_vars['body_id']->value, 'address_flag' => fn_compare_shipping_billing($_smarty_tpl->tpl_vars['profile_fields']->value), 'ship_to_another' => $_smarty_tpl->tpl_vars['cart']->value['ship_to_another'], 'title' => $_smarty_tpl->tpl_vars['sec_section_text']->value, 'grid_wrap' => "checkout__block"), 0); ?> </div> <?php } ?> <div class="ty-checkout-buttons"> <?php echo $_smarty_tpl->getSubTemplate("buttons/button.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_meta' => "ty-btn__secondary", 'but_onclick' => "ls_checkout_estimation_cart_continue('checkout_step_two','dispatch[checkout.update_steps" . (string) $_smarty_tpl->tpl_vars['_action']->value . "]');", 'but_id' => "checkout_step_two", 'but_role' => "text", 'but_text' => __("continue")), 0); ?> </div> <?php } ?> </form> </div> <!--step_two--></div><?php } }