Changeset 2523812
- Timestamp:
- 04/30/2021 01:25:02 AM (5 years ago)
- Location:
- delyvax/trunk
- Files:
-
- 3 edited
-
delyvax.php (modified) (1 diff)
-
functions.php (modified) (7 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
delyvax/trunk/delyvax.php
r2521227 r2523812 4 4 Plugin URI: https://delyva.com/solutions 5 5 description: The official DelyvaX plugin helps store owners to integrate WooCommerce with [DelyvaX](https://delyva.com/solutions) for seamless service comparison and order processing. 6 Version: 1.1. 16 Version: 1.1.2 7 7 Author: DelyvaX 8 8 Author URI: https://delyva.com/solutions -
delyvax/trunk/functions.php
r2521227 r2523812 21 21 $weight = WC()->cart->get_cart_contents_weight(); 22 22 $min_weight = 0.000; // kg 23 $max_weight = 10000 ; // kg23 $max_weight = 100000; // kg 24 24 25 25 if($weight > $max_weight){ … … 31 31 $weight = WC()->cart->get_cart_contents_weight(); 32 32 $min_weight = 0.000; // kg 33 $max_weight = 10000 ; // kg33 $max_weight = 100000; // kg 34 34 35 35 if($weight < $min_weight) { … … 516 516 $total_weight = $total_weight + ($product->get_weight()*$quantity); 517 517 518 $total_dimension = $total_dimension + ( $this->defaultDimension($this->dimensionToCm($product->get_width()))519 * $this->defaultDimension($this->dimensionToCm($product->get_length()))520 * $this->defaultDimension($this->dimensionToCm($product->get_height())));518 $total_dimension = $total_dimension + (delyvax_default_dimension(delyvax_dimension_to_cm($product->get_width())) 519 * delyvax_default_dimension(delyvax_dimension_to_cm($product->get_length())) 520 * delyvax_default_dimension(delyvax_dimension_to_cm($product->get_height()))); 521 521 522 522 $total_price = $total_price + $total; … … 596 596 $total_weight = $total_weight + ($product->get_weight()*$quantity); 597 597 598 $total_dimension = $total_dimension + ( $this->defaultDimension($this->dimensionToCm($product->get_width()))599 * $this->defaultDimension($this->dimensionToCm($product->get_length()))600 * $this->defaultDimension($this->dimensionToCm($product->get_height())));598 $total_dimension = $total_dimension + ( delyvax_default_dimension(delyvax_dimension_to_cm($product->get_width())) 599 * delyvax_default_dimension(delyvax_dimension_to_cm($product->get_length())) 600 * delyvax_default_dimension(delyvax_dimension_to_cm($product->get_height())) ); 601 601 602 602 $total_price = $total_price + $total; … … 954 954 $total_weight = $total_weight + ($product->get_weight()*$quantity); 955 955 956 $total_dimension = $total_dimension + ( $this->defaultDimension($this->dimensionToCm($product->get_width()))957 * $this->defaultDimension($this->dimensionToCm($product->get_length()))958 * $this->defaultDimension($this->dimensionToCm($product->get_height())));956 $total_dimension = $total_dimension + (delyvax_default_dimension(delyvax_dimension_to_cm($product->get_width())) 957 * delyvax_default_dimension(delyvax_dimension_to_cm($product->get_length())) 958 * delyvax_default_dimension(delyvax_dimension_to_cm($product->get_height()))); 959 959 960 960 $total_price = $total_price + $total; … … 1141 1141 } 1142 1142 } 1143 // update_post_meta( $this_order_id, $key, $value); 1143 1144 1144 //end update sub orders 1145 1145 } … … 1332 1332 } 1333 1333 } 1334 } 1335 1336 function delyvax_dimension_to_cm($length) 1337 { 1338 $dimension_unit = get_option('woocommerce_dimension_unit'); 1339 // convert other units into cm 1340 if ($dimension_unit != 'cm') { 1341 if ($dimension_unit == 'm') { 1342 return $length * 100; 1343 } else if ($dimension_unit == 'mm') { 1344 return $length * 0.1; 1345 } else if ($dimension_unit == 'in') { 1346 return $length * 2.54; 1347 } else if ($dimension_unit == 'yd') { 1348 return $length * 91.44; 1349 } 1350 } 1351 // already in cm 1352 return $length; 1353 } 1354 1355 function delyvax_default_dimension($length) 1356 { 1357 // default dimension to 1 if it is 0 1358 return $length > 0 ? $length : 1; 1334 1359 } 1335 1360 -
delyvax/trunk/readme.txt
r2521227 r2523812 4 4 Requires at least: 5.4 5 5 Tested up to: 5.7 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 Requires PHP: 7.2 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html 10 10 11 The official DelyvaX plugin helps store owners to integrate WooCommerce with [DelyvaX](https://delyva.com/solutions) for seamless service comparison and order processing.11 The official DelyvaX plugin helps store owners to integrate WooCommerce with [DelyvaX](https://delyva.com/solutions) delivery management software as a service for seamless service comparison and order processing. 12 12 13 13 == Description == 14 14 15 15 DelyvaX WooCommerce plugin 16 - Create shipment automatically on 'payment complete' or manual click to fulfil order. 16 17 - Fulfil shipment with 'Preparing' status 17 - Create shipment automatically on 'payment complete' or manually in fulfil order.18 18 - Edit order > Fulfil order 19 19 - Edit order > Print label 20 20 - Edit order > Track shipment 21 - Webhook for preparing, start-collecting, collected, failed-collection, start-delivery, delivered, and failed-delivery.21 - Auto-status updates with Web-hook for preparing, start-collecting, collected, failed-collection, start-delivery, delivered, and failed-delivery. 22 22 23 23 == Installation == 24 24 25 1. Get your Company id, User id, Customer id, and API Key from Customer web dashboard > settings > API Integrations.26 2. In your woocommerce, go to DelyvaXSettings > Shipping > DelyvaX27 3. Insert your Company id, User id, Customer id, and API Key.25 1. Get your Company id, User id, Customer id, and API Key from your delivery service provider's Customer web dashboard > settings > API Integrations. 26 2. In your Woocommerce store admin, go to Woocommerce > Settings > Shipping > DelyvaX 27 3. Insert your delivery service provider's Company code, Company id, User id, Customer id, and API Key. 28 28 4. Configure the settings as per your requirements. 29 29 30 30 == Changelog == 31 31 32 = 1.1.1 - April 30 2021 = Bug-fixes. 32 33 = 1.1.1 - April 26 2021 = Added support for volumetric or actual weight consideration. 33 34 = 1.1.0 - April 19 2021 = Bug fixes, and improvements to comply with Wordpress standards.
Note: See TracChangeset
for help on using the changeset viewer.