diff --git a/Makefile b/Makefile index 4c7eec093c5dec2d333557de3b9b7d096afb25e1..0e37e04d2697e7c2d4491b08900e2ac318bad50d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ BASE=rules_shipping BASE_ADV=rules_shipping_advanced PLUGINTYPE=vmshipment -VERSION=2.4.3 +VERSION=2.4.4 PLUGINFILES=$(BASE).php $(BASE)_base.php $(BASE).script.php $(BASE).xml index.html PLUGINFILES_ADV=$(BASE_ADV).php $(BASE)_base.php $(BASE_ADV).script.php $(BASE_ADV).xml index.html diff --git a/releases/plg_vmshipment_rules_shipping_advanced_v2.4.4.zip b/releases/plg_vmshipment_rules_shipping_advanced_v2.4.4.zip new file mode 100644 index 0000000000000000000000000000000000000000..e46583f48df8bf621573912c7376dd27f97f6033 Binary files /dev/null and b/releases/plg_vmshipment_rules_shipping_advanced_v2.4.4.zip differ diff --git a/releases/plg_vmshipment_rules_shipping_v2.4.4.zip b/releases/plg_vmshipment_rules_shipping_v2.4.4.zip new file mode 100644 index 0000000000000000000000000000000000000000..5bfb28320588f00673d245f62b74ad344bb7f894 Binary files /dev/null and b/releases/plg_vmshipment_rules_shipping_v2.4.4.zip differ diff --git a/rules_shipping.xml b/rules_shipping.xml index 86fd90ba423b19c2d710cf35af0596ba9c386eac..ae1a9e68cdf37dd5d2f4ba0fb67aa6ee87725970 100644 --- a/rules_shipping.xml +++ b/rules_shipping.xml @@ -6,7 +6,7 @@ <authorUrl>http://www.open-tools.net</authorUrl> <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright> <license>GPL v3+</license> - <version>2.4.2</version> + <version>2.4.4</version> <description>VMSHIPMENT_RULES_DESC</description> <files> <filename plugin="rules_shipping">rules_shipping.php</filename> diff --git a/rules_shipping_advanced.xml b/rules_shipping_advanced.xml index 7a1bb88c4e323a968beb6739430b88591435de50..1256e26715e49e707cbb58599f680b2b5dae23a9 100644 --- a/rules_shipping_advanced.xml +++ b/rules_shipping_advanced.xml @@ -6,7 +6,7 @@ <authorUrl>http://www.open-tools.net</authorUrl> <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright> <license>GPL v3+</license> - <version>2.4.3</version> + <version>2.4.4</version> <description>VMSHIPMENT_RULES_ADV_DESC</description> <files> <filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename> diff --git a/rules_shipping_base.php b/rules_shipping_base.php index dd76eb991743ff70c73c184ded64a188da312e41..73fbc48209e0f122b1b0158e701177b7ca5e90a8 100644 --- a/rules_shipping_base.php +++ b/rules_shipping_base.php @@ -390,7 +390,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin { return $dimensions; } - function getOrderWeights (VirtueMartCart $cart, $weight_units) { + function getOrderWeights (VirtueMartCart $cart, $weight_unit) { static $calculated = 0; static $dimensions=array( 'weight' => 0, @@ -399,7 +399,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin { if ($calculated==0 && count($cart->products)>0) { $calculated = 1; foreach ($cart->products as $product) { - $w = ShopFunctions::convertWeigthUnit ($product->product_weight, $product->product_weight_uom, $to_weight_unit); + $w = ShopFunctions::convertWeigthUnit ($product->product_weight, $product->product_weight_uom, $weight_unit); $dimensions['maxweight'] = max ($dimensions['maxweight'], $w); $dimensions['minweight'] = min ($dimensions['minweight'], $w); $dimensions['weight'] += $w * $product->quantity; @@ -445,6 +445,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin { $cartvals = array_merge ($cartvals, $this->getOrderDimensions ($cart, $method->length_unit)); // Let child classes update the $cartvals array, or add new variables $this->addCustomCartValues($cart, $cart_prices, $cartvals); +// JFactory::getApplication()->enqueueMessage("<pre>cart prices: ".print_r($cart_prices,1)."</pre>", 'error'); return $cartvals; }