legacy T-shirt no7

These colorful T-shirts show that you are a part of the-freelance-editor team—and that you support our work and our efforts to help writers. Truth is, they were so popular we redesigned them and brought them back from the past!   Volume pricing and B2B discount options available upon request.

Home / Shop

legacy T-shirt no7

0 Reviews
$34.95
legacy T-shirt no7
legacy T-shirt no7
legacy T-shirt no7
legacy T-shirt no7
legacy T-shirt no7
legacy T-shirt no7

Home / Shop

legacy T-shirt no7

$34.95
Model Number: 8074824
show your support with one of our colorful marketing T-shirts; all prices include S&H!
Missing Option: Select a size
Loading Available Options
Maximum quantity exceeded
Minimum purchase amount of 0 is required
Maximum purchase amount of 0 is allowed
Your Price: $34.95
34.950
A one-time price of $34.95 will be added to your order.
  • Description
  • Specifications
  • Customer Reviews (0)

These colorful T-shirts show that you are a part of the-freelance-editor team—and that you support our work and our efforts to help writers. Truth is, they were so popular we redesigned them and brought them back from the past!   Volume pricing and B2B discount options available upon request.

• printed on front and rear (different text) of shirt
• this shirt style available only in black text with yellow shadowing on blue shirt
• heavy 6.1 oz cotton T-shirt, manufactured by Port & Company®: 100% preshrunk cotton
• 1x1 rib knit collar with overseamed neck; shoulder-to-shoulder taping
• double-needle stitched bottom hem and sleeves

There are no reviews yet, submit yours in the box provided.
Submitting Your Review, Please Wait
Your Review Has Been Submitted Successfully

Add a review for legacy T-shirt no7

You must include a title, rating, and message in your review.
Your Review Title
Your Rating
Your Review
' ); } else { jQuery( '.ec_details_main_image_12_1' ).append( '
' ); } jQuery( '.ec_details_large_popup_main_12_1' ).find( 'img' ).attr( 'src', src ); jQuery( '.ec_details_magbox_12_1' ).addClass( 'inactive' ); jQuery( '.ec_details_magbox_image_12_1' ).css( 'background', 'url( "' + src + '" ) no-repeat' ); } else { var src = jQuery( this ).find( 'img' ).attr( 'src' ); jQuery( '.ec_details_main_image_12_1' ).find( 'img' ).attr( 'src', src ).show(); jQuery( '.ec_details_main_image_12_1' ).find( '.wp-easycart-video-box' ).remove(); jQuery( '.ec_details_large_popup_main_12_1' ).find( 'img' ).attr( 'src', src ); jQuery( '.ec_details_magbox_12_1' ).removeClass( 'inactive' ); jQuery( '.ec_details_magbox_image_12_1' ).css( 'background', 'url( "' + src + '" ) no-repeat' ); } return false; }); jQuery( '.ec_details_large_popup_thumbnail_12_1' ).click( function( e ){ var src = jQuery( this ).find( 'img' ).attr( 'src' ); jQuery( '.ec_details_large_popup_thumbnail_12_1' ).removeClass( 'ec_active' ); jQuery( this ).addClass( 'ec_active' ); jQuery( '.ec_details_thumbnail_12_1' ).removeClass( 'ec_active' ); jQuery( '.ec_details_main_image_12_1' ).find( 'img' ).attr( 'src', src ); jQuery( '.ec_details_large_popup_main_12_1' ).find( 'img' ).attr( 'src', src ); jQuery( '.ec_details_magbox_image_12_1' ).css( 'background', 'url( "' + src + '" ) no-repeat' ); }); jQuery( '.ec_minus' ).click( function( ){ ec_details_base_adjust_price_12_1( );} ); jQuery( '.ec_plus' ).click( function( ){ ec_details_base_adjust_price_12_1( );} ); jQuery( document.getElementById( 'ec_quantity_12_1' ) ).change( function( ){ ec_details_base_adjust_price_12_1( );} ); jQuery( document.getElementById( 'ec_donation_amount_12_1' ) ).change( function( ){ ec_details_base_adjust_price_12_1( );} ); jQuery( '.ec_details_tab_12_1' ).click( function( ){ jQuery( '.ec_details_tab_12_1' ).removeClass( 'ec_active' ); jQuery( this ).addClass( 'ec_active' ); jQuery( '.ec_details_extra_area_12_1' ).children( 'div' ).each( function( ){ jQuery( this ).hide( ) } ); if( jQuery( this ).hasClass( 'ec_description' ) ) jQuery( '.ec_details_description_tab_12_1' ).show( ); else if( jQuery( this ).hasClass( 'ec_specifications' ) ) jQuery( '.ec_details_specifications_tab_12_1' ).show( ); else if( jQuery( this ).hasClass( 'ec_customer_reviews' ) ) jQuery( '.ec_details_customer_reviews_tab_12_1' ).show( ); else jQuery( '.ec_details_' + jQuery( this ).attr( 'data-tab-id' ) + '_tab' ).show( ); } ); jQuery( '.ec_details_swatches > li.ec_option1_12_1' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_1 = jQuery( this ).attr( 'data-optionitem-id' ); var quantity = jQuery( this ).attr( 'data-optionitem-quantity' ); ec_option1_image_change_12_1( optionitem_id_1, quantity ); jQuery( '.ec_details_swatches > li.ec_option1_12_1' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option1_12_1.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option1_12_1' ) ).val( optionitem_id_1 ); jQuery( this ).parent( ).parent( ).find( '.ec_details_option_label' ).find( '.ec_details_option_label_selected' ).html( jQuery( this ).find( 'img' ).attr( 'title' ) ); ec_details_base_adjust_price_12_1( ); } } ); jQuery( '.ec_details_swatches > li.ec_option2_12_1' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_1 = 0; if( jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).length ){ optionitem_id_1 = jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_1 = jQuery( '.ec_details_combo.ec_option1_12_1' ).val( ); } var optionitem_id_2 = jQuery( this ).attr( 'data-optionitem-id' ); jQuery( '.ec_details_swatches > li.ec_option2_12_1' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option2_12_1.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option2_12_1' ) ).val( optionitem_id_2 ); jQuery( this ).parent( ).parent( ).find( '.ec_details_option_label' ).find( '.ec_details_option_label_selected' ).html( jQuery( this ).find( 'img' ).attr( 'title' ) ); ec_details_base_adjust_price_12_1( ); } } ); jQuery( '.ec_details_swatches > li.ec_option3_12_1' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_1 = 0; if( jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).length ){ optionitem_id_1 = jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_1 = jQuery( '.ec_details_combo.ec_option1_12_1' ).val( ); } var optionitem_id_2 = 0; if( jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).length ){ optionitem_id_2 = jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_2 = jQuery( '.ec_details_combo.ec_option2_12_1' ).val( ); } var optionitem_id_3 = jQuery( this ).attr( 'data-optionitem-id' ); jQuery( '.ec_details_swatches > li.ec_option3_12_1' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option3_12_1.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option3_12_1' ) ).val( optionitem_id_3 ); jQuery( this ).parent( ).parent( ).find( '.ec_details_option_label' ).find( '.ec_details_option_label_selected' ).html( jQuery( this ).find( 'img' ).attr( 'title' ) ); ec_details_base_adjust_price_12_1( ); } } ); jQuery( '.ec_details_swatches > li.ec_option4_12_1' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_1 = 0; if( jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).length ){ optionitem_id_1 = jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_1 = jQuery( '.ec_details_combo.ec_option1_12_1' ).val( ); } var optionitem_id_2 = 0; if( jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).length ){ optionitem_id_2 = jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_2 = jQuery( '.ec_details_combo.ec_option2_12_1' ).val( ); } var optionitem_id_3 = 0; if( jQuery( '.ec_details_swatches > li.ec_option3_12_1.ec_selected' ).length ){ optionitem_id_3 = jQuery( '.ec_details_swatches > li.ec_option3_12_1.ec_selected' ).attr( 'data-optionitem-id' ); }else{ optionitem_id_3 = jQuery( '.ec_details_combo.ec_option3_12_1' ).val( ); } var optionitem_id_4 = jQuery( this ).attr( 'data-optionitem-id' ); jQuery( '.ec_details_swatches > li.ec_option4_12_1' ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option4_12_1.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option4_12_1' ) ).val( optionitem_id_4 ); jQuery( this ).parent( ).parent( ).find( '.ec_details_option_label' ).find( '.ec_details_option_label_selected' ).html( jQuery( this ).find( 'img' ).attr( 'title' ) ); ec_details_base_adjust_price_12_1( ); } } ); jQuery( '.ec_details_swatches > li.ec_option5_12_1' ).click( function( ){ if( jQuery( this ).hasClass( 'ec_active' ) ){ var optionitem_id_5 = jQuery( this ).attr( 'data-optionitem-id' ); jQuery( '.ec_details_swatches > li.ec_option5_12_1' ).removeClass( 'ec_selected' ); var quantity = jQuery( this ).attr( 'data-optionitem-quantity' ); jQuery( document.getElementById( 'ec_details_stock_quantity_12_1' ) ).html( quantity ); jQuery( document.getElementById('ec_quantity_12_1' ) ).attr( 'max', quantity ); if( Number( jQuery( document.getElementById('ec_quantity_12_1' ) ).val( ) ) > Number( quantity ) ){ jQuery( document.getElementById('ec_quantity_12_1' ) ).val( quantity ); } jQuery( this ).addClass( 'ec_selected' ); jQuery( '.ec_option5_12_1.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_option5_12_1' ) ).val( optionitem_id_5 ); jQuery( this ).parent( ).parent( ).find( '.ec_details_option_label' ).find( '.ec_details_option_label_selected' ).html( jQuery( this ).find( 'img' ).attr( 'title' ) ); ec_details_base_adjust_price_12_1( ); } } ); jQuery( '.ec_details_radio_row.ec_option1_12_1' ).click( function( ){ var optionitem_id_1 = jQuery( '.ec_details_radio_row.ec_option1_12_1 > input:checked' ).val( ); var quantity = jQuery( '.ec_details_radio_row.ec_option1_12_1 > input:checked' ).attr( 'data-optionitem-quantity' ); ec_option1_image_change_12_1( optionitem_id_1, quantity ); } ); jQuery( '.ec_details_combo.ec_option1_12_1' ).change( function( ){ var optionitem_id_1 = jQuery( '.ec_details_combo.ec_option1_12_1' ).val( ); var quantity = jQuery( '.ec_details_combo.ec_option1_12_1 option:selected' ).attr( 'data-optionitem-quantity' ); ec_option1_image_change_12_1( optionitem_id_1, quantity ); jQuery( '.ec_option1_12_1.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_12_1( ); } ); jQuery( '.ec_details_combo.ec_option2_12_1' ).change( function( ){ jQuery( '.ec_option2_12_1.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_12_1( ); } ); jQuery( '.ec_details_combo.ec_option3_12_1' ).change( function( ){ jQuery( '.ec_option3_12_1.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_12_1( ); } ); jQuery( '.ec_details_combo.ec_option4_12_1' ).change( function( ){ jQuery( '.ec_option4_12_1.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_12_1( ); } ); jQuery( '.ec_details_combo.ec_option5_12_1' ).change( function( ){ jQuery( '.ec_option5_12_1.ec_details_option_row_error' ).hide( ); ec_details_base_adjust_price_12_1( ); } ); jQuery( '.ec_details_checkbox_row > input, .ec_details_radio_row > input' ).click( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_combo > .ec_details_option_data > select' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_date > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_file > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_text > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_number > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_textarea > .ec_details_option_data > textarea' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_grid_row > input' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_swatches > li.ec_advanced' ).click( function( ){ var optionitem_id = jQuery( this ).attr( 'data-optionitem-id' ); var option_id = jQuery( this ).attr( 'data-option-id' ); var product_id = '12'; jQuery( document.getElementById( 'ec_option_adv_' + option_id + "_" + product_id + "_1" ) ).val( optionitem_id ); jQuery( '.ec_details_swatches > li.ec_option_adv_' + option_id + "_" + product_id + "_1" ).removeClass( 'ec_selected' ); jQuery( this ).addClass( 'ec_selected' ); jQuery( document.getElementById( 'ec_details_option_row_error_' + option_id + "_" + product_id + "_1" ) ).hide( ); jQuery( this ).parent( ).parent( ).parent( ).find( '.ec_details_option_label' ).find( '.ec_details_option_label_selected' ).html( jQuery( this ).find( 'img' ).attr( 'title' ) ); ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_dimensions1 > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_dimensions2 > .ec_details_option_data > input' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( '.ec_details_option_row.ec_option_type_dimensions2 > .ec_details_option_data > select' ).change( function( ){ ec_details_advanced_conditional_logic_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); jQuery( document ).ready( function( ){ ec_details_base_adjust_price_12_1( ); ec_details_advanced_adjust_price_12_1( ); } ); function ec_details_base_adjust_price_12_1( ){ if( jQuery( document.getElementById( 'ec_base_price_12_1' ) ).length == 0 ) return; var base_price = Number( jQuery( document.getElementById( 'ec_base_price_12_1' ) ).html( ) ); var current_quantity = jQuery( document.getElementById( 'ec_quantity_12_1' ) ).val( ); for( var i=0; i li.ec_option1_12_1.ec_selected' ).length ){ option1_price_adj = jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).attr( 'data-optionitem-price' ); option1_price_add = jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option1_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option1_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option1_12_1.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option1_12_1' ).length ){ option1_price_adj = jQuery( '.ec_details_combo.ec_option1_12_1 option:selected' ).attr( 'data-optionitem-price' ); option1_price_add = jQuery( '.ec_details_combo.ec_option1_12_1 option:selected' ).attr( 'data-optionitem-price-onetime' ); option1_price_override = Number( jQuery( '.ec_details_combo.ec_option1_12_1 option:selected' ).attr( 'data-optionitem-price-override' ) ); option1_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option1_12_1 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } // Option 2 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).length ){ option2_price_adj = jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).attr( 'data-optionitem-price' ); option2_price_add = jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option2_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option2_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option2_12_1.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option2_12_1' ).length ){ option2_price_adj = jQuery( '.ec_details_combo.ec_option2_12_1 option:selected' ).attr( 'data-optionitem-price' ); option2_price_add = jQuery( '.ec_details_combo.ec_option2_12_1 option:selected' ).attr( 'data-optionitem-price-onetime' ); option2_price_override = Number( jQuery( '.ec_details_combo.ec_option2_12_1 option:selected' ).attr( 'data-optionitem-price-override' ) ); option2_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option2_12_1 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } // Option 3 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option3_12_1.ec_selected' ).length ){ option3_price_adj = jQuery( '.ec_details_swatches > li.ec_option3_12_1.ec_selected' ).attr( 'data-optionitem-price' ); option3_price_add = jQuery( '.ec_details_swatches > li.ec_option3_12_1.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option3_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option3_12_1.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option3_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option3_12_1.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option3_12_1' ).length ){ option3_price_adj = jQuery( '.ec_details_combo.ec_option3_12_1 option:selected' ).attr( 'data-optionitem-price' ); option3_price_add = jQuery( '.ec_details_combo.ec_option3_12_1 option:selected' ).attr( 'data-optionitem-price-onetime' ); option3_price_override = Number( jQuery( '.ec_details_combo.ec_option3_12_1 option:selected' ).attr( 'data-optionitem-price-override' ) ); option3_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option3_12_1 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } // Option 4 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option4_12_1.ec_selected' ).length ){ option4_price_adj = jQuery( '.ec_details_swatches > li.ec_option4_12_1.ec_selected' ).attr( 'data-optionitem-price' ); option4_price_add = jQuery( '.ec_details_swatches > li.ec_option4_12_1.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option4_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option4_12_1.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option4_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option4_12_1.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option4_12_1' ).length ){ option4_price_adj = jQuery( '.ec_details_combo.ec_option4_12_1 option:selected' ).attr( 'data-optionitem-price' ); option4_price_add = jQuery( '.ec_details_combo.ec_option4_12_1 option:selected' ).attr( 'data-optionitem-price-onetime' ); option4_price_override = Number( jQuery( '.ec_details_combo.ec_option4_12_1 option:selected' ).attr( 'data-optionitem-price-override' ) ); option4_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option4_12_1 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } // Option 5 Price Adjustment if( jQuery( '.ec_details_swatches > li.ec_option5_12_1.ec_selected' ).length ){ option5_price_adj = jQuery( '.ec_details_swatches > li.ec_option5_12_1.ec_selected' ).attr( 'data-optionitem-price' ); option5_price_add = jQuery( '.ec_details_swatches > li.ec_option5_12_1.ec_selected' ).attr( 'data-optionitem-price-onetime' ); option5_price_override = Number( jQuery( '.ec_details_swatches > li.ec_option5_12_1.ec_selected' ).attr( 'data-optionitem-price-override' ) ); option5_price_multiplier = Number( jQuery( '.ec_details_swatches > li.ec_option5_12_1.ec_selected' ).attr( 'data-optionitem-price-multiplier' ) ); }else if( jQuery( '.ec_details_combo.ec_option5_12_1' ).length ){ option5_price_adj = jQuery( '.ec_details_combo.ec_option5_12_1 option:selected' ).attr( 'data-optionitem-price' ); option5_price_add = jQuery( '.ec_details_combo.ec_option5_12_1 option:selected' ).attr( 'data-optionitem-price-onetime' ); option5_price_override = Number( jQuery( '.ec_details_combo.ec_option5_12_1 option:selected' ).attr( 'data-optionitem-price-override' ) ); option5_price_multiplier = Number( jQuery( '.ec_details_combo.ec_option5_12_1 option:selected' ).attr( 'data-optionitem-price-multiplier' ) ); } var num_decimals = 2; var decimal_symbol = '.'; var grouping_symbol = ','; var new_price = base_price + Number( option1_price_adj ) + Number( option2_price_adj ) + Number( option3_price_adj ) + Number( option4_price_adj ) + Number( option5_price_adj ); var order_price = Number( option1_price_add ) + Number( option2_price_add ) + Number( option3_price_add ) + Number( option4_price_add ) + Number( option5_price_add ); var override_price = -1; if( option1_price_override > -1 ) override_price = option1_price_override; else if( option2_price_override > -1 ) override_price = option2_price_override; else if( option3_price_override > -1 ) override_price = option3_price_override; else if( option4_price_override > -1 ) override_price = option4_price_override; else if( option5_price_override > -1 ) override_price = option5_price_override; if( override_price > -1 ){ jQuery( document.getElementById( 'ec_final_price_12_1' ) ).html( ec_details_format_money( override_price ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price ) ); } ); }else{ jQuery( document.getElementById( 'ec_final_price_12_1' ) ).html( ec_details_format_money( new_price ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); } if( order_price != 0 ){ jQuery( '.ec_details_added_price_12_1' ).show( ); jQuery( document.getElementById( 'ec_added_price_12_1' ) ).html( ec_details_format_money( order_price ) ); }else{ jQuery( '.ec_details_added_price_12_1' ).hide( ); } } function ec_details_advanced_adjust_price_12_1( ){ if( jQuery( document.getElementById( 'ec_base_price_12_1' ) ).length == 0 ) return; var base_price = Number( jQuery( document.getElementById( 'ec_base_price_12_1' ) ).html( ) ); // Get a quantity in case we need to use in calculating price var current_quantity = 1; if( jQuery( document.getElementById( 'ec_quantity_12_1' ) ).length > 0 ){ current_quantity = jQuery( document.getElementById( 'ec_quantity_12_1' ) ).val( ); } if( jQuery( '.ec_details_grid_row > input' ).length > 0 ){ current_quantity = 0; jQuery( '.ec_details_grid_row > input' ).each( function( ){ current_quantity = current_quantity + Number( jQuery( this ).val( ) ); } ); } for( var i=0; i input' ).each( function( ){ if( jQuery( this ).val( ) > 0 ){ grid_quantity += Number( jQuery( this ).val( ) ); if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ grid_adj += ( ( Number( jQuery( this ).attr( 'data-optionitem-price' ) ) ) * ( Number( jQuery( this ).val( ) ) ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ grid_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ grid_override += ( Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ) - base_price ) * ( ( Number( jQuery( this ).val( ) ) ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } } ); jQuery( '.ec_details_checkbox_row:visible > input:checked' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ if( grid_quantity ) checkbox_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ) * grid_quantity; else checkbox_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ checkbox_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } ); jQuery( '.ec_details_option_row.ec_option_type_combo:visible > .ec_details_option_data > select option:selected' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ if( grid_quantity ) combo_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ) * grid_quantity; else combo_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ combo_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } ); jQuery( '.ec_details_option_row.ec_option_type_date:visible > .ec_details_option_data > input' ).each( function( ){ if( jQuery( this ).val( ) != "" ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ if( grid_quantity ) date_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ) * grid_quantity; else date_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ date_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } } ); jQuery( '.ec_details_option_row.ec_option_type_file:visible > .ec_details_option_data > input' ).each( function( ){ if( jQuery( this ).val( ) != "" ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ if( grid_quantity ) file_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ) * grid_quantity; else file_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ file_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } } ); jQuery( '.ec_details_swatch.ec_advanced.ec_selected:visible' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ if( grid_quantity ) swatch_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ) * grid_quantity; else swatch_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ swatch_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } ); jQuery( '.ec_details_radio_row:visible > input:checked' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ if( grid_quantity ) radio_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ) * grid_quantity; else radio_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ radio_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } ); jQuery( '.ec_details_option_row.ec_option_type_text:visible > .ec_details_option_data > input' ).each( function( ){ if( jQuery( this ).val( ) != "" ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ if( grid_quantity ) text_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ) * grid_quantity; else text_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ text_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-per-character' ) > 0 ){ var num_characters = Number( jQuery( this ).val( ).replace( / /g, '' ).length ); var price_per_char = Number( jQuery( this ).attr( 'data-optionitem-price-per-character' ) ); text_adj = text_adj + ( num_characters * price_per_char ); } } } ); jQuery( '.ec_details_option_row.ec_option_type_number:visible > .ec_details_option_data > input' ).each( function( ){ if( jQuery( this ).val( ) != "" && jQuery( this ).val( ) != "0" ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ if( grid_quantity > 0 ) number_adj += Number( jQuery( this ).val( ) ) * Number( jQuery( this ).attr( 'data-optionitem-price' ) ) * grid_quantity; else number_adj += Number( jQuery( this ).val( ) ) * Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ number_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).val( ) ) * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } } } ); jQuery( '.ec_details_option_row.ec_option_type_textarea:visible > .ec_details_option_data > textarea' ).each( function( ){ if( jQuery( this ).val( ) != "" ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price' ) != 0 ){ textarea_adj += Number( jQuery( this ).attr( 'data-optionitem-price' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-onetime' ) != 0 ){ textarea_add += Number( jQuery( this ).attr( 'data-optionitem-price-onetime' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-override' ) >= 0 ){ override_price = Number( jQuery( this ).attr( 'data-optionitem-price-override' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-multiplier' ) > 0 ){ price_multiplier = price_multiplier * Number( jQuery( this ).attr( 'data-optionitem-price-multiplier' ) ); } if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-optionitem-price-per-character' ) > 0 ){ var num_characters = Number( jQuery( this ).val( ).replace( / /g, '' ).length ); var price_per_char = Number( jQuery( this ).attr( 'data-optionitem-price-per-character' ) ); textarea_adj = textarea_adj + ( num_characters * price_per_char ); } } } ); jQuery( '.ec_dimensions_width' ).each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' ){ has_sq_footage = true; var option_id = jQuery( this ).attr( 'data-option-id' ); var product_id = '12'; var width = jQuery( document.getElementById( 'ec_option_adv_' + option_id + '_' + product_id + "_1" + '_width' ) ).val( ); var sub_width = 0; if( jQuery( document.getElementById( 'ec_option_adv_' + option_id + '_' + product_id + "_1" + '_sub_width' ) ).length ) var sub_width = jQuery( document.getElementById( 'ec_option_adv_' + option_id + '_' + product_id + "_1" + '_sub_width' ) ).val( ); var height = jQuery( document.getElementById( 'ec_option_adv_' + option_id + '_' + product_id + "_1" + '_height' ) ).val( ); var sub_height = 0; if( jQuery( document.getElementById( 'ec_option_adv_' + option_id + '_' + product_id + "_1" + '_sub_height' ) ).length ) var sub_height = jQuery( document.getElementById( 'ec_option_adv_' + option_id + '_' + product_id + "_1" + '_sub_height' ) ).val( ); if( width != "" && height != "" ) sq_footage = ec_details_get_sq_footage_12_1( width, sub_width, height, sub_height ) * Number( jQuery( document.getElementById( 'ec_quantity_12_1' ) ).val( ) ); } } ); if( grid_quantity > 0 ) base_price = base_price * grid_quantity; var new_price = ( base_price + Number( checkbox_adj ) + Number( combo_adj ) + Number( date_adj ) + Number( file_adj ) + Number( swatch_adj ) + Number( grid_adj ) + Number( grid_override ) + Number( radio_adj ) + Number( text_adj ) + Number( number_adj ) + Number( textarea_adj ) ); var new_price_sqft = new_price * sq_footage; var override_price_final = override_price + Number( checkbox_adj ) + Number( combo_adj ) + Number( date_adj ) + Number( file_adj ) + Number( swatch_adj ) + Number( grid_adj ) + Number( grid_override ) + Number( radio_adj ) + Number( text_adj ) + Number( number_adj ) + Number( textarea_adj ); var override_price_sqft = override_price_final * sq_footage; var order_price = Number( checkbox_add ) + Number( combo_add ) + Number( date_add ) + Number( file_add ) + Number( swatch_add ) + Number( grid_add ) + Number( radio_add ) + Number( text_add ) + Number( number_add ) + Number( textarea_add ); if( override_price > -1 ){ jQuery( document.getElementById( 'ec_final_price_12_1' ) ).html( ec_details_format_money( override_price_sqft ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final ) ); } ); }else{ jQuery( document.getElementById( 'ec_final_price_12_1' ) ).html( ec_details_format_money( new_price_sqft ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price ) ); } ); } if( price_multiplier != 1 && override_price > -1 ){ jQuery( document.getElementById( 'ec_final_price_12_1' ) ).html( ec_details_format_money( override_price_sqft * Number( price_multiplier ) ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( override_price_final * Number( price_multiplier ) ) ); } ); }else if( price_multiplier != 1 ){ jQuery( document.getElementById( 'ec_final_price_12_1' ) ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_single_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_sale_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); } ); jQuery( '.ec_details_price.ec_details_no_vat_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) / 1 ) ); } ); jQuery( '.ec_details_price.ec_details_vat_price > .ec_product_price_12_1' ).each( function( ){ jQuery( this ).html( ec_details_format_money( new_price * Number( price_multiplier ) ) ); } ); } if( order_price != 0 ){ jQuery( '.ec_details_added_price_12_1' ).show( ); jQuery( document.getElementById( 'ec_added_price_12_1' ) ).html( ec_details_format_money( order_price ) ); }else{ jQuery( '.ec_details_added_price_12_1' ).hide( ); } } function ec_details_advanced_conditional_logic_12_1( ){ for( var i=0; i 0 ){ if( ec_advanced_logic_rules_12_1[i].show_field ){ jQuery( '.ec_details_option_row[data-option-id="' + ec_advanced_logic_rules_12_1[i].id + '"]' ).hide( ); }else{ jQuery( '.ec_details_option_row[data-option-id="' + ec_advanced_logic_rules_12_1[i].id + '"]' ).show( ); } if( ec_advanced_logic_rules_12_1[i].and_rules == 'AND' ){ var rules_match = true; for( var j=0; j 3 ? j % 3 : 0; var formatted = (j ? i.substr(0, j) + grouping_symbol : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + grouping_symbol) + (num_decimals ? decimal_symbol + Math.abs(n - i).toFixed(num_decimals).slice(2) : ""); if( symbol_location ){ formatted = currency_symbol + formatted; }else{ formatted = formatted + currency_symbol; } if( show_currency_code == '1' ){ formatted = currency_code + ' ' + formatted; } return formatted; }; function ec_pricing_round(number, places) { var multiplier = Math.pow(10, places+2); // get two extra digits var fixed = Math.floor(number*multiplier); // convert to integer fixed += 50; // round down on anything less than x.xxx50 fixed = Math.floor(fixed/100); // chop off last 2 digits return fixed/Math.pow(10, places); } function ec_details_submit_inquiry_12_1( ){ var errors = 0; if( document.getElementById( 'ec_inquiry_name_12_1' ) ){ if( jQuery( document.getElementById( 'ec_inquiry_name_12_1' ) ).val( ) == "" || !ec_validate_email( jQuery( document.getElementById( 'ec_inquiry_email_12_1' ) ).val( ) ) || jQuery( document.getElementById( 'ec_inquiry_message_12_1' ) ).val( ) == "" ){ jQuery( document.getElementById( 'ec_details_inquiry_error_12_1' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_details_inquiry_error_12_1' ) ).hide( ); } } if( jQuery( document.getElementById( 'ec_grecaptcha_response_inquiry' ) ).length ){ var recaptcha_response = jQuery( document.getElementById( 'ec_grecaptcha_response_inquiry' ) ).val( ); if( !recaptcha_response.length ){ jQuery( '#ec_product_details_inquiry_recaptcha > div' ).css( 'border', '1px solid red' ); errors++; }else{ jQuery( '#ec_product_details_inquiry_recaptcha > div' ).css( 'border', 'none' ); } } if( !ec_details_add_to_cart_12_1( ) ){ errors++; } if( errors > 0 ) return false; else{ jQuery( document.getElementById( 'ec_inquiry_loader_12_1' ) ).show( ); jQuery( document.getElementById( 'ec_inquiry_loader_bg_12_1' ) ).show( ); return true; } } function ec_details_add_to_cart_12_1( ){ var errors = 0; // Basic Option 1 Error Check if( jQuery( '.ec_details_swatch.ec_option1_12_1' ).length && !jQuery( '.ec_option1_12_1.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option1_12_1.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option1_12_1' ).length && ( jQuery( '.ec_details_combo.ec_option1.ec_option1_12_1' ).val( ) == null || jQuery( '.ec_details_combo.ec_option1.ec_option1_12_1' ).val( ) == '0' ) ){ jQuery( '.ec_option1_12_1.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option1_12_1.ec_details_option_row_error' ).hide( ); } // Basic Option 2 Error Check if( jQuery( '.ec_details_swatch.ec_option2_12_1' ).length && !jQuery( '.ec_option2_12_1.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option2_12_1.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option2_12_1' ).length && ( jQuery( '.ec_details_combo.ec_option2.ec_option2_12_1' ).val( ) == null || jQuery( '.ec_details_combo.ec_option2.ec_option2_12_1' ).val( ) == '0' ) ){ jQuery( '.ec_option2_12_1.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option2_12_1.ec_details_option_row_error' ).hide( ); } // Basic Option 3 Error Check if( jQuery( '.ec_details_swatch.ec_option3_12_1' ).length && !jQuery( '.ec_option3_12_1.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option3_12_1.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option3_12_1' ).length && ( jQuery( '.ec_details_combo.ec_option3.ec_option3_12_1' ).val( ) == null || jQuery( '.ec_details_combo.ec_option3.ec_option3_12_1' ).val( ) == '0' ) ){ jQuery( '.ec_option3_12_1.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option3_12_1.ec_details_option_row_error' ).hide( ); } // Basic Option 4 Error Check if( jQuery( '.ec_details_swatch.ec_option4_12_1' ).length && !jQuery( '.ec_option4_12_1.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option4_12_1.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option4_12_1' ).length && ( jQuery( '.ec_details_combo.ec_option4.ec_option4_12_1' ).val( ) == null || jQuery( '.ec_details_combo.ec_option4.ec_option4_12_1' ).val( ) == '0' ) ){ jQuery( '.ec_option4_12_1.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option4_12_1.ec_details_option_row_error' ).hide( ); } // Basic Option 5 Error Check if( jQuery( '.ec_details_swatch.ec_option5_12_1' ).length && !jQuery( '.ec_option5_12_1.ec_selected' ).attr( 'data-optionitem-id' ) ){ jQuery( '.ec_option5_12_1.ec_details_option_row_error' ).show( ); errors++; }else if( jQuery( '.ec_details_combo.ec_option5_12_1' ).length && ( jQuery( '.ec_details_combo.ec_option5.ec_option5_12_1' ).val( ) == null || jQuery( '.ec_details_combo.ec_option5.ec_option5_12_1' ).val( ) == '0' ) ){ jQuery( '.ec_option5_12_1.ec_details_option_row_error' ).show( ); errors++; }else{ jQuery( '.ec_option5_12_1.ec_details_option_row_error' ).hide( ); } // --------Advanced Option Checks---------- // // Select Box Check var advanced_select_rows = jQuery( '.ec_details_option_row.ec_option_type_combo:visible' ); advanced_select_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).val( ) == '0' ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); } } } ); // Check Box Check var advanced_checkbox_rows = jQuery( '.ec_details_option_row.ec_option_type_checkbox:visible' ); advanced_checkbox_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required var selected_checkboxes = jQuery( "input.ec_option_adv_" + jQuery( this ).attr( 'data-option-id' ) + ":checked" ); if( selected_checkboxes.length ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Date Box Check var advanced_date_rows = jQuery( '.ec_details_option_row.ec_option_type_date:visible' ); advanced_date_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).val( ) == "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); } } } ); // File Upload Check var advanced_file_rows = jQuery( '.ec_details_option_row.ec_option_type_file:visible' ); advanced_file_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).val( ) ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Swatch Check var advanced_swatch_rows = jQuery( '.ec_details_option_row.ec_option_type_swatch:visible' ); advanced_swatch_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required var advanced_selected_swatches = jQuery( ".ec_details_swatch.ec_option_adv_" + jQuery( this ).attr( 'data-option-id' ) + '_12_1' + ".ec_selected" ); if( advanced_selected_swatches.length ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Radio Button Check var advanced_radio_rows = jQuery( '.ec_details_option_row.ec_option_type_radio:visible' ); advanced_radio_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required var selected_radios = jQuery( "input[name='ec_option_adv_" + jQuery( this ).attr( 'data-option-id' ) + "']:checked" ); if( selected_radios.length ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Text Box Check var advanced_text_rows = jQuery( '.ec_details_option_row.ec_option_type_text:visible' ); advanced_text_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).val( ) != "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Text Area Check var advanced_textarea_rows = jQuery( '.ec_details_option_row.ec_option_type_textarea:visible' ); advanced_textarea_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).val( ) != "" && jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).val( ) != 0 ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Number Box Check var advanced_text_rows = jQuery( '.ec_details_option_row.ec_option_type_number:visible' ); advanced_text_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required if( jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).val( ) != "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Quantity Grid Check var advanced_grid_rows = jQuery( '.ec_details_option_row.ec_option_type_grid:visible' ); advanced_grid_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required var grid_items = jQuery( this ).find( ".ec_details_option_data > .ec_details_grid_row > input" ); var total_grid_quantity = 0; grid_items.each( function( ){ total_grid_quantity += jQuery( this ).val( ); } ); if( total_grid_quantity > 0 ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Dimensions Type 1 Check var advanced_dimensions_rows = jQuery( '.ec_details_option_row.ec_option_type_dimensions1:visible' ); advanced_dimensions_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required // Test Width + Height if( jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' + '_width' ) ).val( ) != "" && jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' + '_height' ) ).val( ) != "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // Dimensions Type 2 Check var advanced_dimensions_rows = jQuery( '.ec_details_option_row.ec_option_type_dimensions2:visible' ); advanced_dimensions_rows.each( function( ){ if( jQuery( this ).attr( 'data-product-id' ) == '12' && jQuery( this ).attr( 'data-option-required' ) == '1' ){ // Option is Required // Test Width + Height if( jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' + '_width' ) ).val( ) != "" && jQuery( document.getElementById( 'ec_option_adv_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' + '_height' ) ).val( ) != "" ){ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).hide( ); }else{ jQuery( document.getElementById( 'ec_details_option_row_error_' + jQuery( this ).attr( 'data-option-id' ) + '_12_1' ) ).show( ); errors++; } } } ); // -------END Advanced Option Checks------- // // -------START GIFT CARD CHECK ----------- // var gift_card_errors = 0; if( document.getElementById( 'ec_giftcard_to_name_12_1' ) && jQuery( document.getElementById( 'ec_giftcard_to_name_12_1' ) ).val( ) == "" ){ errors++; gift_card_errors++; } if( document.getElementById( 'ec_giftcard_to_email_12_1' ) && jQuery( document.getElementById( 'ec_giftcard_to_email_12_1' ) ).val( ) == "" ){ errors++; gift_card_errors++; } if( document.getElementById( 'ec_giftcard_from_name_12_1' ) && jQuery( document.getElementById( 'ec_giftcard_from_name_12_1' ) ).val( ) == "" ){ errors++; gift_card_errors++; } if( document.getElementById( 'ec_giftcard_message_12_1' ) && jQuery( document.getElementById( 'ec_giftcard_message_12_1' ) ).val( ) == "" ){ errors++; gift_card_errors++; } if( gift_card_errors ){ jQuery( document.getElementById( 'ec_details_giftcard_error_12_1' ) ).show( ); }else{ jQuery( document.getElementById( 'ec_details_giftcard_error_12_1' ) ).hide( ); } // -------END GIFT CARD CHECK ----------- // // -------START DONATION CHECK ----------- // if( document.getElementById( 'ec_donation_amount_12_1' ) ){ if( isNaN( jQuery( document.getElementById( 'ec_donation_amount_12_1' ) ).val( ) ) || Number( jQuery( document.getElementById( 'ec_donation_amount_12_1' ) ).val( ) ) allowed_quantity ){ jQuery( document.getElementById( 'ec_addtocart_quantity_exceeded_error_12_1' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_addtocart_quantity_exceeded_error_12_1' ) ).hide( ); } // Minimum Quantity Check var min_quantity = 0; if( entered_quantity 0 && entered_quantity > max_quantity ){ jQuery( document.getElementById( 'ec_addtocart_quantity_maximum_error_12_1' ) ).show( ); errors++; }else{ jQuery( document.getElementById( 'ec_addtocart_quantity_maximum_error_12_1' ) ).hide( ); } if( errors > 0 ) return false; else return true; }jQuery( '.ec_details_review_input_12_1' ).hover( function( ){ var score = jQuery( this ).attr( 'data-review-score' ); jQuery( '.ec_details_review_input_12_1' ).removeClass( 'ec_product_details_star_on' ).addClass( 'ec_product_details_star_off' ); for( var i=0; i li.ec_option2_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option3_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option4_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option5_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_combo.ec_option2_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option3_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option4_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option5_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( document.getElementById( 'ec_details_stock_quantity_12_1' ) ).html( quantity ); jQuery( document.getElementById('ec_quantity_12_1' ) ).attr( 'max', quantity ); if( Number( jQuery( document.getElementById('ec_quantity_12_1' ) ).val( ) ) > Number( quantity ) ){ jQuery( document.getElementById('ec_quantity_12_1' ) ).val( quantity ); } jQuery( document.getElementById( 'ec_option_loading_2_12_1' ) ).show( ); var next_options = jQuery( '.ec_details_swatches > li.ec_option2_12_1' ); if( next_options.length ){ next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, product_id: '12' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_2_12_1' ) ).hide( ); var i=0; next_options.each( function( ){ if( json_data.length > i && json_data[i].optionitem_id == jQuery( this ).attr( 'data-optionitem-id' ) ){ if( json_data[i].optionitem_id == jQuery( this ).attr( 'data-optionitem-id' ) ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ); if( json_data[i].quantity > 0 ){ jQuery( this ).addClass( 'ec_active' ); } i++; } } } ); } } ); }else{ next_options = jQuery( '.ec_details_combo.ec_option2_12_1 option' ); next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, product_id: '12' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( '.ec_details_combo.ec_option2_12_1' ).prop( 'disabled', false ).removeClass( 'ec_inactive' ); var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_2_12_1' ) ).hide( ); var i=0; next_options.each( function( ){ if( i >= json_data.length ){ jQuery( this ).attr( 'data-optionitem-quantity', 0 ); jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); }else if( jQuery( this ).val( ) == json_data[i].optionitem_id ){ jQuery( this ).show( ); jQuery( this ).prop( 'disabled', false ); jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ) i++; }else{ jQuery( this ).attr( 'data-optionitem-quantity', 0 ); jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); } } ); } } ); } } function option2_selected_12_1( optionitem_id_1, optionitem_id_2, quantity ){ jQuery( '.ec_details_swatches > li.ec_option3_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option4_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option5_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_combo.ec_option3_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option4_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option5_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_option2_12_1.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_details_stock_quantity_12_1' ) ).html( quantity ); jQuery( document.getElementById('ec_quantity_12_1' ) ).attr( 'max', quantity ); if( Number( jQuery( document.getElementById('ec_quantity_12_1' ) ).val( ) ) > Number( quantity ) ){ jQuery( document.getElementById('ec_quantity_12_1' ) ).val( quantity ); } var next_options = jQuery( '.ec_details_swatches > li.ec_option3_12_1' ); jQuery( document.getElementById( 'ec_option_loading_3_12_1' ) ).show( ); if( next_options.length ){ next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, product_id: '12' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_3_12_1' ) ).hide( ); var i=0; next_options.each( function( ){ if( json_data.length > i && json_data[i].optionitem_id == jQuery( this ).attr( 'data-optionitem-id' ) ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ); if( json_data[i].quantity > 0 ){ jQuery( this ).addClass( 'ec_active' ); } i++; } } ); } } ); }else{ next_options = jQuery( '.ec_details_combo.ec_option3_12_1 option' ); next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, product_id: '12' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( '.ec_details_combo.ec_option3_12_1' ).prop( 'disabled', false ).removeClass( 'ec_inactive' ); var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_3_12_1' ) ).hide( ); var i=0; next_options.each( function( ){ if( i >= json_data.length ){ jQuery( this ).attr( 'data-optionitem-quantity', 0 ); jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); }else if( jQuery( this ).val( ) == json_data[i].optionitem_id ){ jQuery( this ).show( ); jQuery( this ).prop( 'disabled', false ); jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ) i++; }else{ jQuery( this ).attr( 'data-optionitem-quantity', 0 ); jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); } } ); } } ); } } function option3_selected_12_1( optionitem_id_1, optionitem_id_2, optionitem_id_3, quantity ){ jQuery( '.ec_details_swatches > li.ec_option4_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_swatches > li.ec_option5_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_combo.ec_option4_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_details_combo.ec_option5_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_option3_12_1.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_details_stock_quantity_12_1' ) ).html( quantity ); jQuery( document.getElementById('ec_quantity_12_1' ) ).attr( 'max', quantity ); if( Number( jQuery( document.getElementById('ec_quantity_12_1' ) ).val( ) ) > Number( quantity ) ){ jQuery( document.getElementById('ec_quantity_12_1' ) ).val( quantity ); } var next_options = jQuery( '.ec_details_swatches > li.ec_option4_12_1' ); jQuery( document.getElementById( 'ec_option_loading_4_12_1' ) ).show( ); if( next_options.length ){ next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, optionitem_id_3: optionitem_id_3, product_id: '12' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_4_12_1' ) ).hide( ); var i=0; next_options.each( function( ){ if( json_data.length > i && json_data[i].optionitem_id == jQuery( this ).attr( 'data-optionitem-id' ) ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ); if( json_data[i].quantity > 0 ){ jQuery( this ).addClass( 'ec_active' ); } i++; } } ); } } ); }else{ next_options = jQuery( '.ec_details_combo.ec_option4_12_1 option' ); next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, optionitem_id_3: optionitem_id_3, product_id: '12' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( '.ec_details_combo.ec_option4_12_1' ).prop( 'disabled', false ).removeClass( 'ec_inactive' ); var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_4_12_1' ) ).hide( ); var i=0; next_options.each( function( ){ if( i >= json_data.length ){ jQuery( this ).attr( 'data-optionitem-quantity', 0 ); jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); }else if( jQuery( this ).val( ) == json_data[i].optionitem_id ){ jQuery( this ).show( ); jQuery( this ).prop( 'disabled', false ); jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ) i++; }else{ jQuery( this ).attr( 'data-optionitem-quantity', 0 ); jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); } } ); } } ); } } function option4_selected_12_1( optionitem_id_1, optionitem_id_2, optionitem_id_3, optionitem_id_4, quantity ){ jQuery( '.ec_details_swatches > li.ec_option5_12_1' ).removeClass( 'ec_selected' ).removeClass( 'ec_active' ); jQuery( '.ec_details_combo.ec_option5_12_1' ).val( '0' ).prop( 'disabled', true ).addClass( 'ec_inactive' ); jQuery( '.ec_option4.ec_details_option_row_error' ).hide( ); jQuery( document.getElementById( 'ec_details_stock_quantity_12_1' ) ).html( quantity ); jQuery( document.getElementById('ec_quantity_12_1' ) ).attr( 'max', quantity ); if( Number( jQuery( document.getElementById('ec_quantity_12_1' ) ).val( ) ) > Number( quantity ) ){ jQuery( document.getElementById('ec_quantity_12_1' ) ).val( quantity ); } var next_options = jQuery( '.ec_details_swatches > li.ec_option5_12_1' ); jQuery( document.getElementById( 'ec_option_loading_5_12_1' ) ).show( ); if( next_options.length ){ next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, optionitem_id_3: optionitem_id_3, optionitem_id_4: optionitem_id_4, product_id: '12' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_5_12_1' ) ).hide( ); var i=0; next_options.each( function( ){ if( json_data.length > i && json_data[i].optionitem_id == jQuery( this ).attr( 'data-optionitem-id' ) ){ jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ); if( json_data[i].quantity > 0 ){ jQuery( this ).addClass( 'ec_active' ); } i++; } } ); } } ); }else{ next_options = jQuery( '.ec_details_combo.ec_option5_12_1 option' ); next_options.each( function( ){ jQuery( this ).removeClass( 'ec_active' ); } ); var data = { action: 'ec_ajax_get_optionitem_quantities', optionitem_id_1: optionitem_id_1, optionitem_id_2: optionitem_id_2, optionitem_id_3: optionitem_id_3, optionitem_id_4: optionitem_id_4, product_id: '12' }; jQuery.ajax( { url: wpeasycart_ajax_object.ajax_url, type: 'post', data: data, success: function( data ){ jQuery( '.ec_details_combo.ec_option5_12_1' ).prop( 'disabled', false ).removeClass( 'ec_inactive' ); var json_data = JSON.parse( data ); jQuery( document.getElementById( 'ec_option_loading_5_12_1' ) ).hide( ); var i=0; next_options.each( function( ){ if( i >= json_data.length ){ jQuery( this ).attr( 'data-optionitem-quantity', 0 ); jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); }else if( jQuery( this ).val( ) == json_data[i].optionitem_id ){ jQuery( this ).show( ); jQuery( this ).prop( 'disabled', false ); jQuery( this ).attr( 'data-optionitem-quantity', json_data[i].quantity ) i++; }else{ jQuery( this ).attr( 'data-optionitem-quantity', 0 ); jQuery( this ).hide( ); jQuery( this ).prop( 'disabled', true ); } } ); } } ); } } function ec_submit_product_review_12_1( ){ var review_title = jQuery( document.getElementById( 'ec_review_title_12_1' ) ).val( ); var review_score = 0; for( var i=1; i