Skip to content
Snippets Groups Projects
Commit f2c4bb07 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

V5.6: Fix shipping rate 0 without shipping= in the free plugin (already fixed...

V5.6: Fix shipping rate 0 without shipping= in the free plugin (already fixed in the advanced version)
parent a7bcc16b
Branches
Tags V5.6
No related merge requests found
...@@ -2,7 +2,7 @@ BASE=rules_shipping ...@@ -2,7 +2,7 @@ BASE=rules_shipping
BASE_ADV=rules_shipping_advanced BASE_ADV=rules_shipping_advanced
PLUGINTYPE=vmshipment PLUGINTYPE=vmshipment
ZIPBASE=opentools_vm ZIPBASE=opentools_vm
VERSION=5.5 VERSION=5.6
PLUGINFILES=$(BASE).php $(BASE)_base.php $(BASE).script.php $(BASE).xml index.html 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 PLUGINFILES_ADV=$(BASE_ADV).php $(BASE)_base.php $(BASE_ADV).script.php $(BASE_ADV).xml index.html
......
File added
File added
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl> <authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013-2014, Reinhold Kainhofer</copyright> <copyright>Copyright (C) 2013-2014, Reinhold Kainhofer</copyright>
<license>GPL v3+</license> <license>GPL v3+</license>
<version>5.5</version> <version>5.6</version>
<description>VMSHIPMENT_RULES_DESC</description> <description>VMSHIPMENT_RULES_DESC</description>
<files> <files>
<filename plugin="rules_shipping">rules_shipping.php</filename> <filename plugin="rules_shipping">rules_shipping.php</filename>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl> <authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013-2014, Reinhold Kainhofer</copyright> <copyright>Copyright (C) 2013-2014, Reinhold Kainhofer</copyright>
<license>GPL v3+</license> <license>GPL v3+</license>
<version>5.5</version> <version>5.6</version>
<description>VMSHIPMENT_RULES_ADV_DESC</description> <description>VMSHIPMENT_RULES_ADV_DESC</description>
<files> <files>
<filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename> <filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename>
......
...@@ -1045,7 +1045,7 @@ class ShippingRule { ...@@ -1045,7 +1045,7 @@ class ShippingRule {
/* In the advanced version, all conditions and costs can be given as a full mathematical expression */ /* In the advanced version, all conditions and costs can be given as a full mathematical expression */
/* Both versions create an expression tree, which can be easily evaluated in evaluateTerm */ /* Both versions create an expression tree, which can be easily evaluated in evaluateTerm */
$rulepart = trim($rulepart); $rulepart = trim($rulepart);
if (empty($rulepart)) return; if (!isset($rulepart) || $rulepart==='') return;
// Special-case the name assignment, where we don't want to interpret the value as an arithmetic expression! // Special-case the name assignment, where we don't want to interpret the value as an arithmetic expression!
...@@ -1056,7 +1056,6 @@ class ShippingRule { ...@@ -1056,7 +1056,6 @@ class ShippingRule {
// Split at all operators: // Split at all operators:
$atoms = $this->tokenize_expression ($rulepart); $atoms = $this->tokenize_expression ($rulepart);
/* TODO: Starting from here, the advanced plugin is different! */ /* TODO: Starting from here, the advanced plugin is different! */
$operators = array('<', '<=', '=', '>', '>=', '=>', '=<', '<>', '!=', '=='); $operators = array('<', '<=', '=', '>', '>=', '=>', '=<', '<>', '!=', '==');
if (count($atoms)==1) { if (count($atoms)==1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment