Changeset 3233872
- Timestamp:
- 02/03/2025 11:02:02 AM (13 months ago)
- Location:
- ali2woo-lite/trunk
- Files:
-
- 7 edited
-
alinext-lite.php (modified) (1 diff)
-
changelog.txt (modified) (1 diff)
-
includes/classes/connector/AliexpressDefaultConnector.php (modified) (1 diff)
-
includes/classes/controller/ImportAjaxController.php (modified) (7 diffs)
-
includes/classes/controller/OrderFulfillmentController.php (modified) (2 diffs)
-
includes/classes/model/Aliexpress.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ali2woo-lite/trunk/alinext-lite.php
r3229929 r3233872 6 6 Text Domain: ali2woo 7 7 Domain Path: /languages 8 Version: 3.5. 08 Version: 3.5.1 9 9 Author: Dropshipping Guru 10 10 Author URI: https://ali2woo.com/dropshipping-plugin/?utm_source=lite&utm_medium=author&utm_campaign=alinext-lite -
ali2woo-lite/trunk/changelog.txt
r3229929 r3233872 339 339 * Fix minor bugs and code refactor 340 340 341 3.5.1 342 * Fix "Bad API format." error while placing orders through API 343 * Fix minor bugs and code refactor 344 -
ali2woo-lite/trunk/includes/classes/connector/AliexpressDefaultConnector.php
r3229929 r3233872 196 196 197 197 if ($result['state'] !== 'error') { 198 if (isset($ apiResult['orders']['list'])) {198 if (isset($result['orders']['list'])) { 199 199 $result = ResultBuilder::buildOk([ 200 200 'orders' => $result['orders'], -
ali2woo-lite/trunk/includes/classes/controller/ImportAjaxController.php
r3183028 r3233872 998 998 $PriceFormulaService = A2WL()->getDI()->get('AliNext_Lite\PriceFormulaService'); 999 999 1000 $product = false;1001 1000 $products = []; 1002 1001 if ($page === 'a2wl_dashboard'){ … … 1017 1016 foreach ($products as &$product) { 1018 1017 if ($product['id'] == $id || $product['import_id'] == $id) { 1019 $product_country_from = !empty($product['shipping_from_country']) ? $product['shipping_from_country'] : 'CN'; 1020 $product_country_to = !empty($product['shipping_to_country']) ? $product['shipping_to_country'] : ''; 1018 $product_country_from = !empty($product['shipping_from_country']) ? 1019 $product['shipping_from_country'] : 1020 'CN'; 1021 1022 $product_country_to = !empty($product['shipping_to_country']) 1023 ? $product['shipping_to_country'] 1024 : ''; 1025 1021 1026 $country_to = $_POST['country_to'] ?? $product_country_to; 1022 1027 $country_from = !empty($_POST['country_from']) ? $_POST['country_from'] : $product_country_from; … … 1028 1033 } 1029 1034 1030 $product = Utils::update_product_shipping($product, $country_from, $country_to, $page, true); 1035 $product = Utils::update_product_shipping( 1036 $product, $country_from, 1037 $country_to, $page, true 1038 ); 1031 1039 1032 1040 if ($page == 'fulfillment') { … … 1098 1106 1099 1107 if ($product) { 1100 $product_country_to = isset($product['shipping_to_country']) && $product['shipping_to_country'] ? $product['shipping_to_country'] : ''; 1101 $product_country_from = isset($product['shipping_from_country']) && $product['shipping_from_country'] ? $product['shipping_from_country'] : ''; 1102 $country_to = isset($_POST['country_to']) ? $_POST['country_to'] : $product_country_to; 1103 $country_from = isset($_POST['country_from']) ? $_POST['country_from'] : $product_country_from; 1108 $product_country_to = isset($product['shipping_to_country']) && 1109 $product['shipping_to_country'] ? 1110 $product['shipping_to_country'] : ''; 1111 1112 $product_country_from = isset($product['shipping_from_country']) && 1113 $product['shipping_from_country'] ? 1114 $product['shipping_from_country'] : ''; 1115 1116 $country_to = $_POST['country_to'] ?? $product_country_to; 1117 $country_from = $_POST['country_from'] ?? $product_country_from; 1104 1118 1105 1119 $country = ProductShippingMeta::meta_key($country_from, $country_to); 1106 $method = isset($_POST['method']) ? $_POST['method'] :'';1120 $method = $_POST['method'] ?? ''; 1107 1121 1108 1122 if ($country && $method) { … … 1112 1126 1113 1127 $product['shipping_cost'] = 0; 1114 $items = isset($product['shipping_info'][$country]) ? $product['shipping_info'][$country] : array();1128 $items = $product['shipping_info'][$country] ?? []; 1115 1129 foreach ($items as $s) { 1116 1130 if ($s['serviceName'] == $product['shipping_default_method']) { 1117 $product['shipping_cost'] = isset($s['previewFreightAmount']['value']) ? $s['previewFreightAmount']['value'] :$s['freightAmount']['value'];1131 $product['shipping_cost'] = $s['previewFreightAmount']['value'] ?? $s['freightAmount']['value']; 1118 1132 break; 1119 1133 } … … 1121 1135 1122 1136 $product = $PriceFormulaService->applyFormula($product); 1123 1124 1137 $product_import_model->upd_product($product); 1125 1138 } 1126 1139 1127 $variations = array();1140 $variations = []; 1128 1141 foreach ($product['sku_products']['variations'] as $v) { 1129 $variations[] = array('id' => $v['id'], 'calc_price' => $v['calc_price'], 'calc_regular_price' => $v['calc_regular_price']); 1142 $variations[] = [ 1143 'id' => $v['id'], 1144 'calc_price' => $v['calc_price'], 1145 'calc_regular_price' => $v['calc_regular_price'] 1146 ]; 1130 1147 } 1131 1148 … … 1135 1152 } 1136 1153 1137 echo wp_json_encode(ResultBuilder::buildOk(array('default_method' => $product['shipping_default_method'], 'shipping_cost' => $shipping_cost, 'variations' => $variations))); 1154 $result = [ 1155 'default_method' => $product['shipping_default_method'], 1156 'shipping_cost' => $shipping_cost, 1157 'variations' => $variations 1158 ]; 1159 echo wp_json_encode(ResultBuilder::buildOk($result)); 1138 1160 } else { 1139 1161 echo wp_json_encode(ResultBuilder::buildError("Product not found.")); -
ali2woo-lite/trunk/includes/classes/controller/OrderFulfillmentController.php
r3229929 r3233872 478 478 <button id="fulfillment-auto" class="btn btn-success" type="button"> 479 479 <div class="btn-icon-wrap cssload-container"><div class="cssload-speeding-wheel"></div></div> 480 <?php esc_html_e('Fulfil orders automatically', 'ali2woo');?>480 <?php esc_html_e('Fulfill orders automatically', 'ali2woo');?> 481 481 </button> 482 482 </div> … … 488 488 <button id="fulfillment-chrome" class="btn btn-success" type="button"> 489 489 <div class="btn-icon-wrap cssload-container"><div class="cssload-speeding-wheel"></div></div> 490 <?php esc_html_e('Fulfil orders via Chrome extension', 'ali2woo');?>490 <?php esc_html_e('Fulfill orders via Chrome extension', 'ali2woo');?> 491 491 </button> 492 492 <?php endif; ?> -
ali2woo-lite/trunk/includes/classes/model/Aliexpress.php
r3229929 r3233872 271 271 } 272 272 } 273 274 /* $hasShippingInfo = isset($result['product']['shipping_info']['items']) && 275 is_array($result['product']['shipping_info']['items']); 276 if ($hasShippingInfo) { 277 $items = $result['product']['shipping_info']['items']; 278 $shippingFromCode = $result['product']['shipping_info']['shippingFromCode']; 279 $shippingToCode = $result['product']['shipping_info']['shippingToCode']; 280 $shipping_meta->save_items(1, $shippingFromCode, $shippingToCode, $items, true); 281 }*/ 273 282 } 274 283 -
ali2woo-lite/trunk/readme.txt
r3229929 r3233872 309 309 310 310 == Changelog == 311 = 3.5.1 - 2025.02.03 = 312 * Fix "Bad API format." error while placing orders through API 313 * Fix minor bugs and code refactor 314 311 315 = 3.5.0 - 2025.01.27 = 312 316 * Update review image gallery script (flexbox) to 5 version … … 412 416 * fix minor bugs 413 417 414 = 3.2.7 - 2024.04.10 =415 * add image type file check to built-in image editor416 * add feature to load AliExpress category tree for imported product417 * replace || with OR in sql queries as this format is deprectated418 * fix minor bugs419 420 = 3.2.6 - 2024.04.04 =421 * fix built-in image editor422 * fix chrome extension connection bug423 * fix is-not-applied price bug424 * fix minor bugs425 426 418 == Upgrade Notice == 427 419
Note: See TracChangeset
for help on using the changeset viewer.