Changeset 3322332
- Timestamp:
- 07/04/2025 12:56:50 PM (9 months ago)
- Location:
- box-now-delivery/trunk
- Files:
-
- 8 edited
-
box-now-delivery.php (modified) (5 diffs)
-
css/box-now-delivery-admin.css (modified) (5 diffs)
-
css/box-now-delivery.css (modified) (3 diffs)
-
includes/box-now-delivery-admin-page.php (modified) (2 diffs)
-
includes/box-now-delivery-cancel-order.php (modified) (2 diffs)
-
includes/box-now-delivery-validation.php (modified) (1 diff)
-
js/box-now-delivery.js (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box-now-delivery/trunk/box-now-delivery.php
r3313182 r3322332 5 5 Author: BOX NOW 6 6 Text Domain: box-now-delivery 7 Version: 2.1. 77 Version: 2.1.8 8 8 */ 9 9 … … 29 29 { 30 30 if (is_checkout()) { 31 $button_color = esc_attr(get_option('boxnow_button_color', '# 84C33F'));31 $button_color = esc_attr(get_option('boxnow_button_color', '#6CD04E ')); 32 32 $button_text = esc_attr(get_option('boxnow_button_text', 'Pick a Locker')); 33 33 … … 387 387 "paymentMode" => $payment_method === 'cod' ? "cod" : "prepaid", 388 388 "amountToBeCollected" => $payment_method === 'cod' ? number_format($prep_data['order_total'], 2, '.', '') : "0", 389 "allowReturn" => true,389 "allowReturn" => boolval(get_option('boxnow_allow_returns', '')), 390 390 "origin" => [ 391 391 "contactNumber" => get_option('boxnow_mobile_number', ''), … … 602 602 "paymentMode" => $payment_method === 'cod' ? "cod" : "prepaid", 603 603 "amountToBeCollected" => $payment_method === 'cod' ? number_format($prep_data['order_total'], 2, '.', '') : "0", 604 "allowReturn" => true,604 "allowReturn" => boolval(get_option('boxnow_allow_returns', '')), 605 605 "origin" => [ 606 606 "contactNumber" => get_option('boxnow_mobile_number', ''), … … 733 733 <p>Vouchers for this order (Max Vouchers: <span style="font-weight: bold; color: red;"><?php echo esc_html($max_vouchers); ?></span>)</p> 734 734 <input type="hidden" id="box_now_order_id" value="<?php echo esc_attr($order->get_id()); ?>" /> 735 <input type="number" id="box_now_voucher_code" name="box_now_voucher_code" min="1" max="<?php echo esc_attr($max_vouchers); ?>" placeholder="Enter voucher quantity" style="width: 50%;" /> 736 735 <input pattern="^[1-<?php echo esc_attr($max_vouchers); ?>]$" type="number" id="box_now_voucher_code" name="box_now_voucher_code" min="1" max="<?php echo esc_attr($max_vouchers); ?>" value="1" placeholder="Enter voucher quantity" style="width: 50%;" /> 737 736 <!-- Add buttons for each compartment size --> 738 737 <div class="box-now-compartment-size-buttons" style="margin-top: 10px;"> -
box-now-delivery/trunk/css/box-now-delivery-admin.css
r3309736 r3322332 12 12 13 13 .wrap h1 { 14 color: # 84C33F;14 color: #6CD04E ; 15 15 font-size: 36px; 16 16 } … … 18 18 .wrap h2 { 19 19 font-size: 24px; 20 color: # 84C33F;20 color: #6CD04E ; 21 21 margin-bottom: 20px; 22 22 } … … 41 41 42 42 .wrap input[type="submit"] { 43 background-color: # 84C33F;43 background-color: #6CD04E ; 44 44 color: #fff; 45 45 border: none; … … 51 51 52 52 .wrap input[type="submit"]:hover { 53 background-color: # 84C33F;53 background-color: #6CD04E ; 54 54 } 55 55 56 56 .wrap a { 57 color: # 84C33F;57 color: #6CD04E ; 58 58 text-decoration: none; 59 59 } … … 65 65 /* Save Changes button styles */ 66 66 .wrap .button-primary { 67 background-color: # 84C33F;67 background-color: #6CD04E ; 68 68 border: 2px solid #62a02c; 69 69 box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); -
box-now-delivery/trunk/css/box-now-delivery.css
r3309736 r3322332 1 1 #box_now_delivery_button { 2 border-radius: 10px;2 border-radius: 6px; 3 3 box-shadow: 0px 4px 0px 0px rgba(0, 0, 0, 0.1); 4 4 transition: all 0.3s; 5 5 margin-top: 6px; 6 margin-left: 5px; 7 position: absolute; 6 8 } 7 9 … … 11 13 } 12 14 15 #box_now_selected_locker_details { 16 padding: 8px; 17 font-size: 15px; 18 border: 2px solid #6CD04E ; 19 border-radius: 6px; 20 margin-top: 13px; 21 width: 83%; 22 background-color: #f0ffeb; 23 overflow: auto; 24 max-height: 370px; 25 } 26 13 27 /* Print Voucher button in WooCommerce order page */ 14 28 .print-voucher-button { 15 background-color: # 84C33F;29 background-color: #6CD04E ; 16 30 border: 2px solid #62a02c; 17 31 box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); … … 42 56 display: inline-block; 43 57 padding: 6px 12px; 44 background-color: # 84C33F;58 background-color: #6CD04E ; 45 59 color: #ffffff; 46 60 text-decoration: none; -
box-now-delivery/trunk/includes/box-now-delivery-admin-page.php
r3313182 r3322332 116 116 <p>*Please note: Automatic voucher issuance is not recommended. This method automatically selects compartment sizes based on item dimensions, which may lead to incorrect compartment assignments if your items are not properly configured.</p> 117 117 </div> 118 <h3 style="width: 100%; float: left;">Allow Returns</h3> 119 <div style="width: 100%; float: left;"> 120 <p> 121 <input type="radio" id="display_allow_returns_yes" name="boxnow_allow_returns" value="1" <?php checked(get_option('boxnow_allow_returns', '0'), '1'); ?>> 122 <label for="display_allowReturns_yes">Yes</label> 123 </p> 124 <p> 125 <input type="radio" id="display_allow_returns_no" name="boxnow_allow_returns" value="0" <?php checked(get_option('boxnow_allow_returns', '0'), '0'); ?>> 126 <label for="display_allowReturns_no">No</label> 127 </p> 128 </div> 118 129 119 130 <!-- Widget Options --> … … 150 161 <label>Change Button Background Color</label> 151 162 <br /> 152 <input type="text" name="boxnow_button_color" value="<?php echo esc_attr(get_option('boxnow_button_color', '# 84C33F')); ?>" placeholder="#84C33F" />163 <input type="text" name="boxnow_button_color" value="<?php echo esc_attr(get_option('boxnow_button_color', '#6CD04E ')); ?>" placeholder="#6CD04E " /> 153 164 </p> 154 165 <p> -
box-now-delivery/trunk/includes/box-now-delivery-cancel-order.php
r3309736 r3322332 4 4 add_action('init', 'boxnow_register_boxnow_canceled_order_status'); 5 5 // Add custom order status to WooCommerce 6 add_filter('wc_order_statuses', 'boxnow_add_canceled_order_status');6 //add_filter('wc_order_statuses', 'boxnow_add_canceled_order_status'); 7 7 add_filter('woocommerce_admin_order_actions', 'boxnow_add_cancel_order_button', 10, 2); 8 8 add_action('admin_head', 'boxnow_add_cancel_order_button_css'); … … 30 30 } 31 31 32 function boxnow_add_canceled_order_status($order_statuses)32 /**function boxnow_add_canceled_order_status($order_statuses) 33 33 { 34 34 $order_statuses['wc-boxnow-canceled'] = __('BOX NOW Cancel Order', 'box-now-delivery'); 35 35 return $order_statuses; 36 } 36 }**/ 37 37 38 38 function boxnow_add_cancel_order_button($actions, $order) -
box-now-delivery/trunk/includes/box-now-delivery-validation.php
r3309736 r3322332 56 56 update_option('boxnow_voucher_email', sanitize_email($_POST['boxnow_voucher_email'])); 57 57 } 58 if (isset($_POST['boxnow_allow_returns'])) { 59 update_option('boxnow_allow_returns', sanitize_text_field($_POST['boxnow_allow_returns'])); 60 } 58 61 if (isset($_POST['boxnow_mobile_number'])) { 59 62 update_option('boxnow_mobile_number', sanitize_text_field($_POST['boxnow_mobile_number'])); -
box-now-delivery/trunk/js/box-now-delivery.js
r3309736 r3322332 30 30 */ 31 31 function applyButtonStyles() { 32 var buttonColor = boxNowDeliverySettings.buttonColor || "# 84C33F";32 var buttonColor = boxNowDeliverySettings.buttonColor || "#6CD04E "; 33 33 34 34 var styleBlock = ` … … 110 110 } 111 111 112 if ($("#shipping_method_0_box_now_delivery").is(":checked")) { 112 var selected = $('input[name^="shipping_method"]:checked, input[name^="shipping_method"][type="hidden"]'); 113 114 if (selected.length && selected.val().includes('box_now_delivery')) { 113 115 $("#box_now_delivery_embedded_map").show(); 114 116 } else { … … 309 311 // Define the content for English. 310 312 var englishContent = ` 311 <div style="font-family: Arial, sans-serif; margin-top: 10px;">312 <p style="margin -bottom: 10px; color: rgb(132 195 62);"><b>Selected Locker</b></p>313 <p style="margin -bottom: 5px; font-size: 14px;"><b>Locker Name:</b>${locker_name}</p>314 <p style="margin -bottom: 5px; font-size: 14px;"><b>Locker Address:</b>${locker_address}</p>315 <p style="margin -bottom: 5px; font-size: 14px;"><b>Postal Code:</b>${locker_postal_code}</p>313 <div style="font-family: Verdana , Arial, sans-serif;font-weight:300;margin-top: -7px;"> 314 <p style="margin: 1px 0px; color: #61bb46;font-weight: 400;height: 25px;"><b>Selected Locker</b></p> 315 <p style="margin: 1px 0px; font-size: 13px;line-height:20px;height: 20px;">${locker_name}</p> 316 <p style="margin: 1px 0px; font-size: 13px;line-height:20px;height: 20px;">${locker_address}</p> 317 <p style="margin: 1px 0px; font-size: 13px;line-height:20px;height: 20px;">${locker_postal_code}</p> 316 318 </div>`; 317 319 318 320 // Define the content for Greek. 319 321 var greekContent = ` 320 <div style="font-family: Arial, sans-serif; margin-top: 10px;">321 <p style="margin -bottom: 10px; color: rgb(132 195 62);"><b>Επιλεγμένο locker</b></p>322 <p style="margin -bottom: 5px; font-size: 14px;"><b>Όνομα locker:</b>${locker_name}</p>323 <p style="margin -bottom: 5px; font-size: 14px;"><b>Διεύθυνση locker:</b>${locker_address}</p>324 <p style="margin -bottom: 5px; font-size: 14px;"><b>ΤΚ:</b>${locker_postal_code}</p>322 <div style="font-family: Verdana , Arial, sans-serif;font-weight:300;margin-top: -7px;"> 323 <p style="margin: 1px 0px; color: #61bb46;font-weight: 400;height: 25px;"><b>Επιλεγμένο locker</b></p> 324 <p style="margin: 1px 0px; font-size: 13px;line-height:20px;height: 20px;">${locker_name}</p> 325 <p style="margin: 1px 0px; font-size: 13px;line-height:20px;height: 20px;">${locker_address}</p> 326 <p style="margin: 1px 0px; font-size: 13px;line-height:20px;height: 20px;">${locker_postal_code}</p> 325 327 </div>`; 326 328 … … 463 465 addOrderValidation(); 464 466 465 $('body').on('change', '#billing_country', function (){467 $('body').on('change', '#billing_country', function () { 466 468 clearSelectedLockerDetails(); 467 469 }); -
box-now-delivery/trunk/readme.txt
r3313182 r3322332 4 4 Requires at least: 6.2 5 5 Tested up to: 6.8 6 Stable tag: 2.1. 76 Stable tag: 2.1.8 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 17 17 == Changelog == 18 18 19 = 2.1.7 = 20 *Fix Cyprus phone number in admin 19 = 2.1.8 = 20 *Fixed an issue when the iframe embedded map didn’t display when only one shipping method was enabled. 21 *Quantity of vouchers in order view is already filled out and has pattern recognition to minimize wrongful entries. 22 *Visual rework of Selected Locker element in checkout. 23 *Removal of unused custom status for Order Statuses. 24 *Added a new setting to allow/disallow returns on voucher creation. 21 25 22 26 == Upgrade Notice == 23 27 24 = 2.1. 7=28 = 2.1.8 = 25 29 Please upgrade to our latest plugin version to avoid coflicts and errors of any older versions.
Note: See TracChangeset
for help on using the changeset viewer.