Changeset 3103007
- Timestamp:
- 06/15/2024 09:08:23 AM (7 weeks ago)
- Location:
- woo-ukrposhta
- Files:
-
- 134 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
woo-ukrposhta/trunk/admin/js/script.js
r3005102 r3103007 1 window.onload =function() {1 function() { 2 2 3 3 // Checks input 'Вага, кг' on 'Нові відправлення' page on zero. … … 193 193 194 194 195 } 195 } 196 196 197 197 -
woo-ukrposhta/trunk/admin/partials/invoice/view/invoice_params.php
r3032561 r3103007 171 171 } 172 172 ?>" /> 173 174 175 176 173 177 <input type="submit" value="Створити" name="morkvaup_checkforminputs" class="morkvaup_checkforminputs button button-primary" id="submit"/> 174 178 </td> -
woo-ukrposhta/trunk/admin/partials/invoice/view/invoice_recipient.php
r3005102 r3103007 30 30 <td> 31 31 <input type="text" name="rec_middle_name" id="rec_middle_name" class="input recipient_name" 32 value="<?php echo esc_html( $invoiceOrder->getShippingMiddleName() ); ?>" required /> 32 value="<?php 33 if($invoiceOrder->getDeliveryType() == 'W2W') 34 { 35 echo esc_html( $invoiceOrder->getShippingMiddleName() ); 36 } 37 else{ 38 $order_data = $invoiceOrder->getOrderData(); 39 40 41 $billing_up_address_surname = $order_data->get_meta('_billing_up_address_surname'); 42 if(!$billing_up_address_surname) 43 { 44 $billing_up_address_surname = $order_data->get_meta('_shipping_up_address_surname'); 45 } 46 47 echo $billing_up_address_surname; 48 } 49 ?>" required /> 33 50 </td> 34 51 </tr> -
woo-ukrposhta/trunk/admin/partials/morkvaup-plugin-form.php
r3005102 r3103007 43 43 // Create Addresses 44 44 $senderAddrId = ( null !== $sender->getAddress() ) ? $sender->getAddress(): null; 45 $recipientAddrId = ( null !== $recipient->getAddress( ) ) ? $recipient->getAddress(): null;45 $recipientAddrId = ( null !== $recipient->getAddress(): null; 46 46 47 47 // Create Clients -
woo-ukrposhta/trunk/assets/js/checkout-up.js
r3059630 r3103007 81 81 } 82 82 83 84 85 86 87 88 89 90 91 92 83 93 // Set billing_country field value if it is absent on Checkout page 84 94 // currentCountry = jQuery('#billing_country').length ? jQuery('#billing_country').val() : 'UA'; … … 101 111 Cookies.set('shipping_city', jQuery('#billing_city').val() ); 102 112 Cookies.set('up_shipping_postcode', jQuery('#ukrposhta_shippping_warehouse').val() ); 113 114 115 116 103 117 var addr = jQuery('#up_custom_address').attr('checked') || 'unchecked'; 104 118 //console.log(addr); … … 115 129 let initialize = function () { 116 130 jQuery('#ukrposhta_shippping_warehouse').on('change', function(){ 131 132 133 134 117 135 serialixe(); 118 136 }); … … 332 350 jQuery('#ukrposhta_shippping_fields').removeClass('mrkvup-loading'); // Remove spinner 333 351 jQuery("#ukrposhta_shippping_postcode_select").change (function () { 334 let selectedWarehouse = jQuery('#select2-ukrposhta_shippping_postcode_select-container'). text();352 let selectedWarehouse = jQuery('#select2-ukrposhta_shippping_postcode_select-container').); 335 353 let selectedPostcode = selectedWarehouse.substring(0,5); 336 354 … … 343 361 let hiddenPostcodeVal = isNaN(selectedPostcode) ? '' : selectedPostcode; 344 362 jQuery('#ukrposhta_shippping_postcode_selected').val(hiddenPostcodeVal); 363 364 345 365 }); 346 366 } … … 361 381 362 382 let curShippingMethod = getCurrentShippingMethod(); 363 if (curShippingMethod .indexOf('ukrposhta_shippping') >= 0) {383 if (curShippingMethod.indexOf('ukrposhta_shippping') >= 0) { 364 384 autoSelectCityPo(); 365 385 } … … 368 388 var curShippingMethod_new = getCurrentShippingMethod(); 369 389 370 if (curShippingMethod_new .indexOf('ukrposhta_shippping') >= 0) {390 if (curShippingMethod_new.indexOf('ukrposhta_shippping') >= 0) { 371 391 if (document.body.classList.contains('mrkvnp-plugin-is-active')) { 372 392 // If PRO-НП is active on the site … … 381 401 autoSelectCityPo(); 382 402 } 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 383 418 }); 384 419 -
woo-ukrposhta/trunk/classes/CheckoutValidator.php
r3005102 r3103007 21 21 add_filter( 'woocommerce_ship_to_different_address_checked', '__return_true' ); 22 22 } 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 23 55 } 24 56 -
woo-ukrposhta/trunk/classes/OrderCreator.php
r3005102 r3103007 19 19 { 20 20 if ( isset( $_POST['shipping_method'] ) ) { 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 21 36 if ( strpos( $_POST['shipping_method'][0], MORKVA_UKRPOSHTA_UP_SHIPPING_NAME ) === false) return; 22 37 } -
woo-ukrposhta/trunk/classes/invoice/Recipient.php
r3005102 r3103007 7 7 class Recipient extends Sender 8 8 { 9 public $addressId = ''; 9 public $addressId = ''; 10 10 11 11 public $addressMsg = ''; 12 12 13 public function getAddress( )13 public function getAddress() 14 14 { 15 15 if ( isset( $_POST['index2'] ) ) { 16 $address = $this->ukrposhtaApi->modelAdressPost( array( 17 "postcode" => $_POST['index2'], 18 "country" => $_POST['country_rec'], 19 ) ); 16 if($order_data) 17 { 18 $shipping_methods = $order_data->get_shipping_methods(); 19 $shipping_method = @array_shift( $shipping_methods ); 20 $shipping_method_id = $shipping_method->get_method_id(); 21 22 if( 'ukrposhta_shippping' == $shipping_method_id ) 23 { 24 $address = $this->ukrposhtaApi->modelAdressPost( array( 25 "postcode" => $_POST['index2'], 26 "country" => $_POST['country_rec'], 27 ) ); 28 } 29 else 30 { 31 $address = $this->ukrposhtaApi->modelAdressPost( array( 32 "postcode" => $_POST['index2'], 33 "country" => $_POST['country_rec'], 34 "region" => $_POST['region_data'], 35 "city" => $_POST['city_data'], 36 "street" => $_POST['street_data'], 37 "apartmentNumber" => $_POST['apartmentNumber_data'] 38 ) ); 39 } 40 } 41 else 42 { 43 $address = $this->ukrposhtaApi->modelAdressPost( array( 44 "postcode" => $_POST['index2'], 45 "country" => $_POST['country_rec'], 46 ) ); 47 } 48 20 49 if ( isset( $address['id'] ) ) { 21 50 return $this->addressId = $address['id']; -
woo-ukrposhta/trunk/includes/class-morkvaup-plugin-loader.php
r3013204 r3103007 1202 1202 } 1203 1203 //echo $methodid; 1204 if ((strpos($methodid, 'u_poshta_shipping_method') !== false) || (strpos($methodid, 'ukrposhta_shippping') !== false) )1204 if ((strpos($methodid, 'u_poshta_shipping_method') !== false) || (strpos($methodid, 'ukrposhta_shippping') !== false)) 1205 1205 { 1206 1206 echo '<style>#mvup_other_fields{display:block;}</style>'; -
woo-ukrposhta/trunk/morkvaup-plugin.php
r3089321 r3103007 4 4 * Plugin URI: https://morkva.co.ua/shop/woo-ukrposhta-pro-lifetime 5 5 * Description: Генеруйте накладні просто зі сторінки замовлення і зекономте тонну часу на відділенні при відправці. 6 * Version: 1.17. 56 * Version: 1.17. 7 7 * Author: Morkva 8 8 * Text Domain: woo-ukrposhta-pro -
woo-ukrposhta/trunk/readme.txt
r3089321 r3103007 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1.17. 57 Stable tag: 1.17. 8 8 WC tested up to: 8.8 9 9 License: GPLv2 … … 86 86 == Що нового? == 87 87 88 89 90 88 91 = 1.17.5 = 89 92 * WooCommerce 8.8 - сумісний
Note: See TracChangeset
for help on using the changeset viewer.