{"id":160,"date":"2023-02-09T07:27:15","date_gmt":"2023-02-09T07:27:15","guid":{"rendered":"https:\/\/pluginrepublic.dev\/request-quote\/?page_id=160"},"modified":"2023-02-09T07:29:07","modified_gmt":"2023-02-09T07:29:07","slug":"product-table","status":"publish","type":"page","link":"https:\/\/pluginrepublic.dev\/request-quote\/product-table\/","title":{"rendered":"Product Table"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This page shows Request a Quote working with the <a href=\"https:\/\/pluginrepublic.com\/wordpress-plugins\/woocommerce-product-table-ultimate\/\">Product Table Ultimate plugin<\/a>.<\/p>\n\n\n<div class=\"woocommerce\">\n<div id=\"ptuwc-table-f18bee5e31bbb070c2bf4f0fc7d916d0_1_container\" class=\"ptuwc_table_container\">\n\n\t\n\t<table id=\"ptuwc-table-f18bee5e31bbb070c2bf4f0fc7d916d0_1\" class=\"ptuwc-table woocommerce-table shop_table shop_table_responsive show-quantities\" data-index='1' data-source='all' data-callback='__return_empty_array' data-categories='{}' data-taxonomies='{}' data-tags='{}' data-order_by='title' data-order='ASC' data-per_page='10' data-page='1' data-columns='{&quot;0&quot;:&quot;name&quot;,&quot;1&quot;:&quot;price&quot;,&quot;3&quot;:&quot;stock&quot;,&quot;4&quot;:&quot;add-to-cart&quot;}' data-show_quantities='1' data-variations_display='none' data-add_selected='0' data-select_all='0' data-thumb_lightbox='no' data-add_all='0' data-fixed_layout='no' data-sortable_columns='{}' data-filterable_columns='{}' data-filter_operator='AND' data-filter_methods='{}' data-select_filters_locations='{}' data-ajax_variations='0' data-ajax_add_to_cart='0' data-addons='1' data-quickview='0' data-date_fields_header=''>\n\t\t\n<thead>\n    <tr>\n        \n                    <th class=\"ptuwc-name\" data-sortable=\"\" data-filterable=\"\">\n                Name\t                        <\/th>\n                    <th class=\"ptuwc-price\" data-sortable=\"\" data-filterable=\"\">\n                Price\t                        <\/th>\n                    <th class=\"ptuwc-stock\" data-sortable=\"\" data-filterable=\"\">\n                Stock\t                        <\/th>\n                    <th class=\"ptuwc-add-to-cart\" data-sortable=\"\" data-filterable=\"\">\n                Add to Cart\t                        <\/th>\n            <\/tr>\n<\/thead>\n\t\t\n<tbody>\n                                        \n    <tr id=\"ptuwc-product-row-13-1\" class=\"ptuwc-product-row ptuwc-product-row-13 instock virtual purchasable needs-shipping shipping-taxable product-type-simple\" >\n                                    \n    <td class=\"col-name\">\n\t    \t\t    Polo Shirt\t              <\/td>\n\n                                                \n    <td class=\"col-price\">\n        <span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\" translate=\"no\">&pound;<\/span>25.00<\/bdi><\/span>    <\/td>\n\n                                                \n    <td class=\"col-stock\">\n\t    <p class=\"stock in-stock\">In stock<\/p>    <\/td>\n\n                                                \n    <td class=\"col-add-to-cart variations-display-none\">\n                                \n\t\n\t<form class=\"cart\" action=\"https:\/\/pluginrepublic.dev\/request-quote\/product\/polo-shirt\/\" method=\"post\" enctype='multipart\/form-data'>\n\t\t\t<script>\n\t\tvar pewc_cost_triggers = [];\n\t\tvar pewc_quantity_triggers = [];\n\t<\/script>\n\t\t<script>\n\t\tjQuery(document).ready(function($) {\n\t\t\t\n\t\t\t\/\/ These functions are fired when a set of rules are met for a field\n\t\t\tfunction pewc_check_all_conditions( id, conditions_met, action, match ) {\n\t\t\t\tif( match == 'all' ) {\n\t\t\t\t\tvar all_met=true;\n\t\t\t\t\tnum_req = conditions_met.length;\n\t\t\t\t\tfor(var i=0;i<num_req;i++) {\n\t\t\t\t\t\tif(conditions_met[i] != 1) {\n\t\t\t\t\t\t\tall_met=false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( all_met ) {\n\t\t\t\t\t\tpewc_conditions_met( id, action );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpewc_conditions_not_met( id, action );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar any_met=false;\n\t\t\t\t\tnum_req = conditions_met.length;\n\t\t\t\t\tfor(var i=0;i<num_req;i++) {\n\t\t\t\t\t\tif(conditions_met[i] == 1){\n\t\t\t\t\t\t\tany_met=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( any_met ) {\n\t\t\t\t\t\tpewc_conditions_met( id, action );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpewc_conditions_not_met( id, action );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( typeof pewc_update_total_js == 'function' ) {\n\t\t\t\t\tpewc_update_total_js();\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to check for hidden groups\n\t\t\t\t$( 'body' ).one( 'pewc_conditions_checked' );\n\t\t\t}\n\t\t\tfunction pewc_conditions_met( id, action ) {\n\t\t\t\t\/\/ Check the outcome for conditions being met, e.g. show field \/ hide field\n\t\t\t\tif( action == 'show' ) {\n\t\t\t\t\t$('.'+id).removeClass('pewc-hidden-field');\n\t\t\t\t} else if( action == 'hide' ) {\n\t\t\t\t\t$('.'+id).addClass('pewc-hidden-field');\n\t\t\t\t\tpewc_reset_field_value( id, action );\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to retrigger calculations\n\t\t\t\t$( 'body' ).trigger( 'pewc_field_visibility_updated', [ id, action ] );\n\t\t\t}\n\t\t\tfunction pewc_conditions_not_met( id, action ) {\n\t\t\t\t\/\/ Check the outcome for conditions being met, e.g. show field \/ hide field\n\t\t\t\tif( action == 'show' ) {\n\t\t\t\t\t$('.'+id).addClass('pewc-hidden-field');\n\t\t\t\t\tpewc_reset_field_value( id, action );\n\t\t\t\t} else if( action == 'hide' ) {\n\t\t\t\t\t$('.'+id).removeClass('pewc-hidden-field');\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to retrigger calculations\n\t\t\t\t$( 'body' ).trigger( 'pewc_field_visibility_updated', [ id, action ] );\n\t\t\t}\n\t\t\tfunction pewc_reset_field_value( id, action ) {\n\t\t\t\tif( pewc_vars.reset_fields == 'yes' ) {\n\t\t\t\t\t\/\/ Reset the field value\n\t\t\t\t\tvar field = '.' + id;\n\t\t\t\t\tvar inputs = ['date', 'name_price', 'number', 'text', 'textarea', 'advanced-preview'];\n\t\t\t\t\tvar checks = ['checkbox', 'checkbox_group', 'radio'];\n\t\t\t\t\tvar field_type = $( field ).attr( 'data-field-type' );\n\t\t\t\t\tif( inputs.includes( field_type ) ) {\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).val( '' ).trigger( 'change' );\n\t\t\t\t\t} else if( field_type == 'image_swatch' ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t\t$( field ).find( '.pewc-radio-image-wrapper, .pewc-checkbox-image-wrapper' ).removeClass( 'checked' ).trigger( 'change' );\n\t\t\t\t\t} else if( field_type == 'products' ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).val( '' ).trigger( 'change' );\n\t\t\t\t\t\t$( field ).find( '.pewc-radio-image-wrapper, .pewc-checkbox-image-wrapper' ).removeClass( 'checked' );\n\t\t\t\t\t} else if( checks.includes( field_type ) ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t} else if( field_type == 'select' ) {\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).prop( 'selectedIndex', 0 ).trigger( 'change' );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t<\/script>\n\n\t\t<div class=\"quantity\">\n\t\t<label class=\"screen-reader-text\" for=\"quantity_6a4504c9a9e4c\">Polo Shirt quantity<\/label>\n\t<input\n\t\ttype=\"number\"\n\t\t\t\tid=\"quantity_6a4504c9a9e4c\"\n\t\tclass=\"input-text qty text\"\n\t\tname=\"quantity\"\n\t\tvalue=\"1\"\n\t\taria-label=\"Product quantity\"\n\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\tplaceholder=\"\"\n\t\t\tinputmode=\"numeric\"\n\t\t\tautocomplete=\"off\"\n\t\t\t\/>\n\t<\/div>\n\n\t\t<button type=\"submit\" name=\"add-to-cart\" value=\"13\" class=\"single_add_to_cart_button button alt\">Add to Quote<\/button>\n\n\t\t<input type=\"hidden\" id=\"wcraq_quotable_product_13\" class=\"wcraq_quotable_product\" value=\"yes\">\t<\/form>\n\n\t\n            <\/td>\n\n                        <\/tr>\n\n                                                \n    <tr id=\"ptuwc-product-row-18-1\" class=\"ptuwc-product-row ptuwc-product-row-18 instock virtual purchasable needs-shipping shipping-taxable product-type-simple\" >\n                                    \n    <td class=\"col-name\">\n\t    \t\t    Polo Shirt (Fitted)\t              <\/td>\n\n                                                \n    <td class=\"col-price\">\n        <span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\" translate=\"no\">&pound;<\/span>25.00<\/bdi><\/span>    <\/td>\n\n                                                \n    <td class=\"col-stock\">\n\t    <p class=\"stock in-stock\">In stock<\/p>    <\/td>\n\n                                                \n    <td class=\"col-add-to-cart variations-display-none\">\n                                \n\t\n\t<form class=\"cart\" action=\"https:\/\/pluginrepublic.dev\/request-quote\/product\/polo-shirt-fitted\/\" method=\"post\" enctype='multipart\/form-data'>\n\t\t\t<script>\n\t\tvar pewc_cost_triggers = [];\n\t\tvar pewc_quantity_triggers = [];\n\t<\/script>\n\t\t<script>\n\t\tjQuery(document).ready(function($) {\n\t\t\t\n\t\t\t\/\/ These functions are fired when a set of rules are met for a field\n\t\t\tfunction pewc_check_all_conditions( id, conditions_met, action, match ) {\n\t\t\t\tif( match == 'all' ) {\n\t\t\t\t\tvar all_met=true;\n\t\t\t\t\tnum_req = conditions_met.length;\n\t\t\t\t\tfor(var i=0;i<num_req;i++) {\n\t\t\t\t\t\tif(conditions_met[i] != 1) {\n\t\t\t\t\t\t\tall_met=false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( all_met ) {\n\t\t\t\t\t\tpewc_conditions_met( id, action );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpewc_conditions_not_met( id, action );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar any_met=false;\n\t\t\t\t\tnum_req = conditions_met.length;\n\t\t\t\t\tfor(var i=0;i<num_req;i++) {\n\t\t\t\t\t\tif(conditions_met[i] == 1){\n\t\t\t\t\t\t\tany_met=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( any_met ) {\n\t\t\t\t\t\tpewc_conditions_met( id, action );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpewc_conditions_not_met( id, action );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( typeof pewc_update_total_js == 'function' ) {\n\t\t\t\t\tpewc_update_total_js();\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to check for hidden groups\n\t\t\t\t$( 'body' ).one( 'pewc_conditions_checked' );\n\t\t\t}\n\t\t\tfunction pewc_conditions_met( id, action ) {\n\t\t\t\t\/\/ Check the outcome for conditions being met, e.g. show field \/ hide field\n\t\t\t\tif( action == 'show' ) {\n\t\t\t\t\t$('.'+id).removeClass('pewc-hidden-field');\n\t\t\t\t} else if( action == 'hide' ) {\n\t\t\t\t\t$('.'+id).addClass('pewc-hidden-field');\n\t\t\t\t\tpewc_reset_field_value( id, action );\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to retrigger calculations\n\t\t\t\t$( 'body' ).trigger( 'pewc_field_visibility_updated', [ id, action ] );\n\t\t\t}\n\t\t\tfunction pewc_conditions_not_met( id, action ) {\n\t\t\t\t\/\/ Check the outcome for conditions being met, e.g. show field \/ hide field\n\t\t\t\tif( action == 'show' ) {\n\t\t\t\t\t$('.'+id).addClass('pewc-hidden-field');\n\t\t\t\t\tpewc_reset_field_value( id, action );\n\t\t\t\t} else if( action == 'hide' ) {\n\t\t\t\t\t$('.'+id).removeClass('pewc-hidden-field');\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to retrigger calculations\n\t\t\t\t$( 'body' ).trigger( 'pewc_field_visibility_updated', [ id, action ] );\n\t\t\t}\n\t\t\tfunction pewc_reset_field_value( id, action ) {\n\t\t\t\tif( pewc_vars.reset_fields == 'yes' ) {\n\t\t\t\t\t\/\/ Reset the field value\n\t\t\t\t\tvar field = '.' + id;\n\t\t\t\t\tvar inputs = ['date', 'name_price', 'number', 'text', 'textarea', 'advanced-preview'];\n\t\t\t\t\tvar checks = ['checkbox', 'checkbox_group', 'radio'];\n\t\t\t\t\tvar field_type = $( field ).attr( 'data-field-type' );\n\t\t\t\t\tif( inputs.includes( field_type ) ) {\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).val( '' ).trigger( 'change' );\n\t\t\t\t\t} else if( field_type == 'image_swatch' ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t\t$( field ).find( '.pewc-radio-image-wrapper, .pewc-checkbox-image-wrapper' ).removeClass( 'checked' ).trigger( 'change' );\n\t\t\t\t\t} else if( field_type == 'products' ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).val( '' ).trigger( 'change' );\n\t\t\t\t\t\t$( field ).find( '.pewc-radio-image-wrapper, .pewc-checkbox-image-wrapper' ).removeClass( 'checked' );\n\t\t\t\t\t} else if( checks.includes( field_type ) ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t} else if( field_type == 'select' ) {\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).prop( 'selectedIndex', 0 ).trigger( 'change' );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t<\/script>\n\n\t\t<div class=\"quantity\">\n\t\t<label class=\"screen-reader-text\" for=\"quantity_6a4504c9aa1fb\">Polo Shirt (Fitted) quantity<\/label>\n\t<input\n\t\ttype=\"number\"\n\t\t\t\tid=\"quantity_6a4504c9aa1fb\"\n\t\tclass=\"input-text qty text\"\n\t\tname=\"quantity\"\n\t\tvalue=\"1\"\n\t\taria-label=\"Product quantity\"\n\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\tplaceholder=\"\"\n\t\t\tinputmode=\"numeric\"\n\t\t\tautocomplete=\"off\"\n\t\t\t\/>\n\t<\/div>\n\n\t\t<button type=\"submit\" name=\"add-to-cart\" value=\"18\" class=\"single_add_to_cart_button button alt\">Add to Quote<\/button>\n\n\t\t<input type=\"hidden\" id=\"wcraq_quotable_product_18\" class=\"wcraq_quotable_product\" value=\"yes\">\t<\/form>\n\n\t\n            <\/td>\n\n                        <\/tr>\n\n                                                \n    <tr id=\"ptuwc-product-row-26-1\" class=\"ptuwc-product-row ptuwc-product-row-26 instock virtual purchasable needs-shipping shipping-taxable product-type-simple\" >\n                                    \n    <td class=\"col-name\">\n\t    \t\t    Polo Shirt with Add-On Fields\t              <\/td>\n\n                                                \n    <td class=\"col-price\">\n        <span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\" translate=\"no\">&pound;<\/span>25.00<\/bdi><\/span>    <\/td>\n\n                                                \n    <td class=\"col-stock\">\n\t    <p class=\"stock in-stock\">In stock<\/p>    <\/td>\n\n                                                \n    <td class=\"col-add-to-cart variations-display-none\">\n                    <button type=\"submit\" class=\"ptuwc_config_row_trigger single_add_to_cart_button button alt\">\n                Select options            <\/button>\n            <\/td>\n\n                        <\/tr>\n\n\n    <tr id=\"ptuwc-product-config-row-26-1\" class=\"ptuwc-product-config-row ptuwc-product-config-row-26\"  style=\"display: none;\">\n                                    \n    <td class=\"col-config-add-to-cart\" colspan=\"auto\">\n        \n\t\n\t<form class=\"cart\" action=\"https:\/\/pluginrepublic.dev\/request-quote\/product\/polo-shirt-with-add-on-fields\/\" method=\"post\" enctype='multipart\/form-data'>\n\t\t\t<script>\n\t\tvar pewc_cost_triggers = [];\n\t\tvar pewc_quantity_triggers = [];\n\t<\/script>\n\t<div class=\"pewc-product-extra-groups-wrap pewc-groups-standard pewc-teaser-options-5\" >\n\t<style type=\"text\/css\">\n\t\tform.cart .pewc-groups-lightbox.pewc-teaser-options-5 .pewc-radio-image-wrapper:nth-child(n+6),\n\t\tform.cart .pewc-groups-lightbox.pewc-teaser-options-5 .pewc-checkbox-image-wrapper:nth-child(n+6) {\n\t\t\tdisplay: none\n\t\t}\n\t\t\t\t\t.pewc-lightbox .pewc-lightbox-field {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t<\/style>\n\n\t\t<input type=\"hidden\" name=\"pewc_product_hash\" value=\"pewc_6a4504c9ac267\">\n<div id=\"pewc-group-27\" class=\"pewc-group-wrap pewc-group-wrap-27 pewc-group-index-0 first-group\"  data-group-id= '27' data-group-index= '0' data-condition-action= '' data-condition-match= '' data-conditions= '[]'><div class=\"pewc-group-heading-wrapper\"><\/div><div class=\"pewc-group-content-wrapper \"><ul class=\"pewc-product-extra-groups \">\n\t<li class=\"pewc-item pewc-group pewc_group_27_28 pewc-group-checkbox pewc-item-checkbox pewc-field-28 pewc-field-count-0 pewc-option-list  pewc-field-triggers-condition\"  data-price='0' data-id='pewc_group_27_28' data-selected-option-price='' data-field-id='28' data-field-type='checkbox' data-field-price='0' data-field-label='Add Logo' data-field-value='' data-field-layered='no' data-field-index='0' data-field-class='' data-option-price-visibility='visible' data-triggers-for='[29]' data-default-value='' >\n\n\t\t<div class=\"pewc-item-field-wrapper\"><label class=\"pewc-checkbox-form-label\" for=\"pewc_group_27_28\"><input type=\"checkbox\" class=\"pewc-form-field\" id=\"pewc_group_27_28\" name=\"pewc_group_27_28\" aria-label=\"Add Logo\"  value=\"__checked__\">&nbsp;<span>Add Logo<span class=\"required\"> &#42;<\/span><\/span><span class=\"pewc-theme-element\"><\/span><\/label><\/div>\n\t<\/li><!-- .pewc-item -->\n\n\n\t<li class=\"pewc-item pewc-group pewc_group_27_29 pewc-group-upload pewc-item-upload pewc-field-29 pewc-field-count-1 pewc-hidden-field  pewc-field-has-condition\"  data-price='0' data-id='pewc_group_27_29' data-selected-option-price='' data-field-id='29' data-field-type='upload' data-field-price='0' data-field-label='Upload Logo' data-field-value='' data-field-layered='no' data-field-index='1' data-field-class='' data-option-price-visibility='visible' data-trigger-fields='[28]' data-field-conditions-match='all' data-field-conditions-action='show' data-field-conditions='[{&quot;field&quot;:&quot;pewc_group_27_28&quot;,&quot;rule&quot;:&quot;is&quot;,&quot;value&quot;:&quot;__checked__&quot;,&quot;key&quot;:&quot;__checked__&quot;,&quot;field_type&quot;:&quot;checkbox&quot;}]' data-default-value='' >\n\n\t\t<div class=\"pewc-item-field-wrapper\"><h4 class=\"pewc-field-label\" for=\"pewc_group_27_29\"><span class=\"pewc-field-label-text\">Upload Logo<\/span><span class=\"required\"> &#42;<\/span><\/h4>\n\t\t<div class=\"dropzone\" id=\"dz_pewc_group_27_29\" aria-label=\"Upload Logo\"><\/div>\n\t\t<input type=\"hidden\" id=\"pewc_group_27_29\" name=\"pewc_group_27_29[]\" value=\"pewc_group_27_29\">\n\t\t<input type=\"hidden\" class=\"pewc_file_data\" name=\"pewc_file_data[29]\" id=\"pewc_group_27_29_file_data\" value=\"\">\n\t\t<input type=\"hidden\" class=\"pewc-form-field pewc-number-uploads\" name=\"pewc_group_27_29_number_uploads\" id=\"pewc_group_27_29_number_uploads\" value=\"\">\n\t\t<input type=\"hidden\" name=\"pewc_group_27_29_multiply_price\" id=\"pewc_group_27_29_multiply_price\" value=\"0\">\n\t\t<input type=\"hidden\" name=\"pewc_group_27_29_base_price\" id=\"pewc_group_27_29_base_price\" value=\"0\">\n\t\t<input type=\"hidden\" class=\"pewc_pdf_count_field\" name=\"field_29_pdf_count\" id=\"field_29_pdf_count\" value=\"\">\n\n\t\t\n\t<script>\n\t\tDropzone.autoDiscover = false;\n\t\tjQuery(document).ready(function( $ ) {\n\n\t\t\t\n\t\t\tvar ajaxUrl = pewc_vars.ajaxurl;\n\t\t\tvar dropzone_pewc_group_27_29 = new Dropzone( \"#dz_pewc_group_27_29\", {\n\n\t\t\t\tdictDefaultMessage: \"Drop files here to upload\",\n\t\t\t\tdictFallbackMessage: \"Your browser does not support drag and drop file uploads\",\n\t\t\t\tdictFallbackText: \"Please use the fallback form below to upload your files like in the olden days\",\n\t\t\t\tdictFileTooBig: \"The file is too big\",\n\t\t\t\tdictInvalidFileType: \"You cannot upload files of this type\",\n\t\t\t\tdictCancelUpload: \"Cancel upload\",\n\t\t\t\tdictUploadCanceled: \"Upload cancelled.\",\n\t\t\t\tdictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\n\t\t\t\tdictRemoveFile: \"Remove file\",\n\t\t\t\tdictMaxFilesExceeded: \"You cannot upload any more files.\",\n\n\t\t\t\tpreviewTemplate: document.querySelector('#tpl').innerHTML,\n\t\t\t\turl: ajaxUrl,\n\t\t\t\tacceptedFiles: \".jpg, .jpeg, .jpe, .png, .gif\",\n\t\t\t\tmaxFiles: 1,\n\t\t\t\tmaxFilesize: 1,\n\t\t\t\tthumbnailWidth: 1000,\n\t\t\t\tthumbnailHeight: 1000,\n\t\t\t\taddRemoveLinks: true,\n\t\t\t\tuploadMultiple: true,\n\t\t\t\tmaxThumbnailFilesize: 10,\n\t\t\t\ttimeout: 30000,\n\t\t\t\t\t\t\t\tinit: function() {\n\t\t\t\t\t\n\t\t\t\t\tthis.on( 'sendingmultiple', function( file, xhr, formData ) {\n\t\t\t\t\t\tvar field_id = 29;\n\t\t\t\t\t\t$( '#field_' + field_id + '_pdf_count' ).val( 0 );\n\t\t\t\t\t\t\t\t\t\t\t\tformData.append( 'action', 'pewc_dropzone_upload' );\n\t\t\t\t\t\tformData.append( 'pewc_file_upload', $( '#pewc_file_upload' ).val() );\n\t\t\t\t\t\tformData.append( 'field_id', '29' );\n\t\t\t\t\t\tformData.append( 'pewc_product_id', $( '#pewc_product_id' ).val() );\n\t\t\t\t\t\tformData.append( 'file_data', $( '#pewc_group_27_29_file_data' ).val() );\n\t\t\t\t\t\tformData.append( 'pewc_item_id', 'pewc_group_27_29' ); \/\/ 3.27.2\n\t\t\t\t\t\t\/\/ Safari seems to have issues with special characters, we pass the encoded filename for now, to be used later\n\t\t\t\t\t\tfor ( k in file ) {\n\t\t\t\t\t\t\tformData.append( 'filename_encoded['+k+']', encodeURIComponent( file[k].name ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tthis.on( 'successmultiple', function( file, response ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t});\n\t\t\t\t\tthis.on( 'complete', function( file ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t});\n\t\t\t\t\tthis.on( 'queuecomplete', function() {\n\t\t\t\t\t\t\/\/ We use this method because successmultiple was overwriting some files when used with Advanced Uploads\n\t\t\t\t\t\tvar files = dropzone_pewc_group_27_29.files;\n\t\t\t\t\t\tvar num_files = dropzone_pewc_group_27_29.files.length;\n\t\t\t\t\t\tvar all_files = [];\n\t\t\t\t\t\tvar uploaded_files = [];\n\t\t\t\t\t\tvar page_counts = [];\n\n\t\t\t\t\t\tif ( num_files > 0 && $( '#pewc_group_27_29_file_data' ).val() != '' ) {\n\t\t\t\t\t\t\t\/\/ on 3.9.7, we regenerate the dropzone area if files were previously uploaded\n\t\t\t\t\t\t\tuploaded_files = JSON.parse( $( '#pewc_group_27_29_file_data' ).val() );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\/\/ Ensure we have a list of the currently uploaded files, excluding any that may have been removed\n\t\t\t\t\t\tif( files ) {\n\t\t\t\t\t\t\tfor( k in files ) {\n\t\t\t\t\t\t\t\tvar file = files[k];\n\t\t\t\t\t\t\t\tif( file.xhr === undefined) {\n\t\t\t\t\t\t\t\t\tif ( uploaded_files.length > 0 && uploaded_files[k] ) {\n\t\t\t\t\t\t\t\t\t\t\/\/ use the already uploaded files instead\n\t\t\t\t\t\t\t\t\t\tall_files.push( uploaded_files[k]) ;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcontinue; \/\/ if we're regenerating the dropzone, this is undefined, so skip the rest of the loop\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tvar response = JSON.parse( file.xhr.response );\n\t\t\t\t\t\t\t\tvar received_files = response.data.files;\n\t\t\t\t\t\t\t\tif( received_files ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor( f in received_files ) {\n\t\t\t\t\t\t\t\t\t\tif( file.name === received_files[f].name || file.name === decodeURIComponent( received_files[f].name_encoded ) ) {\n\t\t\t\t\t\t\t\t\t\t\t\/\/ If this is a PDF and the option is enabled, count the pages\n\t\t\t\t\t\t\t\t\t\t\tif( pewc_vars.pdf_count == 'yes' && received_files[f].type == 'application\/pdf' ) {\n\t\t\t\t\t\t\t\t\t\t\t\t$( file.previewElement ).find( '.dz-success-mark' ).append( '<div class=\"pewc-counting-pdf-pages-text\">' + pewc_vars.counting_pages_text + '<\/div>' ); \/\/ 3.26.5\n\t\t\t\t\t\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\t\t\t\t\t\t\t\turl: pewc_vars.ajaxurl,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'wcpauau_get_pdf_page_count',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpath: received_files[f].file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: received_files[f].name\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\tsuccess: function( response ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$( file.previewElement ).find( '.pewc-counting-pdf-pages-text' ).remove(); \/\/ 3.26.5\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar field_id = 29;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif( ! $( '#field_' + field_id + '_pdf_count' ).val() ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrent_count = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrent_count = parseInt( $( '#field_' + field_id + '_pdf_count' ).val() );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfile.pageCount = parseInt( response.data.count );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar element = {};\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telement.name = response.data.name;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telement.count = response.data.count;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpage_counts.push( element );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$( '#field_' + field_id + '_pdf_count' ).attr( 'data-counts', JSON.stringify( page_counts ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrent_count += parseInt( response.data.count );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$( '#field_' + field_id + '_pdf_count' ).val( current_count );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ 3.25.5, trigger calculation, so that the calc field that is using the pdf page count updates its value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'pewc_trigger_calculations' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( response.data.error != '' ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talert( 'There was an error in getting the PDF page count: ' + response.data.error );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\/\/ Identify the file from the response data\n\t\t\t\t\t\t\t\t\t\t\tall_files.push( received_files[f] );\n\t\t\t\t\t\t\t\t\t\t\tif ( received_files[f].pdf_thumb ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\/\/ the uploaded file was a PDF, get the generated PDF thumb if it exists and use it\n\t\t\t\t\t\t\t\t\t\t\t\t$(file.previewElement).find(\".pewc-dz-image-wrapper img\").attr(\"src\", received_files[f].pdf_thumb + '?' + Math.random());\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$( '#pewc_group_27_29_file_data' ).val( JSON.stringify( all_files ) );\n\t\t\t\t\t\tvar num_all_files = all_files.length; \/\/ 3.10.5, maybe this is more accurate, because this can detect failed uploads\n\n\t\t\t\t\t\tvar upload_delay = setTimeout(\n\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t$( '#pewc_group_27_29_number_uploads' ).val( JSON.stringify( num_all_files ) ).trigger( 'change' );\n\t\t\t\t\t\t\t\tvar pewc_item = $( '#dz_pewc_group_27_29' ).closest( '.pewc-item' );\n\n\t\t\t\t\t\t\t\tif ( num_all_files > 0 ) {\n\t\t\t\t\t\t\t\t\tvar price = $( '#pewc_group_27_29_base_price' ).val();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpewc_item.attr( 'data-price', price );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tpewc_item.attr( 'data-price', 0 );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'pewc_force_update_total_js' );\n\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'pewc_check_conditions' );\n\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'pewc_trigger_calculations' );\n\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'pewc_image_uploaded', [ 'pewc_group_27_29', num_all_files ] );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpewc_vars.pdf_count_timer\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\tthis.on( 'removedfile', function( file, response ) {\n\t\t\t\t\t\t$( '.dropzone.dz-clickable' ).block({\n\t\t\t\t\t\t\tmessage: null,\n\t\t\t\t\t\t\toverlayCSS:  {\n\t\t\t\t\t\t\t\tbackgroundColor: '#fff',\n\t\t\t\t\t\t\t\topacity:         0.6,\n\t\t\t\t\t\t\t\tcursor:          'wait'\n\t\t\t\t\t    \t},\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\/\/ Delete pdf count value\n\t\t\t\t\t\tvar field_id = 29;\n\t\t\t\t\t\tif( pewc_vars.pdf_count == 'yes' && file.type == 'application\/pdf' ) {\n\t\t\t\t\t\t\tvar page_counts = $( '#field_' + field_id + '_pdf_count' ).attr( 'data-counts' );\n\t\t\t\t\t\t\tpage_counts = JSON.parse( page_counts );\n\t\t\t\t\t\t\tvar page_count = 0;\n\t\t\t\t\t\t\tfor( p in page_counts ) {\n\t\t\t\t\t\t\t\tvar element = page_counts[p];\n\t\t\t\t\t\t\t\tif( element.name == file.name ) {\n\t\t\t\t\t\t\t\t\tpage_count = parseInt( element.count );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif( isNaN( page_count ) ) page_count = 0;\n\t\t\t\t\t\t\tvar current_count = parseInt( $( '#field_' + field_id + '_pdf_count' ).val() );\n\t\t\t\t\t\t\tvar new_count = current_count - page_count;\n\t\t\t\t\t\t\t$( '#field_' + field_id + '_pdf_count' ).val( new_count ).trigger( 'change' );\n\t\t\t\t\t\t\t\/\/ $( 'body' ).trigger( 'pewc_trigger_calculations' );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar remove_data = {\n\t\t\t\t\t\t\taction: 'pewc_dropzone_remove',\n\t\t\t\t\t\t\tfile: file.name,\n\t\t\t\t\t\t\tpewc_file_upload: $( '#pewc_file_upload' ).val(),\n\t\t\t\t\t\t\tfile_data: $( '#pewc_group_27_29_file_data' ).val()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif ( file.wcpauau_from_cropper != undefined && file.wcpauau_from_cropper == 'yes' ) {\n\t\t\t\t\t\t\tremove_data['wcpauau_from_cropper'] = 'yes'; \/\/ 3.18.2\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\t\turl: pewc_vars.ajaxurl,\n\t\t\t\t\t\t\tdata: remove_data,\n\t\t\t\t\t\t\tsuccess: function( response ) {\n\t\t\t\t\t\t\t\t$( '.dropzone.dz-clickable' ).unblock();\n\t\t\t\t\t\t\t\t$( '#pewc_group_27_29_file_data' ).val( JSON.stringify( response.data.files ) );\n\t\t\t\t\t\t\t\tvar num_files = response.data.count;\n\t\t\t\t\t\t\t\tif( num_files === 0 ) {\n\t\t\t\t\t\t\t\t\t$( '#pewc_group_27_29_file_data' ).val( '' );\n\t\t\t\t\t\t\t\t\t$( '#field_' + field_id + '_pdf_count' ).val( 0 ).trigger( 'change' );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$( '#pewc_group_27_29_number_uploads' ).val( JSON.stringify( num_files ) ).trigger( 'change' );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$( '#dz_pewc_group_27_29' ).closest( '.pewc-item' ).find( '.aouau-quantity-field' ).trigger( 'wcaouau-update-quantity-field' );\n\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'pewc_check_conditions' );\n\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'pewc_trigger_calculations' );\n\t\t\t\t\t\t\t\t$( 'body' ).trigger( 'pewc_image_removed', [ 'pewc_group_27_29' ]);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\terror: function( xhr, statusText, errorThrown ) {\n\t\t\t\t\t\t\t\t\/\/ aou-improvements-4.3.5, when remove fails. File is removed from Dropzone anyway but not on the server, fail silently for now?\n\t\t\t\t\t\t\t\t$( '.dropzone.dz-clickable' ).unblock();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tthis.on( 'error', function( file, response, xhr ) {\n\t\t\t\t\t\t\/\/ aou-improvements-4.3.5, when upload fails\n\t\t\t\t\t\tvar message = ( response && response.data ) ? response.data : response;\n\t\t\t\t\t\tvar errorEl = file.previewElement.querySelector('[data-dz-errormessage]');\n    \t\t\t\t\tif ( errorEl ) errorEl.textContent = message;\n\t\t\t\t\t\t$( '.dropzone.dz-clickable' ).unblock();\n\t\t\t\t\t});\n\n\t\t\t\t},\n\n\t\t\t\t\n\t\t\t});\n\n\n\t\t\t\/\/ if the product page has been submitted but there's an error, we'll try to re-build the dropzone area with previously uploaded files, so that they won't have to re-upload again\n\t\t\tvar pewc_file_data = $( '#pewc_group_27_29_file_data' ).val();\n\t\t\tif ( pewc_file_data != '') {\n\t\t\t\t\/\/ convert to JSON\n\t\t\t\tvar pewc_file_data_json = JSON.parse( pewc_file_data );\n\t\t\t\t\/\/ loop through each file\n\t\t\t\t$.each(pewc_file_data_json, function(key, value){\n\t\t\t\t\tvar existingFile = value;\n\n\t\t\t\t\t\/\/ add other elements needed by Advanced Uploads\n\t\t\t\t\tvar new_uuid = Dropzone.uuidv4();\n\t\t\t\t\texistingFile.upload = { uuid : new_uuid };\n\t\t\t\t\texistingFile.accepted = true;\n\n\t\t\t\t\tdropzone_pewc_group_27_29.files.push( existingFile );\n\n\t\t\t\t\tdropzone_pewc_group_27_29.emit( 'addedfile', existingFile );\n\t\t\t\t\tif ( existingFile.pdf_thumb ) {\n\t\t\t\t\t\tdropzone_pewc_group_27_29.options.thumbnail.call(dropzone_pewc_group_27_29, existingFile, existingFile.pdf_thumb );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropzone_pewc_group_27_29.options.thumbnail.call(dropzone_pewc_group_27_29, existingFile, 'https:\/\/pluginrepublic.dev\/request-quote' + existingFile.url );\n\t\t\t\t\t}\n\t\t\t\t\tdropzone_pewc_group_27_29.emit( 'success', existingFile ); \/\/ shows the \"Uploaded\" text\n\t\t\t\t\tdropzone_pewc_group_27_29.emit( 'complete', existingFile ); \/\/ this needs to be called, or the upload bar will appear\n\t\t\t\t\tdropzone_pewc_group_27_29._updateMaxFilesReachedClass();\n\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t\n\t\t});\n\t<\/script>\n\n\t\n\t\n<p class=\"pewc-description\"><small>Max file size: 1 MB<\/small><small>Permitted file types: jpg jpeg jpe png gif<\/small><\/p><\/div>\n\t<\/li><!-- .pewc-item -->\n\n<\/ul><\/div><\/div><input type=\"hidden\" id=\"pewc-product-price\" name=\"pewc-product-price\" value=\"25\"><input type=\"hidden\" id=\"pewc_calc_set_price\" name=\"pewc_calc_set_price\" data-calc-set value=\"\"><input type=\"hidden\" id=\"pewc_total_calc_price\" name=\"pewc_total_calc_price\" value=\"25\"><input type=\"hidden\" id=\"pewc_variation_price\" name=\"pewc_variation_price\" value=\"\"><input type=\"hidden\" id=\"pewc_product_length\" name=\"pewc_product_length\" value=\"\"><input type=\"hidden\" id=\"pewc_product_width\" name=\"pewc_product_width\" value=\"\"><input type=\"hidden\" id=\"pewc_product_height\" name=\"pewc_product_height\" value=\"\"><input type=\"hidden\" id=\"pewc_product_weight\" name=\"pewc_product_weight\" value=\"\"><input type=\"hidden\" id=\"pewc_product_id\" name=\"pewc_product_id\" value=\"26\"><input type=\"hidden\" name=\"pewc-grid-total-variations\" id=\"pewc-grid-total-variations\" value=\"\"><input type=\"hidden\" id=\"pewc_file_upload\" name=\"pewc_file_upload\" value=\"0e503bc575\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/request-quote\/wp-json\/wp\/v2\/pages\/160\" \/><input type=\"hidden\" id=\"pewc_total\" name=\"pewc_total\" value=\"46cdc28824\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/request-quote\/wp-json\/wp\/v2\/pages\/160\" \/>\n<\/div>\t<script>\n\t\tjQuery(document).ready(function($) {\n\t\t\tvar conditions_met_pewc_group_27_29 = [0];\nfunction pewc_check_rules_for_pewc_group_27_29( field_value ) {\nvar action_pewc_group_27_29 = 'show';\nvar match_pewc_group_27_29 = 'all';\nvar field_value_0 = $('#pewc_group_27_28').val();\nvar condition_value_0 = '__checked__';\nif( $('.pewc_group_27_28').hasClass('pewc-item-radio') ){\nfield_value_0 = $('.pewc_group_27_28 input:radio:checked').val();\nif( field_value_0 == undefined ){\nfield_value_0 = '';\n}\n}\nif($('.pewc_group_27_28').hasClass('pewc-item-products-radio')){\nfield_value_0 = $('.pewc_group_27_28 input:radio:checked').val();\n}\nif($('.pewc_group_27_28').hasClass('pewc-item-products-checkboxes') || $('.pewc_group_27_28').hasClass('pewc-item-products-column')){\nvar field_value_0 = [];\n$.each( $(\"input[name='pewc_group_27_28_child_product[]']:checked\"), function(){\n\n\t\t\t\t\t\t\t\t\t\t\t\tfield_value_0.push($(this).val());\n\n\t\t\t\t\t\t\t\t\t\t\t});\n}\nif($('.pewc_group_27_28').hasClass('pewc-item-image-swatch-checkbox') || $('.pewc_group_27_28').hasClass('pewc-item-checkbox_group') ){\nvar field_value_0 = [];\n$.each( $(\"input[name='pewc_group_27_28[]']:checked\"), function(){\n\n\t\t\t\t\t\t\t\t\t\t\t\tfield_value_0.push($(this).val());\n\n\t\t\t\t\t\t\t\t\t\t\t});\n}\nif( $( '.pewc_group_27_28' ).hasClass( 'pewc-item-upload' ) ){\nfield_value_0 = $( '.pewc_group_27_28' ).find( '.pewc-number-uploads' ).val();\n}\nif( condition_value_0 != undefined ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tcondition_value_0 = condition_value_0.replace( \/'\/g, '_' );\n\n\t\t\t\t\t\t\t\t\t\t\t\tcondition_value_0 = condition_value_0.replace( \/\"\/g, '_' );\n\n\t\t\t\t\t\t\t\t\t\t\t}\nif( field_value_0 != undefined ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tfield_value_0 = field_value_0.replace( \/'\/g, '_' );\n\n\t\t\t\t\t\t\t\t\t\t\t\tfield_value_0 = field_value_0.replace( \/\"\/g, '_' );\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif( field_value_0 == '__checked__' ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\/* It's a checkbox *\/\n\n\t\t\t\t\t\t\t\t\t\t\t\tvar checked = $('#pewc_group_27_28').prop('checked');\n\n\t\t\t\t\t\t\t\t\t\t\t\tif( checked == true ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\/* This condition is met *\/\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconditions_met_pewc_group_27_29[0] = 1;\n\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tconditions_met_pewc_group_27_29[0] = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t} else if( field_value_0 == condition_value_0 ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tconditions_met_pewc_group_27_29[0] = 1;\n\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t\tconditions_met_pewc_group_27_29[0] = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t}\nif( conditions_met_pewc_group_27_29[0] == 0 && match_pewc_group_27_29 == 'all' ) {\n\n\t\t\t\t\t\t\t\t\t\t\tconditions_met_pewc_group_27_29[0] = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\/* return conditions_met_pewc_group_27_29; *\/\n\n\t\t\t\t\t\t\t\t\t\t}\npewc_check_all_conditions( 'pewc_group_27_29', conditions_met_pewc_group_27_29, action_pewc_group_27_29, match_pewc_group_27_29 );\nreturn conditions_met_pewc_group_27_29;\n}\n$( 'body' ).on( 'change update keyup paste click', '#pewc_group_27_28, .pewc_group_27_28 .pewc-radio-form-field', function( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tpewc_check_rules_for_pewc_group_27_29( parseFloat( $(this).val() ) );\n\n\t\t\t\t\t\t\t\t\t\t});\n$( 'body' ).on( 'calculation_field_updated', function() {\n\n\t\t\t\t\t\t\t\t\t\t\tpewc_check_rules_for_pewc_group_27_29( parseFloat( $(this).val() ) );\n\n\t\t\t\t\t\t\t\t\t\t});\n$('body').on('change','.pewc_group_27_28 .pewc-checkbox-form-field',function(){\n\n\t\t\t\t\t\t\t\t\t\t\tpewc_check_rules_for_pewc_group_27_29( $(this).val() );\n\n\t\t\t\t\t\t\t\t\t\t});\nfunction pewc_do_initial_check() {\npewc_check_rules_for_pewc_group_27_29();\n}\nif( typeof pewc_do_initial_check == 'function' ) {\n\n\t\t\t\t\tpewc_do_initial_check();\n\n\t\t\t\t}\n$( 'body' ).on( 'pewc_check_conditions', function() {\n\t\t\t\t\tif( typeof pewc_do_initial_check == 'function' ) {\n\t\t\t\t\t\tpewc_do_initial_check();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\/\/ These functions are fired when a set of rules are met for a field\n\t\t\tfunction pewc_check_all_conditions( id, conditions_met, action, match ) {\n\t\t\t\tif( match == 'all' ) {\n\t\t\t\t\tvar all_met=true;\n\t\t\t\t\tnum_req = conditions_met.length;\n\t\t\t\t\tfor(var i=0;i<num_req;i++) {\n\t\t\t\t\t\tif(conditions_met[i] != 1) {\n\t\t\t\t\t\t\tall_met=false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( all_met ) {\n\t\t\t\t\t\tpewc_conditions_met( id, action );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpewc_conditions_not_met( id, action );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar any_met=false;\n\t\t\t\t\tnum_req = conditions_met.length;\n\t\t\t\t\tfor(var i=0;i<num_req;i++) {\n\t\t\t\t\t\tif(conditions_met[i] == 1){\n\t\t\t\t\t\t\tany_met=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( any_met ) {\n\t\t\t\t\t\tpewc_conditions_met( id, action );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpewc_conditions_not_met( id, action );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( typeof pewc_update_total_js == 'function' ) {\n\t\t\t\t\tpewc_update_total_js();\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to check for hidden groups\n\t\t\t\t$( 'body' ).one( 'pewc_conditions_checked' );\n\t\t\t}\n\t\t\tfunction pewc_conditions_met( id, action ) {\n\t\t\t\t\/\/ Check the outcome for conditions being met, e.g. show field \/ hide field\n\t\t\t\tif( action == 'show' ) {\n\t\t\t\t\t$('.'+id).removeClass('pewc-hidden-field');\n\t\t\t\t} else if( action == 'hide' ) {\n\t\t\t\t\t$('.'+id).addClass('pewc-hidden-field');\n\t\t\t\t\tpewc_reset_field_value( id, action );\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to retrigger calculations\n\t\t\t\t$( 'body' ).trigger( 'pewc_field_visibility_updated', [ id, action ] );\n\t\t\t}\n\t\t\tfunction pewc_conditions_not_met( id, action ) {\n\t\t\t\t\/\/ Check the outcome for conditions being met, e.g. show field \/ hide field\n\t\t\t\tif( action == 'show' ) {\n\t\t\t\t\t$('.'+id).addClass('pewc-hidden-field');\n\t\t\t\t\tpewc_reset_field_value( id, action );\n\t\t\t\t} else if( action == 'hide' ) {\n\t\t\t\t\t$('.'+id).removeClass('pewc-hidden-field');\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to retrigger calculations\n\t\t\t\t$( 'body' ).trigger( 'pewc_field_visibility_updated', [ id, action ] );\n\t\t\t}\n\t\t\tfunction pewc_reset_field_value( id, action ) {\n\t\t\t\tif( pewc_vars.reset_fields == 'yes' ) {\n\t\t\t\t\t\/\/ Reset the field value\n\t\t\t\t\tvar field = '.' + id;\n\t\t\t\t\tvar inputs = ['date', 'name_price', 'number', 'text', 'textarea', 'advanced-preview'];\n\t\t\t\t\tvar checks = ['checkbox', 'checkbox_group', 'radio'];\n\t\t\t\t\tvar field_type = $( field ).attr( 'data-field-type' );\n\t\t\t\t\tif( inputs.includes( field_type ) ) {\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).val( '' ).trigger( 'change' );\n\t\t\t\t\t} else if( field_type == 'image_swatch' ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t\t$( field ).find( '.pewc-radio-image-wrapper, .pewc-checkbox-image-wrapper' ).removeClass( 'checked' ).trigger( 'change' );\n\t\t\t\t\t} else if( field_type == 'products' ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).val( '' ).trigger( 'change' );\n\t\t\t\t\t\t$( field ).find( '.pewc-radio-image-wrapper, .pewc-checkbox-image-wrapper' ).removeClass( 'checked' );\n\t\t\t\t\t} else if( checks.includes( field_type ) ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t} else if( field_type == 'select' ) {\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).prop( 'selectedIndex', 0 ).trigger( 'change' );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t<\/script>\n\n\t\t<div class=\"quantity\">\n\t\t<label class=\"screen-reader-text\" for=\"quantity_6a4504c9ad049\">Polo Shirt with Add-On Fields quantity<\/label>\n\t<input\n\t\ttype=\"number\"\n\t\t\t\tid=\"quantity_6a4504c9ad049\"\n\t\tclass=\"input-text qty text\"\n\t\tname=\"quantity\"\n\t\tvalue=\"1\"\n\t\taria-label=\"Product quantity\"\n\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\tplaceholder=\"\"\n\t\t\tinputmode=\"numeric\"\n\t\t\tautocomplete=\"off\"\n\t\t\t\/>\n\t<\/div>\n\n\t\t<button type=\"submit\" name=\"add-to-cart\" value=\"26\" class=\"single_add_to_cart_button button alt\">Add to Quote<\/button>\n\n\t\t<input type=\"hidden\" id=\"wcraq_quotable_product_26\" class=\"wcraq_quotable_product\" value=\"yes\">\t<\/form>\n\n\t\n    <\/td>\n\n                        <\/tr>\n\n                                                \n    <tr id=\"ptuwc-product-row-17-1\" class=\"ptuwc-product-row ptuwc-product-row-17 instock virtual purchasable needs-shipping shipping-taxable product-type-simple\" >\n                                    \n    <td class=\"col-name\">\n\t    \t\t    Polo Shirt with Trim\t              <\/td>\n\n                                                \n    <td class=\"col-price\">\n        <span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\" translate=\"no\">&pound;<\/span>25.00<\/bdi><\/span>    <\/td>\n\n                                                \n    <td class=\"col-stock\">\n\t    <p class=\"stock in-stock\">In stock<\/p>    <\/td>\n\n                                                \n    <td class=\"col-add-to-cart variations-display-none\">\n                                \n\t\n\t<form class=\"cart\" action=\"https:\/\/pluginrepublic.dev\/request-quote\/product\/polo-shirt-with-trim\/\" method=\"post\" enctype='multipart\/form-data'>\n\t\t\t<script>\n\t\tvar pewc_cost_triggers = [];\n\t\tvar pewc_quantity_triggers = [];\n\t<\/script>\n\t\t<script>\n\t\tjQuery(document).ready(function($) {\n\t\t\t\n\t\t\t\/\/ These functions are fired when a set of rules are met for a field\n\t\t\tfunction pewc_check_all_conditions( id, conditions_met, action, match ) {\n\t\t\t\tif( match == 'all' ) {\n\t\t\t\t\tvar all_met=true;\n\t\t\t\t\tnum_req = conditions_met.length;\n\t\t\t\t\tfor(var i=0;i<num_req;i++) {\n\t\t\t\t\t\tif(conditions_met[i] != 1) {\n\t\t\t\t\t\t\tall_met=false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( all_met ) {\n\t\t\t\t\t\tpewc_conditions_met( id, action );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpewc_conditions_not_met( id, action );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar any_met=false;\n\t\t\t\t\tnum_req = conditions_met.length;\n\t\t\t\t\tfor(var i=0;i<num_req;i++) {\n\t\t\t\t\t\tif(conditions_met[i] == 1){\n\t\t\t\t\t\t\tany_met=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif( any_met ) {\n\t\t\t\t\t\tpewc_conditions_met( id, action );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpewc_conditions_not_met( id, action );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( typeof pewc_update_total_js == 'function' ) {\n\t\t\t\t\tpewc_update_total_js();\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to check for hidden groups\n\t\t\t\t$( 'body' ).one( 'pewc_conditions_checked' );\n\t\t\t}\n\t\t\tfunction pewc_conditions_met( id, action ) {\n\t\t\t\t\/\/ Check the outcome for conditions being met, e.g. show field \/ hide field\n\t\t\t\tif( action == 'show' ) {\n\t\t\t\t\t$('.'+id).removeClass('pewc-hidden-field');\n\t\t\t\t} else if( action == 'hide' ) {\n\t\t\t\t\t$('.'+id).addClass('pewc-hidden-field');\n\t\t\t\t\tpewc_reset_field_value( id, action );\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to retrigger calculations\n\t\t\t\t$( 'body' ).trigger( 'pewc_field_visibility_updated', [ id, action ] );\n\t\t\t}\n\t\t\tfunction pewc_conditions_not_met( id, action ) {\n\t\t\t\t\/\/ Check the outcome for conditions being met, e.g. show field \/ hide field\n\t\t\t\tif( action == 'show' ) {\n\t\t\t\t\t$('.'+id).addClass('pewc-hidden-field');\n\t\t\t\t\tpewc_reset_field_value( id, action );\n\t\t\t\t} else if( action == 'hide' ) {\n\t\t\t\t\t$('.'+id).removeClass('pewc-hidden-field');\n\t\t\t\t}\n\t\t\t\t\/\/ Use this to retrigger calculations\n\t\t\t\t$( 'body' ).trigger( 'pewc_field_visibility_updated', [ id, action ] );\n\t\t\t}\n\t\t\tfunction pewc_reset_field_value( id, action ) {\n\t\t\t\tif( pewc_vars.reset_fields == 'yes' ) {\n\t\t\t\t\t\/\/ Reset the field value\n\t\t\t\t\tvar field = '.' + id;\n\t\t\t\t\tvar inputs = ['date', 'name_price', 'number', 'text', 'textarea', 'advanced-preview'];\n\t\t\t\t\tvar checks = ['checkbox', 'checkbox_group', 'radio'];\n\t\t\t\t\tvar field_type = $( field ).attr( 'data-field-type' );\n\t\t\t\t\tif( inputs.includes( field_type ) ) {\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).val( '' ).trigger( 'change' );\n\t\t\t\t\t} else if( field_type == 'image_swatch' ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t\t$( field ).find( '.pewc-radio-image-wrapper, .pewc-checkbox-image-wrapper' ).removeClass( 'checked' ).trigger( 'change' );\n\t\t\t\t\t} else if( field_type == 'products' ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).val( '' ).trigger( 'change' );\n\t\t\t\t\t\t$( field ).find( '.pewc-radio-image-wrapper, .pewc-checkbox-image-wrapper' ).removeClass( 'checked' );\n\t\t\t\t\t} else if( checks.includes( field_type ) ) {\n\t\t\t\t\t\t$( field ).find( 'input' ).prop( 'checked', false );\n\t\t\t\t\t} else if( field_type == 'select' ) {\n\t\t\t\t\t\t$( field ).find( '.pewc-form-field' ).prop( 'selectedIndex', 0 ).trigger( 'change' );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t<\/script>\n\n\t\t<div class=\"quantity\">\n\t\t<label class=\"screen-reader-text\" for=\"quantity_6a4504c9ad483\">Polo Shirt with Trim quantity<\/label>\n\t<input\n\t\ttype=\"number\"\n\t\t\t\tid=\"quantity_6a4504c9ad483\"\n\t\tclass=\"input-text qty text\"\n\t\tname=\"quantity\"\n\t\tvalue=\"1\"\n\t\taria-label=\"Product quantity\"\n\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\tplaceholder=\"\"\n\t\t\tinputmode=\"numeric\"\n\t\t\tautocomplete=\"off\"\n\t\t\t\/>\n\t<\/div>\n\n\t\t<button type=\"submit\" name=\"add-to-cart\" value=\"17\" class=\"single_add_to_cart_button button alt\">Add to Quote<\/button>\n\n\t\t<input type=\"hidden\" id=\"wcraq_quotable_product_17\" class=\"wcraq_quotable_product\" value=\"yes\">\t<\/form>\n\n\t\n            <\/td>\n\n                        <\/tr>\n\n                        <\/tbody>\n\t\t\n<tfoot class=\"woocommerce\">\n    <tr>\n                            <\/tr>\n<\/tfoot>\n\n\t<\/table>\n\n\t\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>This page shows Request a Quote working with the Product Table Ultimate plugin.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-160","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pluginrepublic.dev\/request-quote\/wp-json\/wp\/v2\/pages\/160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pluginrepublic.dev\/request-quote\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pluginrepublic.dev\/request-quote\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pluginrepublic.dev\/request-quote\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pluginrepublic.dev\/request-quote\/wp-json\/wp\/v2\/comments?post=160"}],"version-history":[{"count":5,"href":"https:\/\/pluginrepublic.dev\/request-quote\/wp-json\/wp\/v2\/pages\/160\/revisions"}],"predecessor-version":[{"id":166,"href":"https:\/\/pluginrepublic.dev\/request-quote\/wp-json\/wp\/v2\/pages\/160\/revisions\/166"}],"wp:attachment":[{"href":"https:\/\/pluginrepublic.dev\/request-quote\/wp-json\/wp\/v2\/media?parent=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}