"
if (amount_note_display !== '' || parseInt(amount_note_display) == 1) {
addtocart_html = addtocart_html + "
"
} else {
addtocart_html = addtocart_html + "
"
}
var relation = data['relationship']
var all_html = ''
var all_phone_js = ''
if(data['relationship_option'].length != 0){
var hulkapps_required_html = "
"
$.each(data['relationship_option'], function(key, val){
var option = parseInt(val[0])
let com_con_ids = [];
for (const [ key, value ] of Object.entries(a)) {
if(value.includes(option)){
com_con_ids.push(key);
}
}
var required = val[1]
if(data['option_id_array'].indexOf(option) >= 0){
var option_name = $.trim(data['option_associative_array'][option]['option_name'])
var tooltip_text = $.trim(data['option_associative_array'][option]['tooltip'])
var helptext = $.trim(data['option_associative_array'][option]['helptext'])
var placeholder = $.trim(data['option_associative_array'][option]['placeholder'])
var tooltip = (tooltip_text.length > 0) ? "
" : ''
var helptext_html = (helptext.length > 0) ? "
"+helptext+" " : ''
var option_limit = data['option_associative_array'][option]['extra_field']
var option_type = data['option_associative_array'][option]['option_type']
var option_id = option
var values_json = $.parseJSON(data['option_associative_array'][option]['values_json'])
var is_hide_arr = data['hide_show_array'][option_id] ? data['hide_show_array'][option_id] : ''
let is_com_arr = ''
let new_action_type = ''
com_con_ids.forEach((item) => {
$.each(data['condition'], function (index, con) {
let condition_id = con['id']
var conditions = hulkapps_jQuery.parseJSON(con['conditions'])
if(condition_id == item){
$.each(conditions['actions'], function (index, action) {
if (parseInt(action['action_type']) == 1 && is_hide_arr.includes("condition_show")) {
new_action_type = 'show';
is_com_arr += " conditional_logic_" + item + "_" + new_action_type
return false;
}
else{
if(is_hide_arr.includes("condition_hide")){
new_action_type = 'hide';
is_com_arr += " conditional_logic_" + item + "_" + new_action_type
return false;
}
}
});
}
});
})
var is_required = required == 'required' ? "required" : ''
var is_inline = parseInt(option_name_inline) == 0 ? 'full_width' : ''
var is_required_html = required == 'required' ? hulkapps_required_html : ''
var is_enabled_tooltip = data['options_container_style']['enable_tooltip']=='1' ? tooltip : ''
var is_enable_helptext = enable_helptext=='1' ? "
"+helptext_html+"
" : ''
if(option_type == 'dropdown'){
html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip + " : " + is_enable_helptext+"
"
html += "
"
html += "--Choose "+option_name+"-- "
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1=(price != null && price != "" ) ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp2=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var default_value = (typeof(ovalue[6]) == 'undefined') == true ? (ovalue[4] != undefined) ? (ovalue[4] == 'true' || ovalue[4] == 'false') ? ovalue[4] : ovalue[2] : ovalue[2] : ovalue[4]
//var default_value = (ovalue[6] != undefined) ? ovalue[4] : ovalue[2]
var selectedopt = (default_value == true) ? "selected" : ''
var opt_class = vprice != '' ? 'price-change' : ''
html = html + ""+ovalue[0].toString().trim()+vp2+" "
});
html += "
"
all_html = all_html + html
}else if(option_type=='dropdown_multiple'){
var min_selection = option_limit != undefined && option_limit != '' && option_limit['minimum_selection'] != '' && option_limit['minimum_selection'] != undefined ? option_limit['minimum_selection'].toString() : '0'
var max_selection = option_limit != undefined && option_limit != '' && option_limit['maximum_selection'] != '' && option_limit['maximum_selection'] != undefined ? option_limit['maximum_selection'].toString() : '0'
var selection_text = (min_selection != '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])) ? '[Choose from '+ min_selection +' to '+ max_selection +' values]' : (min_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])) ? '[Choose atleast '+ min_selection +' values]' : (max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])) ? '[Choose upto '+ max_selection +' values]': ''
var html = "
"
var data_min = min_selection != undefined ? min_selection : ''
var data_max = max_selection != undefined ? max_selection : ''
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip + " :
"+ selection_text + is_enable_helptext +"
"
html += "
"
html += ""
var valueofhiddenprop = []
var default_count = 0
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1=(price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp2=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price :'0.00'
var default_value = (typeof(ovalue[6]) == 'undefined') == true ? (ovalue[4] != undefined) ? (ovalue[4] == 'true' || ovalue[4] == 'false') ? ovalue[4] : ovalue[2] : ovalue[2] : ovalue[4]
if(default_value == true ){
default_count += 1
valueofhiddenprop.push(ovalue[0].toString().trim()+vp1)
}
var selectedopt = (default_value == true) ? "selected" : ''
var opt_class = vprice != '' ? 'price-change' : ''
html = html + ""+ovalue[0].toString().trim()+vp2+" "
});
if(default_count > 0){
if (min_selection != '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) < parseInt(min_selection) || parseInt(default_count) > parseInt(max_selection)){
html += " Choose from "+min_selection+" to "+max_selection+" values "
}
}
else if(min_selection != '0' && max_selection == '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) < parseInt(min_selection)){
html += "Choose atleast "+min_selection+" values "
}
}
else if(min_selection == '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) > parseInt(max_selection)){
html += "Choose upto "+max_selection+" values "
}
}
}
var validation_error = ''
html += "
"
all_html = all_html + html
}else if(option_type=='swatch'){
var swatchcount=0
var html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip + " : " + is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var swatch_text = (ovalue[0] != '') ? ovalue[0]:''
var swatch_type = (ovalue[2] != '') ? ovalue[2]:''
var swatch_val = (ovalue[3] != '') ? ovalue[3]:''
var vp1=(price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var opt_class = vprice != '' ? 'price-change' : ''
var default_value = (typeof(ovalue[8]) == 'undefined') == true ? (ovalue[6] != undefined) ? (ovalue[6] == 'true' || ovalue[6] == 'false') ? ovalue[6] : ovalue[4] : ovalue[4] : ovalue[6]
//var default_value = (ovalue[8] != undefined) ? ovalue[6] : ovalue[4]
var selectedopt = (default_value == true) ? "swatch_selected" : ''
var checkdopt = (default_value == true) ? "checked" : ''
var swatch_title = "
"+ovalue[0]+" "+vp+"
"
var s_image = ''
if(swatch_type=='image'){
swatch_style="background-image:url("+swatch_val+"); background-size:cover;background-position: center center;"+round_corners+""
swatch_image="data-image='"+swatch_val+"'"
s_image = swatch_val
}else{
try {
var swatch_color_option = swatch_val.split(",")
}
catch(err) {
swatch_color_option = null
}
if(swatch_color_option != null){
if(swatch_color_option[1] != undefined){
swatch_color_dual_ton = "background: linear-gradient(to bottom, "+swatch_color_option[0]+" 0%, "+swatch_color_option[0]+" 50%, "+swatch_color_option[1]+" 50%, "+swatch_color_option[1]+" 100%); "+round_corners+""
var swatch_style=swatch_color_dual_ton
var swatch_image="data-image=''"
}else{
var swatch_style="background-color:"+swatch_color_option[0]+";"+round_corners+""
var swatch_image="data-image=''"
}
}
}
if(swatch_title != undefined){
if(swatch_val != undefined){
if(tooltip_contains=="both"){
var titlee ="
"
}else if(tooltip_contains=="image_only"){
titlee ="
"
}else{
titlee = "
"
}
}else{
titlee ="
"
}
}else{
titlee = "
"
}
tooltip_val = "
"
tooltip_display_html = parseInt(tooltip_display) == 1 ? tooltip_val : ''
swatch_with_text = parseInt(enable_swatch_with_text) == 1 ? swatch_text : ''
html += "
"+swatch_with_text+"
"
swatchcount += 1
});
html += "
"
all_html = all_html + html
}else if(option_type=='button'){
if(checkPlan('button_option','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) ){
var buttoncount=0
var html = "
"
all_html = all_html + html
}
}else if(option_type=='swatch_multiple'){
var min_selection = option_limit != undefined && option_limit['minimum_selection'] != undefined && option_limit != '' && option_limit['minimum_selection'] != '' ? option_limit['minimum_selection'].toString() : '0'
var max_selection = option_limit != undefined && option_limit['maximum_selection'] != undefined && option_limit != '' && option_limit['maximum_selection'] != '' ? option_limit['maximum_selection'].toString() : '0'
var swatchcount=0
var selection_text = (min_selection != '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])) ? '[Choose from '+ min_selection +' to '+ max_selection +' values]' : (min_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])) ? '[Choose atleast '+ min_selection +' values]' : (max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])) ? '[Choose upto '+ max_selection +' values]': ''
var html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip + " : " +"
"+selection_text+" "+is_enable_helptext+"
"
html += "
"
var valueofhiddenprop = []
var default_count = 0
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var swatch_text = (ovalue[0] != '') ? ovalue[0]:''
var swatch_type = (ovalue[2] != '') ? ovalue[2]:''
var swatch_val = (ovalue[3] != '') ? ovalue[3]:''
var vp1=(price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var opt_class = vprice != '' ? 'price-change' : ''
var default_value = (typeof(ovalue[8]) == 'undefined') == true ? (ovalue[6] != undefined) ? (ovalue[6] == 'true' || ovalue[6] == 'false') ? ovalue[6] : ovalue[4] : ovalue[4] : ovalue[6]
//var default_value = (typeof(ovalue[8]) == 'undefined') == true ? ovalue[4] : ovalue[6]
if(default_value == true){
default_count += 1
valueofhiddenprop.push(ovalue[0].toString().trim()+vp1)
}
var selectedopt = (default_value == true) ? "swatch_selected" : ''
var checkdopt = (default_value == true) ? "checked" : ''
var swatch_title = "
"+ovalue[0]+" "+vp+"
"
var s_image = ''
if(swatch_type=='image'){
swatch_style="background-image:url("+swatch_val+");background-size:cover;background-position: center center;"+round_corners+""
swatch_image="data-image='"+swatch_val+"'"
s_image = swatch_val
}else{
try {
var swatch_color_option = swatch_val.split(",")
}
catch(err) {
swatch_color_option = null
}
if(swatch_color_option != null){
if(swatch_color_option[1] != null){
swatch_color_dual_ton = "background: linear-gradient(to bottom, "+swatch_color_option[0]+" 0%, "+swatch_color_option[0]+" 50%, "+swatch_color_option[1]+" 50%, "+swatch_color_option[1]+" 100%); "+round_corners+""
var swatch_style=swatch_color_dual_ton
var swatch_image="data-image=''"
}else{
var swatch_style="background-color:"+swatch_color_option[0]+";"+round_corners+""
var swatch_image="data-image=''"
}
}
}
if(swatch_title != undefined){
if(swatch_val != ''){
if(tooltip_contains=="both"){
var titlee ="
"
}else if(tooltip_contains=="image_only"){
titlee ="
"
}else{
titlee = "
"
}
}else{
titlee ="
"
}
}else{
titlee = "
"
}
tooltip_val = "
"
tooltip_display_html = parseInt(tooltip_display) == 1 ? tooltip_val : ''
swatch_with_text = parseInt(enable_swatch_with_text) == 1 ? swatch_text : ''
html += "
"+swatch_with_text+"
"
swatchcount += 1
});
if(enable_swatch_images == 1){
html += "var swatch_image_url = "+$(this).find('.swatch_radio').attr('data-image')+"if ("+swatch_image_url+" != ''){$('.hulkapps_swatch_image_change img').attr('src',"+swatch_image_url+");$('.hulkapps_swatch_image_change img').attr('srcset',"+swatch_image_url+");$('.hulkapps_swatch_image_change img').attr('data-srcset',"+swatch_image_url+");}"
}
if(default_count > 0){
if (min_selection != '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) < parseInt(min_selection) || parseInt(default_count) > parseInt(max_selection)){
html += "
Choose from "+min_selection+" to "+max_selection+" values "
}
}
else if(min_selection != '0' && max_selection == '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) < parseInt(min_selection)){
html += "
Choose atleast "+min_selection+" values "
}
}
else if(min_selection == '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) > parseInt(max_selection)){
html += "
Choose upto "+max_selection+" values "
}
}
}
var validation_error = '
'
html += " "
all_html = all_html + html
}else if(option_type=='checkbox'){
var min_selection = option_limit != undefined && option_limit != '' && option_limit['minimum_selection'] != undefined && option_limit['minimum_selection'] != '' ? option_limit['minimum_selection'].toString() : '0'
var max_selection = option_limit != undefined && option_limit != '' && option_limit['maximum_selection'] != undefined && option_limit['maximum_selection'] != '' ? option_limit['maximum_selection'].toString() : '0'
var is_single_line = parseInt(single_line) == 1 ? 'single_line' : ''
var selection_text = (min_selection != '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])) ? '[Choose from '+ min_selection +' to '+ max_selection +' values]' : (min_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'])) ? '[Choose atleast '+ min_selection +' values]' : (max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])) ? '[Choose upto '+ max_selection +' values]': ''
var html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip + " : " +"
"+selection_text+" "+is_enable_helptext+"
"
html += "
"
var valueofhiddenprop = []
var default_count = 0
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1=(price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp2=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var default_value = (typeof(ovalue[6]) == 'undefined') == true ? (ovalue[4] != undefined) ? (ovalue[4] == 'true' || ovalue[4] == 'false') ? ovalue[4] : ovalue[2] : ovalue[2] : ovalue[4]
//var default_value = (ovalue[6] != undefined) ? ovalue[4] : ovalue[2]
if(default_value == true){
default_count += 1
valueofhiddenprop.push(ovalue[0].toString().trim()+vp1)
}
var selectedopt = (default_value == true) ? "checked" : ''
var opt_class = vprice != '' ? 'price-change' : ''
html += " "+ovalue[0].toString().trim()+vp2+" "
});
if(default_count > 0){
if (min_selection != '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) < parseInt(min_selection) || parseInt(default_count) > parseInt(max_selection)){
html += "Choose from "+min_selection+" to "+max_selection+" values "
}
}
else if(min_selection != '0' && max_selection == '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) < parseInt(min_selection)){
html += "Choose atleast "+min_selection+" values "
}
}
else if(min_selection == '0' && max_selection != '0' && checkPlan('validation_for_min_max_option_selection','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period'])){
if (parseInt(default_count) > parseInt(max_selection)){
html += "Choose upto "+max_selection+" values "
}
}
}
var validation_error = ''
html += "
"
all_html = all_html + html
}else if(option_type=='textbox'){
var cc = ''
var is_option_limit = option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined ? '[Maximum '+ option_limit['character_limit']+' character]' : ''
var html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip+" :
"+is_option_limit+" "+is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1 = (price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var maxlength_limit = ''
var opt_class = vprice != '' ? 'price-change' : ''
if(option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined){
maxlength_limit = "maxlength="+option_limit['character_limit']+""
}
html += "
"
if(option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined){
html += "
"+option_limit['character_limit']+ " "+data['display_settings']['charcter_count_message']+"
"
}
cc += ""
});
html = html + cc + "
"
all_html = all_html + html
}else if(option_type=='textarea'){
var cc = ''
var is_option_limit = option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined ? '[Maximum '+ option_limit['character_limit']+' character]' : ''
var html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip+" :
"+is_option_limit+" "+is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1 = (price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var maxlength_limit = ''
var opt_class = vprice != '' ? 'price-change' : ''
if(option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined){
maxlength_limit = "maxlength="+option_limit['character_limit']+""
}
html += "
"
html += "
"
if(option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined){
html += "
"+option_limit['character_limit']+ " "+data['display_settings']['charcter_count_message']+"
"
}
cc += ""
});
html = html + cc + "
"
all_html = all_html + html
}else if(option_type=='radiobutton'){
var rbcount = 0
var is_single_line = parseInt(single_line) == 1 ? 'single_line' : ''
html = "
"
html += "
"+option_name+" "+is_required_html+" "+is_enabled_tooltip+" : "+is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1=(price != null && price != "" ) ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp2=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var default_value = (typeof(ovalue[6]) == 'undefined') == true ? (ovalue[4] != undefined) ? (ovalue[4] == 'true' || ovalue[4] == 'false') ? ovalue[4] : ovalue[2] : ovalue[2] : ovalue[4]
//var default_value = (ovalue[6] != undefined) ? ovalue[4] : ovalue[2]
var selectedopt = (default_value == true) ? "radio_selected" : ''
var checkdopt = (default_value == true) ? "checked" : ''
var opt_class = vprice != '' ? 'price-change' : ''
html += "
"+ovalue[0].toString().trim()+vp2+"
"
rbcount += 1
});
html += "
"
all_html = all_html + html
}else if(option_type=='file_upload'){
html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip +" : "+is_enable_helptext+"
"
html += "
"
all_html = all_html + html
}else if(option_type=='email'){
var cc = ''
html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip + " : "+is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1=(price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp2=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var opt_class = vprice != '' ? 'price-change' : ''
//var default_value = (ovalue[6] != undefined) ? ovalue[4] : ovalue[2]
html += " "
cc += ""
});
html = html + cc + "
"
all_html = all_html + html
}else if(option_type=='date_picker'){
var cc = ''
html = "
"
html += "
"+option_name+" "+is_required_html+" "+is_enabled_tooltip+" : "+is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1=(price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp2=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var opt_class = vprice != '' ? 'price-change' : ''
html += " "
cc = cc+""
});
html = html + cc + "
"
all_html = all_html + html
}else if(option_type=='color_picker'){
if(checkPlan('color_picker_option','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) ){
var cc = ''
html = "
"
html += "
"+option_name+" "+is_required_html+" "+is_enabled_tooltip+" : "+is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1=(price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vp2=(price != null && price != "") ? "(+"+data['currency_symbol']+price+")" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var opt_class = vprice != '' ? 'price-change' : ''
html += " "
cc = cc+""
});
html = html + cc + "
"
all_html = all_html + html
}
}else if(option_type=='number_field'){
cc = ''
var char_limit = option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined
var is_option_limit = option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined ? '[Maximum '+ option_limit['character_limit']+' character]' : ''
var html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip+" :
"+is_option_limit+" "+is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1 = (price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var maxlength_limit = ''
var length_validation = ''
var opt_class = vprice != '' ? 'price-change' : ''
if(option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined){
maxlength_limit = "maxlength="+option_limit['character_limit']+""
length_validation = "onKeyPress='if(this.value.length=="+option_limit['character_limit']+") return false;'"
}
html += "
"
if(option_limit != undefined && checkPlan('character_limit','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) && option_limit['character_limit'] != '' && option_limit['character_limit'] != undefined){
html += "
"+option_limit['character_limit'] + " " +data['display_settings']['charcter_count_message']+"
"
}
cc += ""
});
html = html + cc + "
"
all_html = all_html + html
}else if(option_type=='phone_number'){
var cc = ''
var phone_option = true
var phone_number_js = ''
var html = "
"
html += "
"+option_name + " " + is_required_html + " " + is_enabled_tooltip +" : "+is_enable_helptext+"
"
html += "
"
$.each(values_json, function(index,ovalue){
var price = ovalue[1]
var vp1 = (price != null && price != "") ? " [ "+data['currency_symbol']+price+" ]" : ""
var vprice=(price != null && price != "") ? price:'0.00'
var opt_class = vprice != '' ? 'price-change' : ''
html += "✓ Valid Invalid number "
cc += ""
});
html = html + cc + "
"
all_html = all_html + html
}else if(option_type=='hidden'){
if(checkPlan('hidden_field_option','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) ){
var html = "
"
html += "
"
$.each(values_json, function(index,ovalue){
var val = ovalue[0]
html += " "
});
html = html + "
"
all_html = all_html + html
}
}else if(option_type=='popup'){
if(checkPlan('popup_option','boolean',data['plan_id'], data['plans_features'],data['is_on_trial_period']) ){
html = ""
all_html = all_html + html
}
}
}
});
var currency_hidden_field = "
"
if(all_html !== ''){
addtocart_html = addtocart_html + all_html + currency_hidden_field
}
addtocart_html += "
"
if( parseInt(amount_note_display) == 1 || amount_note_display == ''){
addtocart_html += "
"
}
addtocart_html += "