CALCULATOR GROUP

Cost Calculator Group is a container element and it inludes JS pseudo code field which allows you to create calculation logic for your cost calculator instance. On the following example calculation is: Total = (Item Type * Number of Items) + (Number of Items * Include Shipping * 1.5)

[bt_cost_calculator currency_after=”yes” email_client=”yes” m_name=”Mandatory” m_phone=”Mandatory” m_address=”Mandatory” m_message=”Mandatory” show_booking=”yes” m_date=”Mandatory” m_time=”Mandatory” time_start=”09:00″ time_end=”18:00″ admin_email=”info@bold-themes.com” paypal_currency=”USD” currency=”$” subject=”This is email subject” accent_color=”#1e73be” el_class=”this_is_extra_class”][bt_cc_group eval=”var type = $1;
var number_items = $2;
var shipping = $3;

var result = number_items * type + shipping * number_items * 1.5;

return result;”][bt_cc_select name=”Item Type” value=”Type 1;50;This is item type 1 – $50
Type 2;100;This is item type 2 – $100″][bt_cc_slider name=”Number of Items ($1)” value_max=”10″ value_step=”1″ value_unit=”1″ value_min=”0″][bt_cc_switch name=”Include Shipping ($10)” value_off=”0″ value_on=”10″][/bt_cc_group][/bt_cost_calculator]

CONDITIONS

Cost Calculator conditional logic allows you to show or hide fields depending on the item value. You can use any jQuery transition (show, hode, fade…) and lock fields for editing. In this example first select list turns on the switch&slider group in which switch controls the appearance of the the slider.

[bt_cost_calculator currency_after=”yes” email_client=”yes” m_name=”Mandatory” m_phone=”Mandatory” m_address=”Mandatory” m_message=”Mandatory” show_booking=”yes” m_date=”Mandatory” m_time=”Mandatory” time_start=”09:00″ time_end=”18:00″ admin_email=”info@bold-themes.com” paypal_currency=”USD” currency=”$” subject=”This is email subject” accent_color=”#1e73be” el_class=”this_is_extra_class”][bt_cc_select name=”Item Type” value=”Type 1;50;This is item type 1 – $50
Type 2;100;This is item type 2 – $100″ condition=”==0;demoGroup;fadeTo(‘slow’, 0.2);lock;
#gt#0;demoGroup;fadeTo(‘slow’, 1);unlock;” item_el_id=”demoSelect”][bt_cc_group eval=”var number_items = $1;
var shipping = $2;
var result = 0;

if ( shipping #gt# 0 ) {
result = shipping * number_items;
} else {
result = number_items * 2;
}

return result;” item_el_id=”demoGroup”][bt_cc_switch name=”Include Shipping ($10)” value_off=”0″ value_on=”10″ item_el_id=”demoSwitch” condition=”==0;demoSlider;hide();
#gt#0;demoSlider;show(); “][bt_cc_slider name=”Number of Items ($1)” value_max=”10″ value_step=”1″ value_unit=”1″ value_min=”0″ item_el_id=”demoSlider”][/bt_cc_group][/bt_cost_calculator]