Changeset 3466102
- Timestamp:
- 02/20/2026 09:22:39 PM (24 hours ago)
- Location:
- iwd-quick-order/trunk
- Files:
-
- 6 edited
-
assets/css/admin.css (modified) (22 diffs)
-
assets/css/frontend.css (modified) (21 diffs)
-
assets/js/admin.js (modified) (4 diffs)
-
assets/js/frontend.js (modified) (6 diffs)
-
includes/class-iwdquo-admin.php (modified) (1 diff)
-
includes/class-iwdquo-frontend.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
iwd-quick-order/trunk/assets/css/admin.css
r3466088 r3466102 5 5 */ 6 6 7 .iwd -admin-wrapper {7 .iwdquo-admin-wrapper { 8 8 max-width: 950px; 9 9 margin: 20px 18px 20px 0; 10 10 } 11 11 12 .iwd -admin-header {12 .iwdquo-admin-header { 13 13 background: #fff; 14 14 padding: 10px 20px; … … 19 19 } 20 20 21 .iwd -admin-header h1 {21 .iwdquo-admin-header h1 { 22 22 margin: 0 0 5px 0; 23 23 font-size: 20px; 24 24 } 25 25 26 .iwd -admin-header p {26 .iwdquo-admin-header p { 27 27 margin: 0; 28 28 color: #666; 29 29 } 30 30 31 .iwd -tabs-wrapper {31 .iwdquo-tabs-wrapper { 32 32 background: #fff; 33 33 box-shadow: 0 1px 3px rgba(0,0,0,0.1); … … 35 35 } 36 36 37 .iwd -tab-nav-wrapper {37 .iwdquo-tab-nav-wrapper { 38 38 display: flex; 39 39 border-bottom: 1px solid #ddd; … … 43 43 44 44 45 .iwd -tab-nav {45 .iwdquo-tab-nav { 46 46 display: flex; 47 47 margin: 0; … … 50 50 } 51 51 52 .iwd -tab-nav li {52 .iwdquo-tab-nav li { 53 53 margin: 0; 54 54 } 55 55 56 .iwd -tab-nav button {56 .iwdquo-tab-nav button { 57 57 background: none; 58 58 border: none; … … 66 66 } 67 67 68 .iwd -tab-nav button:hover {68 .iwdquo-tab-nav button:hover { 69 69 color: #288733; 70 70 } 71 71 72 .iwd -tab-nav button.active {72 .iwdquo-tab-nav button.active { 73 73 color: #288733; 74 74 border-bottom-color: #288733; 75 75 } 76 76 77 .iwd -tab-content {77 .iwdquo-tab-content { 78 78 display: none; 79 79 padding: 30px; 80 80 } 81 81 82 .iwd -tab-content.active {82 .iwdquo-tab-content.active { 83 83 display: block; 84 84 } 85 85 86 .iwd -form-group {86 .iwdquo-form-group { 87 87 margin-bottom: 25px; 88 88 } 89 89 90 .iwd -form-group label {90 .iwdquo-form-group label { 91 91 display: inline-block; 92 92 font-weight: 600; … … 95 95 } 96 96 97 .iwd -form-group input[type='text'],98 .iwd -form-group input[type='number'],99 .iwd -form-group select,100 .iwd -form-group textarea {97 .iwdquo-form-group input[type='text'], 98 .iwdquo-form-group input[type='number'], 99 .iwdquo-form-group select, 100 .iwdquo-form-group textarea { 101 101 width: 100%; 102 102 max-width: 270px; … … 106 106 } 107 107 108 .iwd -form-group input[type='text']:focus,109 .iwd -form-group input[type='number']:focus,110 .iwd -form-group select:focus,111 .iwd -form-group textarea:focus {108 .iwdquo-form-group input[type='text']:focus, 109 .iwdquo-form-group input[type='number']:focus, 110 .iwdquo-form-group select:focus, 111 .iwdquo-form-group textarea:focus { 112 112 box-shadow: none !important; 113 113 border-color: #898989; … … 120 120 } 121 121 122 .iwd -form-group textarea {122 .iwdquo-form-group textarea { 123 123 max-width: 100%; 124 124 min-height: 100px; … … 130 130 } 131 131 132 .iwd -form-group input[type='checkbox'] {132 .iwdquo-form-group input[type='checkbox'] { 133 133 margin-right: 8px; 134 134 } 135 135 136 .iwd -form-group .description {136 .iwdquo-form-group .description { 137 137 font-size: 13px; 138 138 color: #666; … … 142 142 143 143 /* Inline Fields (Country Code + Phone) */ 144 .iwd -inline-fields {144 .iwdquo-inline-fields { 145 145 display: flex; 146 146 gap: 10px; … … 148 148 } 149 149 150 .iwd -radio-group.delivery-Charge-type {150 .iwdquo-radio-group.delivery-Charge-type { 151 151 display: flex; 152 152 gap: 20px; … … 154 154 } 155 155 156 .iwd -radio-group label {156 .iwdquo-radio-group label { 157 157 display: block; 158 158 margin-bottom: 10px; … … 160 160 } 161 161 162 .iwd -radio-group input[type='radio'] {162 .iwdquo-radio-group input[type='radio'] { 163 163 margin-right: 8px; 164 164 } 165 165 166 .iwd -color-picker-wrapper {166 .iwdquo-color-picker-wrapper { 167 167 display: flex; 168 168 align-items: center; … … 170 170 } 171 171 172 .iwd -save-button {172 .iwdquo-save-button { 173 173 background: #288733 !important; 174 174 color: #fff !important; … … 181 181 } 182 182 183 .iwd -save-button:hover {183 .iwdquo-save-button:hover { 184 184 background: #000 !important; 185 185 } 186 186 187 .iwd -tab-nav-wrapper .iwd-save-button {187 .iwdquo-tab-nav-wrapper .iwdquo-save-button { 188 188 padding: 4px 12px !important; 189 189 display: none; 190 190 } 191 191 192 .iwd -save-button:focus {192 .iwdquo-save-button:focus { 193 193 outline: none !important; 194 194 box-shadow: none !important; 195 195 } 196 196 197 .iwd -notice {197 .iwdquo-notice { 198 198 padding: 12px 20px; 199 199 border-left: 4px solid #288733; … … 202 202 } 203 203 204 .iwd -section-title {204 .iwdquo-section-title { 205 205 font-size: 16px; 206 206 font-weight: 600; … … 212 212 } 213 213 214 .iwd -message-format-help {214 .iwdquo-message-format-help { 215 215 padding-left: 15px; 216 216 border-left: 1px solid #b9b9b9; … … 220 220 } 221 221 222 .iwd -message-format-help strong {222 .iwdquo-message-format-help strong { 223 223 display: block; 224 224 margin-bottom: 8px; 225 225 } 226 226 227 .iwd -message-format-help code {227 .iwdquo-message-format-help code { 228 228 background: #fff; 229 229 padding: 2px 6px; … … 233 233 } 234 234 235 .iwd -popup-only-settings .iwd-form-group {235 .iwdquo-popup-only-settings .iwdquo-form-group { 236 236 margin-bottom: 10px; 237 237 } 238 238 239 .button-position-group.iwd -form-group label,240 .button-lebel-group.iwd -form-group label {239 .button-position-group.iwdquo-form-group label, 240 .button-lebel-group.iwdquo-form-group label { 241 241 min-width: 110px; 242 242 } 243 243 244 .button-color-group.iwd -form-group label {244 .button-color-group.iwdquo-form-group label { 245 245 min-width: 165px; 246 246 } … … 257 257 } 258 258 259 .iwd -message-format-help {259 .iwdquo-message-format-help { 260 260 border-left: 1px solid #d4d4d4; 261 261 margin-top: 10px; … … 268 268 @media (min-width: 768px) { 269 269 270 .iwd -admin-wrapper {270 .iwdquo-admin-wrapper { 271 271 margin: 12px 12px 12px 0; 272 272 } 273 273 274 .iwd -tab-nav-wrapper .iwd-save-button {274 .iwdquo-tab-nav-wrapper .iwdquo-save-button { 275 275 display: block; 276 276 } -
iwd-quick-order/trunk/assets/css/frontend.css
r3466088 r3466102 47 47 48 48 /* Variation Error Message */ 49 .iwd -variation-error {49 .iwdquo-variation-error { 50 50 color: #dc3545; 51 51 font-size: 14px; … … 58 58 59 59 /* Popup Overlay */ 60 .iwd -popup-overlay {60 .iwdquo-popup-overlay { 61 61 display: none; 62 62 position: fixed; … … 76 76 77 77 /* Popup Content */ 78 .iwd -popup-content {78 .iwdquo-popup-content { 79 79 position: fixed; 80 80 top: 50%; … … 104 104 105 105 /* Popup Header */ 106 .iwd -popup-header {106 .iwdquo-popup-header { 107 107 display: flex; 108 108 justify-content: space-between; … … 113 113 } 114 114 115 .iwd -popup-title {115 .iwdquo-popup-title { 116 116 margin: 0; 117 117 font-size: 22px; … … 119 119 } 120 120 121 .iwd -popup-close {121 .iwdquo-popup-close { 122 122 background: none; 123 123 border: none; … … 134 134 } 135 135 136 .iwd -popup-close:hover {136 .iwdquo-popup-close:hover { 137 137 color: #fff; 138 138 background-color: #000; … … 140 140 141 141 /* Popup Product Info */ 142 .iwd -popup-product-info {142 .iwdquo-popup-product-info { 143 143 background: #f8f9fa; 144 144 padding: 15px; … … 147 147 } 148 148 149 .iwd -popup-product-name {149 .iwdquo-popup-product-name { 150 150 font-weight: 600; 151 151 font-size: 16px; … … 154 154 } 155 155 156 .iwd -popup-product-price {156 .iwdquo-popup-product-price { 157 157 font-weight: 600; 158 158 font-size: 18px; … … 160 160 } 161 161 162 .iwd -popup-price-breakdown {162 .iwdquo-popup-price-breakdown { 163 163 margin-top: 10px; 164 164 padding-top: 10px; … … 167 167 } 168 168 169 .iwd -popup-price-row {169 .iwdquo-popup-price-row { 170 170 display: flex; 171 171 justify-content: space-between; … … 174 174 } 175 175 176 .iwd -popup-price-row.total {176 .iwdquo-popup-price-row.total { 177 177 font-weight: 700; 178 178 font-size: 16px; … … 182 182 } 183 183 184 /* Popup Form */185 .iwd -popup-form-group {184 /* Popup Form (iwdquo prefix) */ 185 .iwdquo-popup-form-group { 186 186 margin-bottom: 15px; 187 187 } 188 188 189 .iwd -popup-label {189 .iwdquo-popup-label { 190 190 display: block; 191 191 margin-bottom: 5px; … … 195 195 } 196 196 197 .iwd -popup-input,198 .iwd -popup-textarea {197 .iwdquo-popup-input, 198 .iwdquo-popup-textarea { 199 199 width: 100%; 200 200 padding: 10px 12px !important; … … 206 206 } 207 207 208 .iwd -popup-input:focus,209 .iwd -popup-textarea:focus {208 .iwdquo-popup-input:focus, 209 .iwdquo-popup-textarea:focus { 210 210 outline: none; 211 211 border: 1px solid #8b8b8b !important; 212 212 } 213 213 214 .iwd -popup-textarea {214 .iwdquo-popup-textarea { 215 215 resize: vertical; 216 216 min-height: 80px; 217 217 } 218 218 219 .iwd -popup-error {219 .iwdquo-popup-error { 220 220 color: #dc3545; 221 221 font-size: 12px; … … 225 225 226 226 /* Popup Buttons */ 227 .iwd -popup-buttons {227 .iwdquo-popup-buttons { 228 228 display: flex; 229 229 gap: 10px; … … 231 231 } 232 232 233 .iwd -popup-submit {233 .iwdquo-popup-submit { 234 234 flex: 1; 235 235 border: none; … … 242 242 } 243 243 244 .iwd -popup-submit:hover {244 .iwdquo-popup-submit:hover { 245 245 opacity: 0.9; 246 246 } 247 247 248 .iwd -popup-cancel {248 .iwdquo-popup-cancel { 249 249 background: #6c757d; 250 250 color: #fff; … … 257 257 } 258 258 259 .iwd -popup-cancel:hover {259 .iwdquo-popup-cancel:hover { 260 260 opacity: 0.9; 261 261 } … … 263 263 /* Responsive */ 264 264 @media (max-width: 600px) { 265 .iwd -popup-content {265 .iwdquo-popup-content { 266 266 width: 95%; 267 267 padding: 20px; 268 268 } 269 269 270 .iwd -popup-title {270 .iwdquo-popup-title { 271 271 font-size: 18px; 272 272 } 273 273 274 .iwd -popup-buttons {274 .iwdquo-popup-buttons { 275 275 flex-direction: column; 276 276 } -
iwd-quick-order/trunk/assets/js/admin.js
r3466088 r3466102 11 11 12 12 // 1. Initialize Color Picker 13 $('.iwd -color-picker').wpColorPicker();13 $('.iwdquo-color-picker').wpColorPicker(); 14 14 15 15 // 2. Tab switching 16 $(document).on('click', '.iwd -tab-button', function(e){16 $(document).on('click', '.iwdquo-tab-button', function(e){ 17 17 e.preventDefault(); 18 18 var target = $(this).data('tab'); 19 $('.iwd -tab-button').removeClass('active');19 $('.iwdquo-tab-button').removeClass('active'); 20 20 $(this).addClass('active'); 21 $('.iwd -tab-content').removeClass('active');21 $('.iwdquo-tab-content').removeClass('active'); 22 22 $('#' + target).addClass('active'); 23 23 }); … … 25 25 // 3. Popup Fields Visibility (Based on "Order Mode") 26 26 function togglePopupSections() { 27 var mode = $('input[name="iwd _whatsapp_settings[order_mode]"]:checked').val();27 var mode = $('input[name="iwdquo_settings[order_mode]"]:checked').val(); 28 28 if (mode === 'direct') { 29 $('.iwd -popup-only-settings').slideUp();29 $('.iwdquo-popup-only-settings').slideUp(); 30 30 } else { 31 $('.iwd -popup-only-settings').slideDown();31 $('.iwdquo-popup-only-settings').slideDown(); 32 32 } 33 33 } 34 $(document).on('change', 'input[name="iwd _whatsapp_settings[order_mode]"]', togglePopupSections);34 $(document).on('change', 'input[name="iwdquo_settings[order_mode]"]', togglePopupSections); 35 35 togglePopupSections(); 36 36 37 37 // 4. Delivery Charge Type Toggle 38 38 function toggleDeliveryFields() { 39 var val = $('input[name="iwd _whatsapp_settings[delivery_type]"]:checked').val();40 $('.iwd -delivery-option').hide();39 var val = $('input[name="iwdquo_settings[delivery_type]"]:checked').val(); 40 $('.iwdquo-delivery-option').hide(); 41 41 if (val === 'fixed') { 42 $('.iwd -delivery-fixed').show();42 $('.iwdquo-delivery-fixed').show(); 43 43 } else if (val === 'custom_text') { 44 $('.iwd -delivery-custom').show();44 $('.iwdquo-delivery-custom').show(); 45 45 } 46 46 } 47 $(document).on('change', 'input[name="iwd _whatsapp_settings[delivery_type]"]', toggleDeliveryFields);47 $(document).on('change', 'input[name="iwdquo_settings[delivery_type]"]', toggleDeliveryFields); 48 48 toggleDeliveryFields(); 49 49 … … 61 61 } 62 62 63 bindLabelToggle('#iwd _check_name', '#iwd_label_name_wrapper');64 bindLabelToggle('#iwd _check_address', '#iwd_label_address_wrapper');65 bindLabelToggle('#iwd _check_phone', '#iwd_label_phone_wrapper');66 bindLabelToggle('#iwd _check_email', '#iwd_label_email_wrapper');67 bindLabelToggle('#iwd _check_message', '#iwd_label_message_wrapper');63 bindLabelToggle('#iwdquo_check_name', '#iwdquo_label_name_wrapper'); 64 bindLabelToggle('#iwdquo_check_address', '#iwdquo_label_address_wrapper'); 65 bindLabelToggle('#iwdquo_check_phone', '#iwdquo_label_phone_wrapper'); 66 bindLabelToggle('#iwdquo_check_email', '#iwdquo_label_email_wrapper'); 67 bindLabelToggle('#iwdquo_check_message', '#iwdquo_label_message_wrapper'); 68 68 69 69 70 70 // 6. AJAX Save Settings 71 $('#iwd -whatsapp-form').on('submit', function(e){71 $('#iwdquo-form').on('submit', function(e){ 72 72 e.preventDefault(); 73 73 74 var $btn = $(this).find('.iwd -save-button');75 var $msg = $('#iwd -ajax-message');74 var $btn = $(this).find('.iwdquo-save-button'); 75 var $msg = $('#iwdquo-ajax-message'); 76 76 77 77 $btn.prop('disabled', true).text('Saving...'); … … 81 81 82 82 $.ajax({ 83 url: iwd Admin.ajaxurl,83 url: iwdquoAdmin.ajaxurl, 84 84 type: 'POST', 85 85 data: { 86 action: 'iwd _save_settings',87 security: iwd Admin.nonce,86 action: 'iwdquo_save_settings', 87 security: iwdquoAdmin.nonce, 88 88 form_data: formData 89 89 }, -
iwd-quick-order/trunk/assets/js/frontend.js
r3466088 r3466102 9 9 10 10 var iwdWhatsAppOrder = { 11 settings: iwd WhatsAppSettings || {},12 i18n: (iwd WhatsAppSettings && iwdWhatsAppSettings.i18n) || {},11 settings: iwdquoSettings || {}, 12 i18n: (iwdquoSettings && iwdquoSettings.i18n) || {}, 13 13 nl: '%0A', 14 14 … … 27 27 28 28 // Close Popup Actions 29 $(document).on('click', '.iwd -popup-close, .iwd-popup-cancel', function() {29 $(document).on('click', '.iwdquo-popup-close, .iwdquo-popup-cancel', function() { 30 30 self.closePopup(); 31 31 }); 32 $(document).on('click', '.iwd -popup-overlay', function(e) {33 if ($(e.target).hasClass('iwd -popup-overlay')) {32 $(document).on('click', '.iwdquo-popup-overlay', function(e) { 33 if ($(e.target).hasClass('iwdquo-popup-overlay')) { 34 34 self.closePopup(); 35 35 } … … 37 37 38 38 // Submit Popup Form 39 $(document).on('click', '.iwd -popup-submit', function(e) {39 $(document).on('click', '.iwdquo-popup-submit', function(e) { 40 40 e.preventDefault(); 41 41 self.submitPopupForm(); … … 61 61 62 62 showVariationError: function() { 63 var errorMsg = $('.iwd -variation-error');63 var errorMsg = $('.iwdquo-variation-error'); 64 64 if (errorMsg.length === 0) { 65 $('.iwd-whatsapp-button').after('<div class="iwd -variation-error">' + this.i18n.pleaseSelectOptions + '</div>');66 errorMsg = $('.iwd -variation-error');65 $('.iwd-whatsapp-button').after('<div class="iwdquo-variation-error">' + this.i18n.pleaseSelectOptions + '</div>'); 66 errorMsg = $('.iwdquo-variation-error'); 67 67 } 68 68 errorMsg.slideDown(); … … 234 234 var product = this.getProductData(); 235 235 // Fill Popup Data 236 $('#iwd -popup-product-name').text(product.name);237 $('#iwd -popup-product-price').text(product.priceFormatted);236 $('#iwdquo-popup-product-name').text(product.name); 237 $('#iwdquo-popup-product-price').text(product.priceFormatted); 238 238 239 239 if (this.settings.showPriceCalc === 'yes') { 240 $('#iwd -popup-product-quantity').text(product.quantity);241 $('#iwd -popup-product-subtotal').text(this.formatPrice(product.subtotal));240 $('#iwdquo-popup-product-quantity').text(product.quantity); 241 $('#iwdquo-popup-product-subtotal').text(this.formatPrice(product.subtotal)); 242 242 243 243 if(product.deliveryType === 'fixed') { 244 $('#iwd -popup-product-delivery').text(this.formatPrice(product.deliveryCost)).parent().show();245 $('#iwd -popup-product-total').text(this.formatPrice(product.total));244 $('#iwdquo-popup-product-delivery').text(this.formatPrice(product.deliveryCost)).parent().show(); 245 $('#iwdquo-popup-product-total').text(this.formatPrice(product.total)); 246 246 } else if(product.deliveryType === 'custom_text') { 247 $('#iwd -popup-product-delivery').text(product.deliveryText).parent().show();248 $('#iwd -popup-product-total').text(this.formatPrice(product.total));247 $('#iwdquo-popup-product-delivery').text(product.deliveryText).parent().show(); 248 $('#iwdquo-popup-product-total').text(this.formatPrice(product.total)); 249 249 } else { 250 $('#iwd -popup-product-delivery').parent().hide();251 $('#iwd -popup-product-total').text(this.formatPrice(product.total));250 $('#iwdquo-popup-product-delivery').parent().hide(); 251 $('#iwdquo-popup-product-total').text(this.formatPrice(product.total)); 252 252 } 253 $('.iwd -popup-price-breakdown').show();254 } else { 255 $('.iwd -popup-price-breakdown').hide();253 $('.iwdquo-popup-price-breakdown').show(); 254 } else { 255 $('.iwdquo-popup-price-breakdown').hide(); 256 256 } 257 257 258 258 if (product.variations) { 259 $('#iwd -popup-product-variations').text(product.variations).show();260 } else { 261 $('#iwd -popup-product-variations').hide();262 } 263 264 $('.iwd -popup-overlay').fadeIn(300);259 $('#iwdquo-popup-product-variations').text(product.variations).show(); 260 } else { 261 $('#iwdquo-popup-product-variations').hide(); 262 } 263 264 $('.iwdquo-popup-overlay').fadeIn(300); 265 265 $('body').css('overflow', 'hidden'); 266 266 }, 267 267 268 268 closePopup: function() { 269 $('.iwd -popup-overlay').fadeOut(300);269 $('.iwdquo-popup-overlay').fadeOut(300); 270 270 $('body').css('overflow', ''); 271 if ($('.iwd -popup-form').length) { $('.iwd-popup-form')[0].reset(); }272 $('.iwd -popup-error').hide();271 if ($('.iwdquo-popup-form').length) { $('.iwdquo-popup-form')[0].reset(); } 272 $('.iwdquo-popup-error').hide(); 273 273 }, 274 274 … … 278 278 279 279 // Validate 280 $('.iwd -popup-form').find('input[required], textarea[required]').each(function() {280 $('.iwdquo-popup-form').find('input[required], textarea[required]').each(function() { 281 281 var field = $(this); 282 var error = field.siblings('.iwd -popup-error');282 var error = field.siblings('.iwdquo-popup-error'); 283 283 if (!field.val().trim()) { 284 284 error.text(self.i18n.fieldRequired).show(); -
iwd-quick-order/trunk/includes/class-iwdquo-admin.php
r3466088 r3466102 64 64 __('WhatsApp Order', 'iwd-quick-order'), 65 65 'manage_woocommerce', 66 'iwd quo-order',66 'iwd-whatsapp-order', 67 67 array($this, 'render_admin_page') 68 68 ); -
iwd-quick-order/trunk/includes/class-iwdquo-frontend.php
r3466088 r3466102 146 146 fill: {$text_color}; 147 147 } 148 .iwd -popup-product-price {148 .iwdquo-popup-product-price { 149 149 color: {$bg_color}; 150 150 } 151 .iwd -popup-price-row.total {151 .iwdquo-popup-price-row.total { 152 152 color: {$bg_color}; 153 153 } 154 .iwd -popup-input:focus, .iwd-popup-textarea:focus {154 .iwdquo-popup-input:focus, .iwdquo-popup-textarea:focus { 155 155 border-color: {$bg_color}; 156 156 } 157 .iwd -popup-submit {157 .iwdquo-popup-submit { 158 158 background: {$bg_color}; 159 159 color: {$text_color};
Note: See TracChangeset
for help on using the changeset viewer.