Changeset 3175584
- Timestamp:
- 10/25/2024 10:37:23 AM (14 months ago)
- Location:
- biteship/trunk
- Files:
-
- 6 edited
-
README.txt (modified) (2 diffs)
-
admin/js/biteship-admin.js (modified) (3 diffs)
-
admin/views/modal_tracking_biteship.php (modified) (2 diffs)
-
biteship.php (modified) (2 diffs)
-
public/class-biteship-public.php (modified) (3 diffs)
-
public/js/biteship-public.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
biteship/trunk/README.txt
r3153259 r3175584 5 5 Requires at least: 4.0 6 6 Tested up to: 6.6.1 7 Stable tag: 3. 1.07 Stable tag: 3.2.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 109 109 110 110 == Changelog == 111 = 3.2.0 = 112 * Update new tracking page url 111 113 = 3.1.0 = 112 114 * Update tracking page url -
biteship/trunk/admin/js/biteship-admin.js
r3153259 r3175584 333 333 if (data.courier && data.courier.waybill_id) { 334 334 var waybillId = data.courier.waybill_id; 335 var link = data.courier.link 335 336 var biteshipStatus = data.status; 336 337 biteshipWaybillTd.append(`<mark class="order-status biteship-tips" data-tip="Biteship status: ${data.status}"><span>${waybillId}</span></mark>`); 337 338 biteshipStatusTd.append(`<mark class="order-status"><span>${biteshipStatus}</span></mark>`); 338 biteshipStatusTd.append(createShipmentTrackingButton( waybillId));339 biteshipStatusTd.append(createShipmentTrackingButton(link)); 339 340 340 341 var deleteButton = createDeleteShipmentButton(waybillId, orderId, biteshipStatus); … … 479 480 } 480 481 481 function createShipmentTrackingButton( waybill_id) {482 if (phpVars.trackingPage Url.length > 0 && phpVars.trackingPageIsactive) {483 var createButton = $(`<a class="button" target="_blank" rel="noopener noreferrer" href="${ phpVars.trackingPageUrl}&waybill_id=${waybill_id}" style="margin-top: 10px;">Lacak</a>`);482 function createShipmentTrackingButton(link) { 483 if (phpVars.trackingPageIsactive) { 484 var createButton = $(`<a class="button" target="_blank" rel="noopener noreferrer" href="${link}" style="margin-top: 10px;">Lacak</a>`); 484 485 createButton.click(function (event) { 485 486 var disabled = $(this).attr("disabled"); … … 581 582 waybill_id: response.data.waybill_id, 582 583 waybill_url: phpVars.trackingPageUrl, 584 link: response.data.link 583 585 }, 584 586 }); -
biteship/trunk/admin/views/modal_tracking_biteship.php
r3153259 r3175584 34 34 <footer> 35 35 <div class="inner"> 36 <button onclick="redirectPageTracking('{{{ data. waybill_id }}}', '{{{ data.waybill_url}}}')" class="button button-primary button-large"><?php esc_html_e(36 <button onclick="redirectPageTracking('{{{ data.link }}}')" class="button button-primary button-large"><?php esc_html_e( 37 37 "Cek Order", 38 38 "woocommerce" … … 46 46 </script> 47 47 <script> 48 function redirectPageTracking( waybill_id, waybill_url){49 window.open( waybill_url+"&waybill_id="+waybill_id, '_blank');48 function redirectPageTracking(link){ 49 window.open( link, '_blank'); 50 50 } 51 51 </script> -
biteship/trunk/biteship.php
r3153259 r3175584 17 17 * Plugin URI: https://biteship.com/ 18 18 * Description: Pengiriman menjadi lebih mudah dengan layanan cek ongkos kirim dan penjemputan barang langsung ke lokasi yang dibantu oleh lebih dari 20 ekspedisi. Nikmati fitur ini hanya di Biteship for WooCommerce. 19 * Version: 3. 1.019 * Version: 3.2.0 20 20 * Author: Biteship 21 21 * Author URI: https://biteship.com/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define("BITESHIP_VERSION", "3. 1.0");38 define("BITESHIP_VERSION", "3.2.0"); 39 39 40 40 define("BITESHIP_PLUGIN_PATH", plugin_dir_path(__FILE__)); -
biteship/trunk/public/class-biteship-public.php
r3088396 r3175584 330 330 $order_id = (int) $_POST["orderId"]; 331 331 $waybill_id = ""; 332 $link = ""; 332 333 if ($order_id > 0) { 333 334 $order = wc_get_order($order_id); … … 337 338 if (strlen($biteship_order_id) > 0) { 338 339 $biteship_shipping = $this->get_biteship_shipping(); 339 $waybill_id = $biteship_shipping->rest_adapter->get_biteship_order($biteship_order_id)["courier"]["waybill_id"]; 340 $biteship_order = $biteship_shipping->rest_adapter->get_biteship_order($biteship_order_id); 341 $waybill_id = $biteship_order["courier"]["waybill_id"]; 342 $link = $biteship_order["courier"]["link"]; 340 343 } 341 344 } … … 343 346 $response["order_id"] = $order_id; 344 347 $response["waybill_id"] = $waybill_id; 348 $response["link"] = $link; 345 349 wp_send_json_success($response); 346 350 } -
biteship/trunk/public/js/biteship-public.js
r3153259 r3175584 542 542 if (response.data.waybill_id.length > 0) { 543 543 component.append( 544 `<a href="${ phpVars.trackingPageUrl}&waybill_id=${response.data.waybill_id}" target="_blank" class="woocommerce-button wp-element-button button view">TRACK</a>`,544 `<a href="${response.data.link}" target="_blank" class="woocommerce-button wp-element-button button view">TRACK</a>`, 545 545 [btnView], 546 546 );
Note: See TracChangeset
for help on using the changeset viewer.