Changeset 3280818
- Timestamp:
- 04/24/2025 10:32:46 AM (8 months ago)
- Location:
- woo-extra-product-options/trunk
- Files:
-
- 10 edited
-
admin/class-thwepof-admin-form-field.php (modified) (3 diffs)
-
admin/class-thwepof-admin-settings-pro.php (modified) (4 diffs)
-
changelog.txt (modified) (1 diff)
-
includes/class-thwepof.php (modified) (1 diff)
-
includes/utils/class-thwepof-utils-field.php (modified) (4 diffs)
-
languages/woo-extra-product-options.pot (modified) (11 diffs)
-
public/assets/js/thwepof-public.min.js (modified) (1 diff)
-
public/class-thwepof-public.php (modified) (4 diffs)
-
readme.txt (modified) (7 diffs)
-
woo-extra-product-options.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-extra-product-options/trunk/admin/class-thwepof-admin-form-field.php
r2723116 r3280818 43 43 'heading' => __('Heading', 'woo-extra-product-options'), 44 44 'paragraph' => __('Paragraph', 'woo-extra-product-options'), 45 'separator' => __('Separator', 'woo-extra-product-options') 45 'separator' => __('Separator', 'woo-extra-product-options'), 46 'timepicker' => __('Time Picker', 'woo-extra-product-options'), 46 47 ); 47 48 } … … 271 272 $this->render_form_field_paragraph(); 272 273 $this->render_form_field_separator(); 274 $this->render_form_field_timepicker(); 273 275 274 276 $this->render_field_form_fragment_product_list(); … … 658 660 </table> 659 661 <?php 662 } 663 664 private function render_form_field_timepicker(){ 665 $prop_value = $this->field_props['value']; 666 $prop_value['label'] = __('Default Value', 'woo-extra-product-options'); 667 668 ?> 669 <table id="thwepof_field_form_id_timepicker" class="thwepo_pp_table" width="100%" style="display:none;"> 670 <?php 671 $this->render_form_elm_row($this->field_props['title']); 672 //$this->render_form_elm_row($this->field_props['title_position']); 673 $this->render_form_elm_row($prop_value); 674 $this->render_form_elm_row($this->field_props['placeholder']); 675 //$this->render_form_elm_row($this->field_props['cssclass']); 676 //$this->render_form_elm_row($this->field_props['title_class']); 677 678 $this->render_form_elm_row_cb($this->field_props['required']); 679 $this->render_form_elm_row_cb($this->field_props['enabled']); 680 $this->render_form_elm_row_cb($this->field_props['readonly']); 681 ?> 682 </table> 683 <?php 660 684 } 661 685 -
woo-extra-product-options/trunk/admin/class-thwepof-admin-settings-pro.php
r2956784 r3280818 92 92 <div class="th-wepo-feature-list-ul"> 93 93 <ul class="th-wepo-feature-list"> 94 <li>2 7extra product fields</li>94 <li>28 extra product fields</li> 95 95 <li>Add, edit, rearrange, duplicate & delete fields and sections</li> 96 96 <li>Display fields & sections conditionally</li> … … 109 109 <li>Developer friendly with custom hooks</li> 110 110 <li>Create your own custom classes for styling the fields & sections</li> 111 <li>Edit product options from cart</li> 111 112 </ul> 112 113 </div> … … 165 166 <li><?php echo __('Checkbox Group', 'woo-extra-product-options');?></li> 166 167 <li><?php echo __('Date Picker', 'woo-extra-product-options');?></li> 167 <li><?php echo __('Time Picker', 'woo-extra-product-options');?>< span class="th-crown"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/crown.svg'); ?>"></span></li>168 <li><?php echo __('Time Picker', 'woo-extra-product-options');?></li> 168 169 <li><?php echo __('Date & Time Range Picker', 'woo-extra-product-options');?><span class="th-crown"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/crown.svg'); ?>"></span></li> 169 170 <li><?php echo __('Color Picker', 'woo-extra-product-options');?></li> … … 176 177 <li><?php echo __('HTML', 'woo-extra-product-options');?><span class="th-crown"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/crown.svg'); ?>"></span></li> 177 178 <li><?php echo __('Separator', 'woo-extra-product-options');?></li> 179 <li><?php echo __('Label swatches', 'woo-extra-product-options');?><span class="th-new"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/new.png'); ?>"></span><span class="th-crown"><img src="<?php echo esc_url(THWEPOF_URL .'admin/assets/css/crown.svg'); ?>"></span></li> 178 180 </ul> 179 181 </div> -
woo-extra-product-options/trunk/changelog.txt
r3235322 r3280818 1 1 === Changelog === 2 3 = 3.3.2 = 4 * Added new field type "Time Picker". 5 * Added WooCommerce 9.8 compatibility. 6 * Added WordPress 6.8 compatibility. 2 7 3 8 = 3.3.1 = -
woo-extra-product-options/trunk/includes/class-thwepof.php
r3156846 r3280818 43 43 'includes/model/fields/class-wepof-field-switch.php', 44 44 'includes/model/fields/class-wepof-field-separator.php', 45 'includes/model/fields/class-wepof-field-timepicker.php', 45 46 'includes/model/class-wepof-section.php', 46 47 -
woo-extra-product-options/trunk/includes/utils/class-thwepof-utils-field.php
r3034429 r3280818 83 83 }else if($type === 'paragraph'){ 84 84 return new WEPOF_Product_Field_Paragraph(); 85 }else if($type === 'timepicker'){ 86 return new WEPOF_Product_Field_TimePicker(); 85 87 } 86 88 }else{ … … 289 291 }else if($field_type === 'separator'){ 290 292 $field_html = self::get_html_separator($name, $field, $section, $value); 293 294 }else if($field_type === 'timepicker'){ 295 $field_html = self::get_html_timepicker($name, $field, $section, $value); 296 291 297 } 292 298 … … 401 407 }else if($type === 'colorpicker'){ 402 408 $class[] = 'thwepof-colorpicker'; 409 }else if($type === 'timepicker'){ 410 $class[] = ' thwepof-time-picker'; 403 411 } 404 412 … … 704 712 return $field_html; 705 713 } 714 715 private static function get_html_timepicker($name, $field, $section, $value){ 716 $props = self::prepare_field_props($field, $name, $value); 717 $props .= $field->is_readonly() ? ' data-readonly="yes"' : ' data-readonly="no"'; 718 $input_html = '<input type="text" autocomplete="off" '.$props.' >'; 719 720 $html = self::prepare_field_html_input($field, $section, $input_html); 721 return $html; 722 } 706 723 707 724 } -
woo-extra-product-options/trunk/languages/woo-extra-product-options.pot
r3235322 r3280818 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Extra product options For WooCommerce | Custom Product Addons and Fields 3.3. 1\n"5 "Project-Id-Version: Extra product options For WooCommerce | Custom Product Addons and Fields 3.3.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-extra-product-options\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-0 2-04T06:13:23+00:00\n"12 "POT-Creation-Date: 2025-04-08T05:27:43+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 37 37 38 38 #: admin/class-thwepof-admin-form-field.php:27 39 #: admin/class-thwepof-admin-settings-pro.php:15 139 #: admin/class-thwepof-admin-settings-pro.php:152 40 40 msgid "Text" 41 41 msgstr "" 42 42 43 43 #: admin/class-thwepof-admin-form-field.php:28 44 #: admin/class-thwepof-admin-settings-pro.php:15 244 #: admin/class-thwepof-admin-settings-pro.php:153 45 45 msgid "Hidden" 46 46 msgstr "" … … 48 48 #: admin/class-thwepof-admin-form-field.php:29 49 49 #: admin/class-thwepof-admin-form-field.php:57 50 #: admin/class-thwepof-admin-settings-pro.php:156 51 msgid "Number" 52 msgstr "" 53 54 #: admin/class-thwepof-admin-form-field.php:30 50 55 #: admin/class-thwepof-admin-settings-pro.php:155 51 msgid " Number"52 msgstr "" 53 54 #: admin/class-thwepof-admin-form-field.php:3 056 msgid "Telephone" 57 msgstr "" 58 59 #: admin/class-thwepof-admin-form-field.php:31 55 60 #: admin/class-thwepof-admin-settings-pro.php:154 56 msgid "Telephone"57 msgstr ""58 59 #: admin/class-thwepof-admin-form-field.php:3160 #: admin/class-thwepof-admin-settings-pro.php:15361 61 msgid "Password" 62 62 msgstr "" … … 64 64 #: admin/class-thwepof-admin-form-field.php:32 65 65 #: admin/class-thwepof-admin-form-field.php:56 66 #: admin/class-thwepof-admin-settings-pro.php:15 666 #: admin/class-thwepof-admin-settings-pro.php:157 67 67 msgid "Email" 68 68 msgstr "" … … 73 73 74 74 #: admin/class-thwepof-admin-form-field.php:34 75 #: admin/class-thwepof-admin-settings-pro.php:160 76 msgid "Slider/Range" 77 msgstr "" 78 79 #: admin/class-thwepof-admin-form-field.php:35 75 80 #: admin/class-thwepof-admin-settings-pro.php:159 76 msgid "Slider/Range"77 msgstr ""78 79 #: admin/class-thwepof-admin-form-field.php:3580 #: admin/class-thwepof-admin-settings-pro.php:15881 81 msgid "Textarea" 82 82 msgstr "" 83 83 84 84 #: admin/class-thwepof-admin-form-field.php:36 85 #: admin/class-thwepof-admin-settings-pro.php:16 285 #: admin/class-thwepof-admin-settings-pro.php:163 86 86 msgid "Select" 87 87 msgstr "" 88 88 89 89 #: admin/class-thwepof-admin-form-field.php:37 90 #: admin/class-thwepof-admin-settings-pro.php:16 490 #: admin/class-thwepof-admin-settings-pro.php:165 91 91 msgid "Checkbox" 92 92 msgstr "" 93 93 94 94 #: admin/class-thwepof-admin-form-field.php:38 95 #: admin/class-thwepof-admin-settings-pro.php:16 595 #: admin/class-thwepof-admin-settings-pro.php:166 96 96 msgid "Checkbox Group" 97 97 msgstr "" … … 102 102 103 103 #: admin/class-thwepof-admin-form-field.php:40 104 #: admin/class-thwepof-admin-settings-pro.php:16 6104 #: admin/class-thwepof-admin-settings-pro.php:167 105 105 msgid "Date Picker" 106 106 msgstr "" … … 111 111 112 112 #: admin/class-thwepof-admin-form-field.php:42 113 #: admin/class-thwepof-admin-settings-pro.php:16 0113 #: admin/class-thwepof-admin-settings-pro.php:161 114 114 msgid "Switch" 115 115 msgstr "" 116 116 117 117 #: admin/class-thwepof-admin-form-field.php:43 118 #: admin/class-thwepof-admin-settings-pro.php:17 4118 #: admin/class-thwepof-admin-settings-pro.php:175 119 119 msgid "Heading" 120 120 msgstr "" … … 125 125 126 126 #: admin/class-thwepof-admin-form-field.php:45 127 #: admin/class-thwepof-admin-settings-pro.php:17 7127 #: admin/class-thwepof-admin-settings-pro.php:178 128 128 msgid "Separator" 129 129 msgstr "" … … 704 704 705 705 #: admin/class-thwepof-admin-settings-pro.php:83 706 #: admin/class-thwepof-admin-settings-pro.php:35 0706 #: admin/class-thwepof-admin-settings-pro.php:352 707 707 msgid "Get Pro" 708 708 msgstr "" … … 712 712 msgstr "" 713 713 714 #: admin/class-thwepof-admin-settings-pro.php:15 7714 #: admin/class-thwepof-admin-settings-pro.php:158 715 715 msgid "URL" 716 716 msgstr "" 717 717 718 #: admin/class-thwepof-admin-settings-pro.php:16 1718 #: admin/class-thwepof-admin-settings-pro.php:162 719 719 msgid "Radio" 720 720 msgstr "" 721 721 722 #: admin/class-thwepof-admin-settings-pro.php:16 3722 #: admin/class-thwepof-admin-settings-pro.php:164 723 723 msgid "Multiselect " 724 724 msgstr "" 725 725 726 #: admin/class-thwepof-admin-settings-pro.php:16 7726 #: admin/class-thwepof-admin-settings-pro.php:168 727 727 msgid "Time Picker" 728 728 msgstr "" 729 729 730 #: admin/class-thwepof-admin-settings-pro.php:16 8730 #: admin/class-thwepof-admin-settings-pro.php:169 731 731 msgid "Date & Time Range Picker" 732 732 msgstr "" 733 733 734 #: admin/class-thwepof-admin-settings-pro.php:1 69734 #: admin/class-thwepof-admin-settings-pro.php:170 735 735 msgid "Color Picker" 736 736 msgstr "" 737 737 738 #: admin/class-thwepof-admin-settings-pro.php:17 0738 #: admin/class-thwepof-admin-settings-pro.php:171 739 739 msgid "Color Palette" 740 740 msgstr "" 741 741 742 #: admin/class-thwepof-admin-settings-pro.php:17 1742 #: admin/class-thwepof-admin-settings-pro.php:172 743 743 msgid "Image Group" 744 744 msgstr "" 745 745 746 #: admin/class-thwepof-admin-settings-pro.php:17 2746 #: admin/class-thwepof-admin-settings-pro.php:173 747 747 msgid "Product Group" 748 748 msgstr "" 749 749 750 #: admin/class-thwepof-admin-settings-pro.php:17 3750 #: admin/class-thwepof-admin-settings-pro.php:174 751 751 msgid "File Upload" 752 752 msgstr "" 753 753 754 #: admin/class-thwepof-admin-settings-pro.php:17 5754 #: admin/class-thwepof-admin-settings-pro.php:176 755 755 msgid "Paragraph/Label" 756 756 msgstr "" 757 757 758 #: admin/class-thwepof-admin-settings-pro.php:17 6758 #: admin/class-thwepof-admin-settings-pro.php:177 759 759 msgid "HTML" 760 msgstr "" 761 762 #: admin/class-thwepof-admin-settings-pro.php:179 763 msgid "Label swatches" 760 764 msgstr "" 761 765 -
woo-extra-product-options/trunk/public/assets/js/thwepof-public.min.js
r2877647 r3280818 1 function thwepofViewPassword(elm){thwepof_public.thwepofviewpassword(elm)}function thwepof_init(){thwepof_public.initialize_thwepof()}var thwepof_public=function($,window,document){"use strict";function initialize_thwepof(){ setup_date_picker($(".thwepo-extra-options"),"thwepof-date-picker",thwepof_public_var);var wepo_range_input=$('input[type="range"].thwepof-input-field');wepo_range_input.each(function(){display_range_value(this)}),wepo_range_input.on("change",function(){display_range_value(this)}),$(".thwepof-mask-input").each(function(){apply_input_masking(this)})}function setup_date_picker(form,class_selector,data){$("."+class_selector).each(function(){var readonly=$(this).data("readonly");readonly="yes"===readonly;var yearRange=$(this).data("year-range");yearRange=""==yearRange?"-100:+10":yearRange,$(this).datepicker({showButtonPanel:!0,changeMonth:!0,changeYear:!0,yearRange:yearRange}),$(this).prop("readonly",readonly)})}function oceanwp_qv_field_validating_notice(){jQuery("body").off("adding_to_cart").on("adding_to_cart",function(event,addToCartBtn,formData){var $cartForm=$("#owp-qv-content").find("form.cart"),$table=$cartForm.find("table.thwepo-extra-options"),$requiredTrs=$table.find("tr:has(abbr.required)"),$requiredTds=$requiredTrs.find("td.value, td.abovefield"),inputNames=[],reqFields_data=[];$requiredTds.each(function(){$(this).find("input, select, textarea").each(function(){var inputName=$(this).attr("name");if(void 0!==inputName){var $labelTr=$(this).closest("tr"),labelText=$labelTr.find("label.label-tag").text().trim(),ftype="other";$labelTr.has('input[type="email"]').length?ftype="email":$labelTr.has('input[type="url"]').length&&(ftype="url"),inputNames.push(inputName),reqFields_data.push({name:inputName,label:labelText,type:ftype})}})});for(var filteredNames=Array.from(new Set(inputNames)),req_fields=[],i=0;i<filteredNames.length;i++){for(var flag=0,j=0;j<formData.length;j++)formData[j].name==filteredNames[i]&&""!=formData[j].value&&(flag=1);flag||req_fields.push(filteredNames[i])}if(addToCartBtn.hasClass("notincart")&&addToCartBtn.removeClass("notincart"),0!==req_fields.length){for(var reqLabels=[],i=0;i<req_fields.length;i++)for(var j=0;j<reqFields_data.length;j++)if(req_fields[i]==reqFields_data[j].name){reqLabels.push(reqFields_data[j].label);break}1===reqLabels.length?alert(reqLabels+" is a required field"):alert(reqLabels.join("\n ")+" - are required fields"),addToCartBtn.removeClass("loading"),addToCartBtn.addClass("notincart")}else{var fields_data=[];$table.find("tr").each(function(){$(this).find('input[type="email"], input[type="url"]').each(function(){var fieldName=$(this).attr("name"),fieldType=$(this).attr("type");fields_data.push({name:fieldName,type:fieldType})})}),0!==fields_data.length&&validate_email_url(fields_data,formData)}})}function validate_email_url(fields_data,formData){for(var i=0;i<fields_data.length;i++)for(var j=0;j<formData.length;j++)if(fields_data[i].name==formData[j].name&&""!=formData[j].value)if("email"==fields_data[i].type){if(!isEmail(formData[j].value))return showMessage("Added email is not valid!"),!1}else if("url"==fields_data[i].type&&!isUrl(formData[j].value))return showMessage("Added URL is not valid!"),!1}function isEmail(value){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)}function isUrl(value){return/^(ftp|http|https):\/\/[^ "]+$/.test(value)}function showMessage(message){var box=document.createElement("div");box.style.position="fixed",box.style.top="50%",box.style.left="50%",box.style.transform="translate(-50%, -50%)",box.style.padding="20px",box.style.backgroundColor="#fff",box.style.boxShadow="0 0 10px rgba(0, 0, 0, 0.5)",box.style.zIndex=99999;var messageText=document.createElement("p");messageText.style.margin="0",messageText.innerHTML="<span style='color: yellow;'>⚠<b>Warning: </b> </span>"+message,box.appendChild(messageText),document.body.appendChild(box),setTimeout(function(){box.style.opacity="0",setTimeout(function(){document.body.removeChild(box)},2e3)},3e3)}function check_oceanwp_quickview_opened(){$("#owp-qv-wrap").hasClass("is-visible")?(initialize_thwepof(),oceanwp_qv_field_validating_notice()):setTimeout(function(){check_oceanwp_quickview_opened()},1e3)}function apply_input_masking(elm){var data=$(elm).data("mask-pattern"),alias_items=["datetime","numeric","cssunit","url","IP","email","mac","vin"];-1!==$.inArray(data,alias_items)?$(elm).inputmask({alias:data}):$(elm).inputmask({mask:data})}function thwepofviewpassword(elm){var icon=$(elm),parent_elm=icon.closest(".thwepof-password-field"),input=parent_elm.find("input");icon.hasClass("dashicons-visibility")?(input.attr("type","text"),icon.addClass("dashicons-hidden").removeClass("dashicons-visibility")):icon.hasClass("dashicons-hidden")&&(input.attr("type","password"),icon.addClass("dashicons-visibility").removeClass("dashicons-hidden"))}function display_range_value(elm){var range_input=$(elm),range_val=range_input.val(),width=range_input.width(),min_attr=range_input.attr("min"),max_attr=range_input.attr("max");const min=min_attr||0,max=max_attr||100,position=Number(100*(range_val-min)/(max-min));var display_div=range_input.siblings(".thwepof-range-val");display_div.html(range_val);var left_position,display_div_width=display_div.innerWidth(),slider_position=width*position/100;left_position=width-slider_position<display_div_width/2?"calc(100% - "+display_div_width+"px)":slider_position<display_div_width/2?"0px":"calc("+position+"% - "+display_div_width/2+"px)",display_div.css("left",left_position)}return initialize_thwepof(),"flatsome"==thwepof_public_var.is_quick_view?$(document).on("mfpOpen",function(){initialize_thwepof(),$.magnificPopup.instance._onFocusIn=function(e){return!!$(e.target).hasClass("ui-datepicker-month")||(!!$(e.target).hasClass("ui-datepicker-year")||void $.magnificPopup.proto._onFocusIn.call(this,e))}}):"yith"==thwepof_public_var.is_quick_view?$(document).on("qv_loader_stop",function(){initialize_thwepof()}):"astra"==thwepof_public_var.is_quick_view?$(document).on("ast_quick_view_loader_stop",function(){initialize_thwepof()}):"oceanwp"==thwepof_public_var.is_quick_view&&$(document).on("click",".owp-quick-view",function(e){check_oceanwp_quickview_opened()}),{initialize_thwepof:initialize_thwepof,thwepofviewpassword:thwepofviewpassword}}(window.jQuery,window,document);1 function thwepofViewPassword(elm){thwepof_public.thwepofviewpassword(elm)}function thwepof_init(){thwepof_public.initialize_thwepof()}var thwepof_public=function($,window,document){"use strict";function initialize_thwepof(){var extra_options_wrapper=$(".thwepo-extra-options");setup_date_picker(extra_options_wrapper,"thwepof-date-picker",thwepof_public_var),setup_time_picker(extra_options_wrapper,"thwepof-time-picker",thwepof_public_var);var wepo_range_input=$('input[type="range"].thwepof-input-field');wepo_range_input.each(function(){display_range_value(this)}),wepo_range_input.on("change",function(){display_range_value(this)}),$(".thwepof-mask-input").each(function(){apply_input_masking(this)})}function setup_date_picker(form,class_selector,data){$("."+class_selector).each(function(){var readonly=$(this).data("readonly");readonly="yes"===readonly;var yearRange=$(this).data("year-range");yearRange=""==yearRange?"-100:+10":yearRange,$(this).datepicker({showButtonPanel:!0,changeMonth:!0,changeYear:!0,yearRange:yearRange}),$(this).prop("readonly",readonly)})}function setup_time_picker(form,class_selector,data){$("."+class_selector).each(function(){var readonly=$(this).data("readonly");readonly="yes"===readonly;var args={minTime:"12:00am",maxTime:"11:30pm",step:"30",timeFormat:"h:i A",forceRoundTime:!0,disableTextInput:!0,disableTouchKeyboard:!0,lang:data.lang};$(this).timepicker(args),$(this).prop("readonly",readonly)})}function oceanwp_qv_field_validating_notice(){jQuery("body").off("adding_to_cart").on("adding_to_cart",function(event,addToCartBtn,formData){var $cartForm=$("#owp-qv-content").find("form.cart"),$table=$cartForm.find("table.thwepo-extra-options"),$requiredTrs=$table.find("tr:has(abbr.required)"),$requiredTds=$requiredTrs.find("td.value, td.abovefield"),inputNames=[],reqFields_data=[];$requiredTds.each(function(){$(this).find("input, select, textarea").each(function(){var inputName=$(this).attr("name");if(void 0!==inputName){var $labelTr=$(this).closest("tr"),labelText=$labelTr.find("label.label-tag").text().trim(),ftype="other";$labelTr.has('input[type="email"]').length?ftype="email":$labelTr.has('input[type="url"]').length&&(ftype="url"),inputNames.push(inputName),reqFields_data.push({name:inputName,label:labelText,type:ftype})}})});for(var filteredNames=Array.from(new Set(inputNames)),req_fields=[],i=0;i<filteredNames.length;i++){for(var flag=0,j=0;j<formData.length;j++)formData[j].name==filteredNames[i]&&""!=formData[j].value&&(flag=1);flag||req_fields.push(filteredNames[i])}if(addToCartBtn.hasClass("notincart")&&addToCartBtn.removeClass("notincart"),0!==req_fields.length){for(var reqLabels=[],i=0;i<req_fields.length;i++)for(var j=0;j<reqFields_data.length;j++)if(req_fields[i]==reqFields_data[j].name){reqLabels.push(reqFields_data[j].label);break}1===reqLabels.length?alert(reqLabels+" is a required field"):alert(reqLabels.join("\n ")+" - are required fields"),addToCartBtn.removeClass("loading"),addToCartBtn.addClass("notincart")}else{var fields_data=[];$table.find("tr").each(function(){$(this).find('input[type="email"], input[type="url"]').each(function(){var fieldName=$(this).attr("name"),fieldType=$(this).attr("type");fields_data.push({name:fieldName,type:fieldType})})}),0!==fields_data.length&&validate_email_url(fields_data,formData)}})}function validate_email_url(fields_data,formData){for(var i=0;i<fields_data.length;i++)for(var j=0;j<formData.length;j++)if(fields_data[i].name==formData[j].name&&""!=formData[j].value)if("email"==fields_data[i].type){if(!isEmail(formData[j].value))return showMessage("Added email is not valid!"),!1}else if("url"==fields_data[i].type&&!isUrl(formData[j].value))return showMessage("Added URL is not valid!"),!1}function isEmail(value){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)}function isUrl(value){return/^(ftp|http|https):\/\/[^ "]+$/.test(value)}function showMessage(message){var box=document.createElement("div");box.style.position="fixed",box.style.top="50%",box.style.left="50%",box.style.transform="translate(-50%, -50%)",box.style.padding="20px",box.style.backgroundColor="#fff",box.style.boxShadow="0 0 10px rgba(0, 0, 0, 0.5)",box.style.zIndex=99999;var messageText=document.createElement("p");messageText.style.margin="0",messageText.innerHTML="<span style='color: yellow;'>⚠<b>Warning: </b> </span>"+message,box.appendChild(messageText),document.body.appendChild(box),setTimeout(function(){box.style.opacity="0",setTimeout(function(){document.body.removeChild(box)},2e3)},3e3)}function check_oceanwp_quickview_opened(){$("#owp-qv-wrap").hasClass("is-visible")?(initialize_thwepof(),oceanwp_qv_field_validating_notice()):setTimeout(function(){check_oceanwp_quickview_opened()},1e3)}function apply_input_masking(elm){var data=$(elm).data("mask-pattern"),alias_items=["datetime","numeric","cssunit","url","IP","email","mac","vin"];-1!==$.inArray(data,alias_items)?$(elm).inputmask({alias:data}):$(elm).inputmask({mask:data})}function thwepofviewpassword(elm){var icon=$(elm),parent_elm=icon.closest(".thwepof-password-field"),input=parent_elm.find("input");icon.hasClass("dashicons-visibility")?(input.attr("type","text"),icon.addClass("dashicons-hidden").removeClass("dashicons-visibility")):icon.hasClass("dashicons-hidden")&&(input.attr("type","password"),icon.addClass("dashicons-visibility").removeClass("dashicons-hidden"))}function display_range_value(elm){var range_input=$(elm),range_val=range_input.val(),width=range_input.width(),min_attr=range_input.attr("min"),max_attr=range_input.attr("max");const min=min_attr||0,max=max_attr||100,position=Number(100*(range_val-min)/(max-min));var display_div=range_input.siblings(".thwepof-range-val");display_div.html(range_val);var left_position,display_div_width=display_div.innerWidth(),slider_position=width*position/100;left_position=width-slider_position<display_div_width/2?"calc(100% - "+display_div_width+"px)":slider_position<display_div_width/2?"0px":"calc("+position+"% - "+display_div_width/2+"px)",display_div.css("left",left_position)}return initialize_thwepof(),"flatsome"==thwepof_public_var.is_quick_view?$(document).on("mfpOpen",function(){initialize_thwepof(),$.magnificPopup.instance._onFocusIn=function(e){return!!$(e.target).hasClass("ui-datepicker-month")||(!!$(e.target).hasClass("ui-datepicker-year")||void $.magnificPopup.proto._onFocusIn.call(this,e))}}):"yith"==thwepof_public_var.is_quick_view?$(document).on("qv_loader_stop",function(){initialize_thwepof()}):"astra"==thwepof_public_var.is_quick_view?$(document).on("ast_quick_view_loader_stop",function(){initialize_thwepof()}):"oceanwp"==thwepof_public_var.is_quick_view&&$(document).on("click",".owp-quick-view",function(e){check_oceanwp_quickview_opened()}),{initialize_thwepof:initialize_thwepof,thwepofviewpassword:thwepofviewpassword}}(window.jQuery,window,document); -
woo-extra-product-options/trunk/public/class-thwepof-public.php
r3034429 r3280818 30 30 wp_enqueue_style('thwepof-public-style', THWEPOF_URL.'public/assets/css/thwepof-public'. $suffix .'.css', THWEPOF_VERSION); 31 31 wp_enqueue_style('jquery-ui-style', THWEPOF_URL.'public/assets/css/jquery-ui/jquery-ui.css'); 32 wp_enqueue_style('jquery-timepicker', THWEPOF_URL.'public/assets/js/timepicker/jquery.timepicker.css'); 32 33 33 34 wp_register_script('thwepof-input-mask', THWEPOF_URL.'public/assets/js/inputmask-js/jquery.inputmask.min.js', array('jquery'), THWEPOF_VERSION, true); 34 35 wp_enqueue_script('thwepof-input-mask'); 36 37 wp_register_script('thwepof-timepicker-script', THWEPOF_URL.'public/assets/js/timepicker/jquery.timepicker.min.js', array('jquery'), THWEPOF_VERSION, true); 38 wp_enqueue_script('thwepof-timepicker-script'); 35 39 36 40 wp_register_script('thwepof-public-script', THWEPOF_URL.'public/assets/js/thwepof-public'. $suffix .'.js', array('jquery', 'jquery-ui-datepicker'), THWEPOF_VERSION, true); … … 566 570 if($extra_options && is_array($extra_options)){ 567 571 foreach($extra_options as $name => $field){ 568 $posted_value = $this->get_posted_value($name); 572 $type = $field->get_property('type'); 573 $posted_value = $this->get_posted_value($name, $type); 569 574 if($posted_value) { 570 575 if(is_array($posted_value)){ … … 580 585 $data_arr['name'] = $name; 581 586 $data_arr['value'] = $posted_value; 582 $data_arr['type'] = $ field->get_property('type');587 $data_arr['type'] = $type; 583 588 $data_arr['label'] = $field->get_property('title'); 584 589 $data_arr['options'] = $field->get_property('options'); … … 588 593 } 589 594 } 595 590 596 return $extra_data; 591 597 } -
woo-extra-product-options/trunk/readme.txt
r3235322 r3280818 2 2 Contributors: ThemeHigh 3 3 Donate link: https://themehigh.com/ 4 Tags: extra product options, product addons, woocommerce product fields, product options, woocommerce product addons4 Tags: extra product options, product addons, woocommerce product addons, woocommerce product fields, product options 5 5 Requires at least: 4.9 6 Tested up to: 6. 76 Tested up to: 6.8 7 7 Requires PHP: 5.6 8 Stable tag: 3.3. 18 Stable tag: 3.3.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 12 WooCommerce Extra Product Options plugin lets you add product addons (custom products field) of 19different field types to your product page.12 WooCommerce Extra Product Options plugin lets you add product addons (custom products field) of 20 different field types to your product page. 13 13 14 14 == Description == 15 15 🔥 **#1 Plugin for adding product addons to WooCommerce Products** 16 16 17 Transform your WooCommerce product pages with **Extra Product Options for WooCommerce (WooCommerce Product Addons) by ThemeHigh.** With this plugin, you can add up to ** 19custom product fields** and offer customised products to your customers effortlessly. With WooCommerce Extra Product Options by ThemeHigh, you can showcase **product add-ons**, easily add multiple custom fields, group similar ones into sections, and display fields based on conditions. Whether you run a small or a large online store, our plugin not only updates your store's functionality but also drives sales growth by 2X. Transform your store today, and watch how your sales grow!17 Transform your WooCommerce product pages with **Extra Product Options for WooCommerce (WooCommerce Product Addons) by ThemeHigh.** With this plugin, you can add up to **20 custom product fields** and offer customised products to your customers effortlessly. With WooCommerce Extra Product Options by ThemeHigh, you can showcase **product add-ons**, easily add multiple custom fields, group similar ones into sections, and display fields based on conditions. Whether you run a small or a large online store, our plugin not only updates your store's functionality but also drives sales growth by 2X. Transform your store today, and watch how your sales grow! 18 18 19 19 == SEE HOW OUR FREE VERSION WORKS == … … 31 31 ✳️ **Custom Hooks →** Easily Add more functionalities with developer-friendly Custom Hooks. 32 32 33 [Try Demo](https://flydemos.com/woodmart-wepo-demo/shop/) | [Documentation](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/) | [Get Pro ](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link) 34 35 -------------------------------------------- 36 https://www.youtube.com/watch?v=YoVPQhdwuis 37 -------------------------------------------- 38 39 = ✅ ADD 19 ADVANCED PRODUCT FIELDS TO PRODUCT PAGE = 33 [Try Demo](https://flydemos.com/woodmart-wepo-demo/shop/) | [Documentation](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_help_doc) | [Get Pro ](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link) 34 35 = ✅ ADD 20 ADVANCED PRODUCT FIELDS TO PRODUCT PAGE = 40 36 41 37 1. Text … … 58 54 18. Switch 59 55 19. Separator 56 20. Time Picker 🆕 60 57 61 58 = ✅ GROUP RELATED PRODUCT FIELDS INTO CUSTOM SECTIONS & DISPLAY IN 2 POSITIONS = … … 107 104 108 105 == 🔥 SEE OUR PREMIUM FEATURES == 109 [Use-case Demo](https://flydemos.com/wepo/?utm_source=wepo_free&utm_medium=readme&utm_campaign=try_demo) | [Documentation](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/ ) | [Get Pro](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link)106 [Use-case Demo](https://flydemos.com/wepo/?utm_source=wepo_free&utm_medium=readme&utm_campaign=try_demo) | [Documentation](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_help_doc) | [Get Pro](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link) 110 107 111 108 = ✅ ADD 8 ADDITIONAL PRODUCT FIELDS = 112 109 113 110 1. Multi-select 114 2. Time Picker115 3. File Upload116 4. HTML117 5. Color Palette118 6. Image Group119 7. Date & Time Range Picker120 8. Product Group111 2. File Upload 112 3. HTML 113 4. Color Palette 114 5. Image Group 115 6. Date & Time Range Picker 116 7. Product Group 117 8. Label Swatches 🆕 121 118 122 119 = ✅ 5 EXTRA CONDITIONS TO DEFINE DISPLAY RULES = … … 160 157 161 158 Confirm Validator allows you to validate two fields for the same value (for example, Email and Confirm Email). 159 160 = ✅ EDIT FROM CART FUNCTIONALITY 🆕 = 161 You can edit all the fields you have added using this plugin from the cart 162 162 163 163 == Why ThemeHigh == … … 195 195 == OTHER USEFUL LINKS == 196 196 👉 [VIEW ALL FEATURES](https://www.themehigh.com/product/woocommerce-extra-product-options/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_upgrade_link) 197 👉 [GET DOCUMENTATION](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/ )198 👉 [GET THEMEHIGH SUPPORT](https://www.themehigh.com/docs/support/ )197 👉 [GET DOCUMENTATION](https://www.themehigh.com/docs/category/extra-product-option-for-woocommerce/?utm_source=wepo_free&utm_medium=readme&utm_campaign=wepo_help_doc) 198 👉 [GET THEMEHIGH SUPPORT](https://www.themehigh.com/docs/support/?utm_source=wpvs_free&utm_medium=readme&utm_campaign=wepo_support) 199 199 👉 [JOIN COMMUNITY](https://www.facebook.com/groups/themehigh/) 200 200 👉 FOLLOW US ON [Facebook](https://www.facebook.com/ThemeHigh-319611541768603/), [LinkedIn](https://www.linkedin.com/company/themehigh/), [Twitter](https://twitter.com/themehigh/) & [YouTube](https://www.youtube.com/channel/UC-_uMXaC_21j1Y2_nGjTyvg/). … … 303 303 == Changelog == 304 304 305 = 3.3.1 = 306 * Added WooCommerce 9.6 compatibility. 305 = 3.3.2 = 306 * Added new field type **Time Picker**. 307 * Added WooCommerce 9.8 compatibility. 308 * Added WordPress 6.8 compatibility. -
woo-extra-product-options/trunk/woo-extra-product-options.php
r3235322 r3280818 4 4 * Description: Add extra product options in product page. 5 5 * Author: ThemeHigh 6 * Version: 3.3. 16 * Version: 3.3.2 7 7 * Author URI: https://www.themehigh.com 8 8 * Plugin URI: https://www.themehigh.com … … 11 11 * Requires Plugins: woocommerce 12 12 * WC requires at least: 3.0.0 13 * WC tested up to: 9. 613 * WC tested up to: 9.8 14 14 */ 15 15 … … 36 36 37 37 public function init() { 38 define('THWEPOF_VERSION', '3.3. 1');38 define('THWEPOF_VERSION', '3.3.2'); 39 39 !defined('THWEPOF_BASE_NAME') && define('THWEPOF_BASE_NAME', plugin_basename( __FILE__ )); 40 40 !defined('THWEPOF_PATH') && define('THWEPOF_PATH', plugin_dir_path( __FILE__ ));
Note: See TracChangeset
for help on using the changeset viewer.