Changeset 3090663
- Timestamp:
- 05/22/2024 08:04:56 AM (23 months ago)
- Location:
- ship-depot/trunk
- Files:
-
- 4 edited
-
Ship_Depot_init.php (modified) (2 diffs)
-
assets/js/fe-checkout.js (modified) (1 diff)
-
page/frontend/sd-checkout-page.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ship-depot/trunk/Ship_Depot_init.php
r3090008 r3090663 5 5 * Plugin URI: https://shipdepot.vn/ 6 6 * Description: Ship Depot support shipping couriers in Vietnam like GHN, GHTK, AhaMove. 7 * Version: 1.2.1 67 * Version: 1.2.17 8 8 * Author: ShipDepot.vn 9 9 * Text Domain: ship-depot-translate … … 35 35 36 36 if (!defined('SHIP_DEPOT_VERSION')) { 37 define('SHIP_DEPOT_VERSION', '1.2.1 6');37 define('SHIP_DEPOT_VERSION', '1.2.17'); 38 38 } 39 39 -
ship-depot/trunk/assets/js/fe-checkout.js
r3090008 r3090663 421 421 $('form[name=checkout]').on('change', 'input[type=radio][class=radio_shipping_fee]', function () 422 422 { 423 $(document.body).trigger('update_checkout');423 // $(document.body).trigger('update_checkout'); 424 424 // CallValidate(); 425 let spanEle = $('tr[class=order-total]').find('.woocommerce-Price-amount'); 426 if (spanEle.length <= 0) return; 427 let amountEle = $(spanEle.children()[0]); 428 let subtotal = parseFloat($('#SDOrderSubTotal').val() ?? '0'); 429 let servFee = 0; 430 let idSelectedServ = this.value; 431 if (idSelectedServ != '') 432 { 433 let selectedServ = $('#shipping_' + idSelectedServ); 434 if (selectedServ.length > 0) 435 { 436 let jsonServ = selectedServ.val().replace(new RegExp(`'`, 'g'), `\"`); 437 let serv = JSON.parse(jsonServ); 438 if (serv.ShopMarkupShippingFee.IsActive) 439 { 440 servFee = parseFloat(serv.ShopMarkupShippingFee.ShippingFeeTotal) + parseFloat(serv.NoMarkupShippingFee.NoMarkupShippingFeeTotal); 441 } else 442 { 443 servFee = parseFloat(serv.ShipDepotMarkupShippingFee.ShippingFeeTotal) + parseFloat(serv.NoMarkupShippingFee.NoMarkupShippingFeeTotal); 444 } 445 } 446 } 447 448 if (amountEle.length > 0) 449 { 450 amountEle.html(formatVNCurrency(subtotal + servFee)); 451 } 452 453 //Validate 454 if ($('#place_order').length > 0) 455 { 456 if ($('input[name=shipdepot_shipping_selected]:checked').length > 0) 457 { 458 $('#place_order').removeAttr('disabled'); 459 } 460 else 461 { 462 $('#place_order').attr('disabled', 'disabled'); 463 } 464 } 425 465 }); 426 466 -
ship-depot/trunk/page/frontend/sd-checkout-page.php
r3090008 r3090663 338 338 ?> 339 339 <input type="hidden" id="SDOrderTotal" value="<?php echo esc_attr($cart_total_without_shipping + GetShippingFeeSession()) ?>" /> 340 <input type="hidden" id="SDOrderSubTotal" value="<?php echo esc_attr($cart_total_without_shipping) ?>" /> 340 341 <script type="text/javascript"> 341 342 console.log('Set total'); 342 343 jQuery(document).ready(function($) { 343 344 let spanEle = jQuery('tr[class=order-total]').find('.woocommerce-Price-amount'); 345 if (spanEle.length <= 0) return; 344 346 let amountEle = jQuery(spanEle.children()[0]); 347 if (amountEle.length <= 0) return; 345 348 let currencySymbolEle = amountEle.children()[0]; 346 349 // + currencySymbolEle.outerHTML -
ship-depot/trunk/readme.txt
r3090008 r3090663 5 5 Tested up to: 6.4.3 6 6 Requires PHP: 7.4.3 7 Stable tag: 1.2.1 67 Stable tag: 1.2.17 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 65 65 66 66 == Changelog == 67 = 1.2.17 = 68 * Sửa một số lỗi nhỏ. 69 70 67 71 = 1.2.16 = 68 72 * Thêm đơn vị vận chuyển 'Khách lấy hàng tại shop'.
Note: See TracChangeset
for help on using the changeset viewer.