From 191b9320a6c7d483606da9f55e1fb774e8eedd9a Mon Sep 17 00:00:00 2001
From: Reinhold Kainhofer <reinhold@kainhofer.com>
Date: Fri, 1 Mar 2013 02:27:55 +0100
Subject: [PATCH] Version 2.1: make Joomla 1.5 work, straighten out language
 files, add German

---
 Makefile                                      |  4 +-
 elements/rklabel.php                          |  4 +-
 .../de-DE.plg_vmshipment_rules_shipping.ini   | 46 +++++++++++++++++++
 ...e-DE.plg_vmshipment_rules_shipping.sys.ini |  8 ++++
 ...plg_vmshipment_rules_shipping_advanced.ini | 46 +++++++++++++++++++
 ...vmshipment_rules_shipping_advanced.sys.ini |  8 ++++
 language/de-DE/index.html                     |  1 +
 .../en-GB.plg_vmshipment_rules_shipping.ini   | 31 +++----------
 ...n-GB.plg_vmshipment_rules_shipping.sys.ini |  8 ++--
 rules_shipping.xml                            | 12 ++---
 rules_shipping_advanced.xml                   |  2 +-
 11 files changed, 132 insertions(+), 38 deletions(-)
 create mode 100644 language/de-DE/de-DE.plg_vmshipment_rules_shipping.ini
 create mode 100644 language/de-DE/de-DE.plg_vmshipment_rules_shipping.sys.ini
 create mode 100644 language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.ini
 create mode 100644 language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.sys.ini
 create mode 100644 language/de-DE/index.html

diff --git a/Makefile b/Makefile
index dc67491..1550bed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 BASE=rules_shipping
 BASE_ADV=rules_shipping_advanced
 PLUGINTYPE=vmshipment
-VERSION=2.0.1
+VERSION=2.1
 
 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
@@ -21,6 +21,8 @@ translations: $(TRANSLATIONS)
 	@echo $(TRANSLATIONS_ADV)
 	@cp language/en-GB/en-GB.plg_vmshipment_rules_shipping.ini language/en-GB/en-GB.plg_vmshipment_rules_shipping_advanced.ini
 	@cp language/en-GB/en-GB.plg_vmshipment_rules_shipping.sys.ini language/en-GB/en-GB.plg_vmshipment_rules_shipping_advanced.sys.ini
+	@cp language/de-DE/de-DE.plg_vmshipment_rules_shipping.ini language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.ini
+	@cp language/de-DE/de-DE.plg_vmshipment_rules_shipping.sys.ini language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.sys.ini
 
 zip: $(PLUGINFILES) $(TRANSLATIONS) $(ADVANCEDFILES)
 	@echo "Packing all files into distribution file $(ZIPFILE):"
diff --git a/elements/rklabel.php b/elements/rklabel.php
index a9725d0..beb59c3 100644
--- a/elements/rklabel.php
+++ b/elements/rklabel.php
@@ -38,7 +38,8 @@ class JElementRKLabel extends JElement
 	public function render(&$xmlElement, $value, $control_name = 'params')
 	{
 		// Deprecation warning.
-		JLog::add('JElement::render is deprecated.', JLog::WARNING, 'deprecated');
+// 		jimport( 'joomla.error.log' );
+// 		JLog::add('JElement::render is deprecated.', JLog::WARNING, 'deprecated');
 
 		$name = $xmlElement->attributes('name');
 		$label = $xmlElement->attributes('label');
@@ -46,6 +47,7 @@ class JElementRKLabel extends JElement
 
 		//make sure we have a valid label
 		$label = $label ? $label : $name;
+		// Set to NULL so that the virtuemart table layout code will make the element span two columns:
 		$result[0] = NULL;
 // 		$result[0] = $this->fetchTooltip($label, $descr, $xmlElement, $control_name, $name);
 		$result[1] = $this->fetchElement($name, $value, $xmlElement, $control_name);
diff --git a/language/de-DE/de-DE.plg_vmshipment_rules_shipping.ini b/language/de-DE/de-DE.plg_vmshipment_rules_shipping.ini
new file mode 100644
index 0000000..2473863
--- /dev/null
+++ b/language/de-DE/de-DE.plg_vmshipment_rules_shipping.ini
@@ -0,0 +1,46 @@
+; VM2 General Shipping plugin
+; Copyright (C)  20123Reinhold Kainhofer. All rights reserved.
+; License http://www.gnu.org/licenses/gpl.html GNU/GPL
+; Note : All ini files need to be saved as UTF-8 - No BOM
+VMSHIPMENT_RULES="VM2 - Shipping by Rules"
+VMSHIPMENT_RULES_DESC=""
+VMSHIPMENT_RULES_ADV="VM2 - Advanced Shipping by Rules"
+VMSHIPMENT_RULES_ADV_DESC=""
+
+VMSHIPMENT_RULES_PLUGIN="<b>Shipment based on general rules (weight, products, amount) per country-zones</b>"
+VMSHIPMENT_RULES_PLUGIN_ADV="<b>Shipment based on general rules (weight, products, amount) per country-zones, including arithmetic expression</b>"
+
+VMSHIPMENT_RULES_HELP="<div style='background: #DDDDDD; padding:5px; margin:3px;'><h2>Overview of the Rules Syntax</h2><ul><li>Each line contains one rule consisting of several <b>conditions and assignments in arbitrary order and separated by semicolons</b>. </li><li>The <b>first matching rule is used</b> to calculate the shipping costs.</li><li>All rule parts with <b>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</b> are conditions.</li><li> Supported <b>variables (case-insensitive)</b>: <b><tt>Amount</tt></b>, <b><tt>Weight</tt></b>, <b><tt>ZIP</tt></b>, <b><tt>Products</tt></b> (number of different products), <b><tt>Articles</tt></b> (counted with quantity), <b><tt>Volume</tt></b> (total volume of the order) and <b><tt>MinVolume</tt>, <tt>MinLength</tt>, <tt>MinWidth</tt>, <tt>MinHeight</tt></b> as well as the same variables with <tt>Max</tt> instead of <tt>Min</tt>.</li><li>A condition can consist of multiple chained comparisons.</li><li>All rule parts of the form <b><tt>[VARIABLE]=VALUE</tt> are assignments</b>, with <tt>[VARIABLE]</tt> being one of <b><tt>Name</tt></b> (optional name of the rule, displayed in the cart and invoice), <b><tt>Shipping</tt></b> (shipping cost without tax if the rule matches) and <b><tt>ShippingWithTax</tt></b> (shipping cost including taxes if the rule matches). The <tt>Shipping=</tt> can be left out (<tt>ShippingWithTax=</tt> can not be left out). I.e. a rule part consisting only of a numerical value is understood as net shipping cost without tax.</li></ul><p>EXAMPLE: A rule named &quot;Europe&quot; that sets shipping costs of 4.50 for order amounts from 50 to less than 100, and free shipping from 100€ on would be:</p><blockquote><tt>Name=Europe; 50&lt;=Amount&lt;100; Shipping=4.50<br>Name=Free Shipping; 100&lt;= Amount; 0</tt></blockquote></div>"
+VMSHIPMENT_RULES_HELP_ADV="<div style='background: #DDDDDD; padding:5px; margin:3px;'><h2>Overview of the Rules Syntax</h2><ul><li>Each line contains one rule consisting of several <b>conditions and assignments in arbitrary order and separated by semicolons</b>. </li><li>The <b>first matching rule is used</b> to calculate the shipping costs.</li><li>All rule parts with <b>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</b> are conditions.</li><li> Supported <b>variables (case-insensitive)</b>: <b><tt>Amount</tt></b>, <b><tt>Weight</tt></b>, <b><tt>ZIP</tt></b>, <b><tt>Products</tt></b> (number of different products), <b><tt>Articles</tt></b> (counted with quantity), <b><tt>Volume</tt></b> (total volume of the order) and <b><tt>MinVolume</tt>, <tt>MinLength</tt>, <tt>MinWidth</tt>, <tt>MinHeight</tt></b> as well as the same variables with <tt>Max</tt> instead of <tt>Min</tt>.</li><li>A condition can consist of multiple chained comparisons.</li><li>All rule parts of the form <b><tt>[VARIABLE]=VALUE</tt> are assignments</b>, with <tt>[VARIABLE]</tt> being one of <b><tt>Name</tt></b> (optional name of the rule, displayed in the cart and invoice), <b><tt>Shipping</tt></b> (shipping cost without tax if the rule matches) and <b><tt>ShippingWithTax</tt></b> (shipping cost including taxes if the rule matches). The <tt>Shipping=</tt> can be left out (<tt>ShippingWithTax=</tt> can not be left out). I.e. a rule part consisting only of a numerical value is understood as net shipping cost without tax.</li><li>In the advanced version, all expressions (conditions and shipping costs) may contain <b>arbitrary basic arithmetic expressions (+, -, *, /, %, ^ and parentheses)</b> of the above variables.</li></ul><p>EXAMPLE: A rule named &quot;Europe&quot; that sets shipping costs of 5€ plus 1.50€ per article for order amounts from 50 to less than 100, and free shipping from 100€ on would be:</p><blockquote><tt>Name=Europe; 50&lt;=Amount&lt;100; Shipping=5+1.50*Articles<br>Name=Free Shipping; 100&lt;= Amount; 0</blockquote></div>"
+
+VMSHIPMENT_RULES_COUNTRIES1_LABEL="<b>Rules for country set 1</b>"
+VMSHIPMENT_RULES_COUNTRIES2_LABEL="<b>Rules for country set 2</b>"
+VMSHIPMENT_RULES_COUNTRIES3_LABEL="<b>Rules for country set 3</b>"
+VMSHIPMENT_RULES_COUNTRIES4_LABEL="<b>Rules for country set 4</b>"
+VMSHIPMENT_RULES_COUNTRIES5_LABEL="<b>Rules for country set 5</b>"
+VMSHIPMENT_RULES_COUNTRIES6_LABEL="<b>Rules for country set 6</b>"
+VMSHIPMENT_RULES_COUNTRIES7_LABEL="<b>Rules for country set 7</b>"
+VMSHIPMENT_RULES_COUNTRIES8_LABEL="<b>Rules for country set 8</b>"
+VMSHIPMENT_RULES_COUNTRIES="Countries"
+VMSHIPMENT_RULES_COUNTRIES_DESC="Select the countries to which the following rules should be restricted. If left empty, the rules will apply to all countries."
+VMSHIPMENT_RULES_TAX="Tax"
+VMSHIPMENT_RULES_TAX_DESC="Tax methods applied to the shipping cost if any of the given rules matches."
+VMSHIPMENT_RULES_RULES="Rules"
+VMSHIPMENT_RULES_RULES_DESC=""
+
+VMSHIPMENT_RULES_SHIPPING_NAME="Shipment Name"
+VMSHIPMENT_RULES_WEIGHT="Order Weight"
+VMSHIPMENT_RULES_ARTICLES="Articles/Products in Order"
+VMSHIPMENT_RULES_COST="Shipment Cost"
+
+VMSHIPMENT_RULES_UNKNOWN_VARIABLE="Unknown variable '%s' in rule '%s'"
+VMSHIPMENT_RULES_UNKNOWN_OPERATOR="Unknown operator '%s' in shipment rule '%s'"
+VMSHIPMENT_RULES_PARSE_MISSING_PAREN="Error during parsing expression '%s': Opening parenthesis cannot be found!"
+VMSHIPMENT_RULES_PARSE_PAREN_NOT_CLOSED="Error during parsing expression '%s': A parenthesis was not closed properly!"
+
+VMSHIPMENT_RULES_EVALUATE_NONNUMERIC="Encountered term '%s' during evaluation, that does not evaluate to a numeric value! (Full rule: '%s')"
+VMSHIPMENT_RULES_EVALUATE_SYNTAXERROR="Syntax error during evaluation, RPN is not well formed! (Full rule: '%s')"
+VMSHIPMENT_RULES_EVALUATE_UNKNOWN_OPERATOR="Unknown operator '%s' encountered during evaluation of rule '%s'."
+VMSHIPMENT_RULES_EVALUATE_UNKNOWN_ERROR="Unknown error occurred during evaluation of rule '%s'."
+VMSHIPMENT_RULES_EVALUATE_ASSIGNMENT_TOPLEVEL="Assignments are not allows inside expressions (rule given was '%s')"
+VMSHIPMENT_RULES_EVALUATE_UNKNOWN_VALUE="Evaluation yields unknown value while evaluating rule part '%s'."
\ No newline at end of file
diff --git a/language/de-DE/de-DE.plg_vmshipment_rules_shipping.sys.ini b/language/de-DE/de-DE.plg_vmshipment_rules_shipping.sys.ini
new file mode 100644
index 0000000..eef99b4
--- /dev/null
+++ b/language/de-DE/de-DE.plg_vmshipment_rules_shipping.sys.ini
@@ -0,0 +1,8 @@
+; VM2 Rule-based Shipping plugin
+; Copyright (C)  20123Reinhold Kainhofer. All rights reserved.
+; License http://www.gnu.org/licenses/gpl.html GNU/GPL
+; Note : All ini files need to be saved as UTF-8 - No BOM
+VMSHIPMENT_RULES="VM2 - Shipping by Rules"
+VMSHIPMENT_RULES_DESC=""
+VMSHIPMENT_RULES_ADV="VM2 - Advanced Shipping by Rules"
+VMSHIPMENT_RULES_ADV_DESC=""
diff --git a/language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.ini b/language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.ini
new file mode 100644
index 0000000..2473863
--- /dev/null
+++ b/language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.ini
@@ -0,0 +1,46 @@
+; VM2 General Shipping plugin
+; Copyright (C)  20123Reinhold Kainhofer. All rights reserved.
+; License http://www.gnu.org/licenses/gpl.html GNU/GPL
+; Note : All ini files need to be saved as UTF-8 - No BOM
+VMSHIPMENT_RULES="VM2 - Shipping by Rules"
+VMSHIPMENT_RULES_DESC=""
+VMSHIPMENT_RULES_ADV="VM2 - Advanced Shipping by Rules"
+VMSHIPMENT_RULES_ADV_DESC=""
+
+VMSHIPMENT_RULES_PLUGIN="<b>Shipment based on general rules (weight, products, amount) per country-zones</b>"
+VMSHIPMENT_RULES_PLUGIN_ADV="<b>Shipment based on general rules (weight, products, amount) per country-zones, including arithmetic expression</b>"
+
+VMSHIPMENT_RULES_HELP="<div style='background: #DDDDDD; padding:5px; margin:3px;'><h2>Overview of the Rules Syntax</h2><ul><li>Each line contains one rule consisting of several <b>conditions and assignments in arbitrary order and separated by semicolons</b>. </li><li>The <b>first matching rule is used</b> to calculate the shipping costs.</li><li>All rule parts with <b>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</b> are conditions.</li><li> Supported <b>variables (case-insensitive)</b>: <b><tt>Amount</tt></b>, <b><tt>Weight</tt></b>, <b><tt>ZIP</tt></b>, <b><tt>Products</tt></b> (number of different products), <b><tt>Articles</tt></b> (counted with quantity), <b><tt>Volume</tt></b> (total volume of the order) and <b><tt>MinVolume</tt>, <tt>MinLength</tt>, <tt>MinWidth</tt>, <tt>MinHeight</tt></b> as well as the same variables with <tt>Max</tt> instead of <tt>Min</tt>.</li><li>A condition can consist of multiple chained comparisons.</li><li>All rule parts of the form <b><tt>[VARIABLE]=VALUE</tt> are assignments</b>, with <tt>[VARIABLE]</tt> being one of <b><tt>Name</tt></b> (optional name of the rule, displayed in the cart and invoice), <b><tt>Shipping</tt></b> (shipping cost without tax if the rule matches) and <b><tt>ShippingWithTax</tt></b> (shipping cost including taxes if the rule matches). The <tt>Shipping=</tt> can be left out (<tt>ShippingWithTax=</tt> can not be left out). I.e. a rule part consisting only of a numerical value is understood as net shipping cost without tax.</li></ul><p>EXAMPLE: A rule named &quot;Europe&quot; that sets shipping costs of 4.50 for order amounts from 50 to less than 100, and free shipping from 100€ on would be:</p><blockquote><tt>Name=Europe; 50&lt;=Amount&lt;100; Shipping=4.50<br>Name=Free Shipping; 100&lt;= Amount; 0</tt></blockquote></div>"
+VMSHIPMENT_RULES_HELP_ADV="<div style='background: #DDDDDD; padding:5px; margin:3px;'><h2>Overview of the Rules Syntax</h2><ul><li>Each line contains one rule consisting of several <b>conditions and assignments in arbitrary order and separated by semicolons</b>. </li><li>The <b>first matching rule is used</b> to calculate the shipping costs.</li><li>All rule parts with <b>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</b> are conditions.</li><li> Supported <b>variables (case-insensitive)</b>: <b><tt>Amount</tt></b>, <b><tt>Weight</tt></b>, <b><tt>ZIP</tt></b>, <b><tt>Products</tt></b> (number of different products), <b><tt>Articles</tt></b> (counted with quantity), <b><tt>Volume</tt></b> (total volume of the order) and <b><tt>MinVolume</tt>, <tt>MinLength</tt>, <tt>MinWidth</tt>, <tt>MinHeight</tt></b> as well as the same variables with <tt>Max</tt> instead of <tt>Min</tt>.</li><li>A condition can consist of multiple chained comparisons.</li><li>All rule parts of the form <b><tt>[VARIABLE]=VALUE</tt> are assignments</b>, with <tt>[VARIABLE]</tt> being one of <b><tt>Name</tt></b> (optional name of the rule, displayed in the cart and invoice), <b><tt>Shipping</tt></b> (shipping cost without tax if the rule matches) and <b><tt>ShippingWithTax</tt></b> (shipping cost including taxes if the rule matches). The <tt>Shipping=</tt> can be left out (<tt>ShippingWithTax=</tt> can not be left out). I.e. a rule part consisting only of a numerical value is understood as net shipping cost without tax.</li><li>In the advanced version, all expressions (conditions and shipping costs) may contain <b>arbitrary basic arithmetic expressions (+, -, *, /, %, ^ and parentheses)</b> of the above variables.</li></ul><p>EXAMPLE: A rule named &quot;Europe&quot; that sets shipping costs of 5€ plus 1.50€ per article for order amounts from 50 to less than 100, and free shipping from 100€ on would be:</p><blockquote><tt>Name=Europe; 50&lt;=Amount&lt;100; Shipping=5+1.50*Articles<br>Name=Free Shipping; 100&lt;= Amount; 0</blockquote></div>"
+
+VMSHIPMENT_RULES_COUNTRIES1_LABEL="<b>Rules for country set 1</b>"
+VMSHIPMENT_RULES_COUNTRIES2_LABEL="<b>Rules for country set 2</b>"
+VMSHIPMENT_RULES_COUNTRIES3_LABEL="<b>Rules for country set 3</b>"
+VMSHIPMENT_RULES_COUNTRIES4_LABEL="<b>Rules for country set 4</b>"
+VMSHIPMENT_RULES_COUNTRIES5_LABEL="<b>Rules for country set 5</b>"
+VMSHIPMENT_RULES_COUNTRIES6_LABEL="<b>Rules for country set 6</b>"
+VMSHIPMENT_RULES_COUNTRIES7_LABEL="<b>Rules for country set 7</b>"
+VMSHIPMENT_RULES_COUNTRIES8_LABEL="<b>Rules for country set 8</b>"
+VMSHIPMENT_RULES_COUNTRIES="Countries"
+VMSHIPMENT_RULES_COUNTRIES_DESC="Select the countries to which the following rules should be restricted. If left empty, the rules will apply to all countries."
+VMSHIPMENT_RULES_TAX="Tax"
+VMSHIPMENT_RULES_TAX_DESC="Tax methods applied to the shipping cost if any of the given rules matches."
+VMSHIPMENT_RULES_RULES="Rules"
+VMSHIPMENT_RULES_RULES_DESC=""
+
+VMSHIPMENT_RULES_SHIPPING_NAME="Shipment Name"
+VMSHIPMENT_RULES_WEIGHT="Order Weight"
+VMSHIPMENT_RULES_ARTICLES="Articles/Products in Order"
+VMSHIPMENT_RULES_COST="Shipment Cost"
+
+VMSHIPMENT_RULES_UNKNOWN_VARIABLE="Unknown variable '%s' in rule '%s'"
+VMSHIPMENT_RULES_UNKNOWN_OPERATOR="Unknown operator '%s' in shipment rule '%s'"
+VMSHIPMENT_RULES_PARSE_MISSING_PAREN="Error during parsing expression '%s': Opening parenthesis cannot be found!"
+VMSHIPMENT_RULES_PARSE_PAREN_NOT_CLOSED="Error during parsing expression '%s': A parenthesis was not closed properly!"
+
+VMSHIPMENT_RULES_EVALUATE_NONNUMERIC="Encountered term '%s' during evaluation, that does not evaluate to a numeric value! (Full rule: '%s')"
+VMSHIPMENT_RULES_EVALUATE_SYNTAXERROR="Syntax error during evaluation, RPN is not well formed! (Full rule: '%s')"
+VMSHIPMENT_RULES_EVALUATE_UNKNOWN_OPERATOR="Unknown operator '%s' encountered during evaluation of rule '%s'."
+VMSHIPMENT_RULES_EVALUATE_UNKNOWN_ERROR="Unknown error occurred during evaluation of rule '%s'."
+VMSHIPMENT_RULES_EVALUATE_ASSIGNMENT_TOPLEVEL="Assignments are not allows inside expressions (rule given was '%s')"
+VMSHIPMENT_RULES_EVALUATE_UNKNOWN_VALUE="Evaluation yields unknown value while evaluating rule part '%s'."
\ No newline at end of file
diff --git a/language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.sys.ini b/language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.sys.ini
new file mode 100644
index 0000000..eef99b4
--- /dev/null
+++ b/language/de-DE/de-DE.plg_vmshipment_rules_shipping_advanced.sys.ini
@@ -0,0 +1,8 @@
+; VM2 Rule-based Shipping plugin
+; Copyright (C)  20123Reinhold Kainhofer. All rights reserved.
+; License http://www.gnu.org/licenses/gpl.html GNU/GPL
+; Note : All ini files need to be saved as UTF-8 - No BOM
+VMSHIPMENT_RULES="VM2 - Shipping by Rules"
+VMSHIPMENT_RULES_DESC=""
+VMSHIPMENT_RULES_ADV="VM2 - Advanced Shipping by Rules"
+VMSHIPMENT_RULES_ADV_DESC=""
diff --git a/language/de-DE/index.html b/language/de-DE/index.html
new file mode 100644
index 0000000..2efb97f
--- /dev/null
+++ b/language/de-DE/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>
diff --git a/language/en-GB/en-GB.plg_vmshipment_rules_shipping.ini b/language/en-GB/en-GB.plg_vmshipment_rules_shipping.ini
index 6e55886..2473863 100644
--- a/language/en-GB/en-GB.plg_vmshipment_rules_shipping.ini
+++ b/language/en-GB/en-GB.plg_vmshipment_rules_shipping.ini
@@ -2,35 +2,16 @@
 ; Copyright (C)  20123Reinhold Kainhofer. All rights reserved.
 ; License http://www.gnu.org/licenses/gpl.html GNU/GPL
 ; Note : All ini files need to be saved as UTF-8 - No BOM
-VMSHIPMENT_RULES = "VM2 - Shipping by Rules"
-VMSHIPMENT_RULES_DESC = ""
-VMSHIPMENT_RULES_ADV = "VM2 - Advanced Shipping by Rules"
-VMSHIPMENT_RULES_ADV_DESC = ""
+VMSHIPMENT_RULES="VM2 - Shipping by Rules"
+VMSHIPMENT_RULES_DESC=""
+VMSHIPMENT_RULES_ADV="VM2 - Advanced Shipping by Rules"
+VMSHIPMENT_RULES_ADV_DESC=""
 
 VMSHIPMENT_RULES_PLUGIN="<b>Shipment based on general rules (weight, products, amount) per country-zones</b>"
 VMSHIPMENT_RULES_PLUGIN_ADV="<b>Shipment based on general rules (weight, products, amount) per country-zones, including arithmetic expression</b>"
 
-VMSHIPMENT_RULES_HELP="<div style='background: #DDDDDD; padding:5px; margin:3px;'><h2>Overview of the Rules Syntax</h2>
-<ul><li>Each line contains one rule consisting of several <b>conditions and assignments in arbitrary order and separated by semicolons</b>. </li>
-<li>The <b>first matching rule is used</b> to calculate the shipping costs.</li>
-<li>All rule parts with <b>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</b> are conditions.</li>
-<li> Supported <b>variables (case-insensitive)</b>: <b><tt>Amount</tt></b>, <b><tt>Weight</tt></b>, <b><tt>ZIP</tt></b>, <b><tt>Products</tt></b> (number of different products), <b><tt>Articles</tt></b> (counted with quantity), <b><tt>Volume</tt></b> (total volume of the order) and <b><tt>MinVolume</tt>, <tt>MinLength</tt>, <tt>MinWidth</tt>, <tt>MinHeight</tt></b> as well as the same variables with <tt>Max</tt> instead of <tt>Min</tt>.</li>
-<li>A condition can consist of multiple chained comparisons.</li>
-<li>All rule parts of the form <b><tt>[VARIABLE]=VALUE</tt> are assignments</b>, with <tt>[VARIABLE]</tt> being one of <b><tt>Name</tt></b> (optional name of the rule, displayed in the cart and invoice), <b><tt>Shipping</tt></b> (shipping cost without tax if the rule matches) and <b><tt>ShippingWithTax</tt></b> (shipping cost including taxes if the rule matches). The <tt>Shipping=</tt> can be left out (<tt>ShippingWithTax=</tt> can not be left out). I.e. a rule part consisting only of a numerical value is understood as net shipping cost without tax.</li>
-</ul>
-<p>EXAMPLE: A rule named &quot;Europe&quot; that sets shipping costs of 4.50 for order amounts from 50 to less than 100, and free shipping from 100€ on would be:</p><blockquote><tt>Name=Europe; 50&lt;=Amount&lt;100; Shipping=4.50<br>Name=Free Shipping; 100&lt;= Amount; 0</tt></blockquote>
-</div>"
-VMSHIPMENT_RULES_HELP_ADV="<div style='background: #DDDDDD; padding:5px; margin:3px;'><h2>Overview of the Rules Syntax</h2>
-<ul><li>Each line contains one rule consisting of several <b>conditions and assignments in arbitrary order and separated by semicolons</b>. </li>
-<li>The <b>first matching rule is used</b> to calculate the shipping costs.</li>
-<li>All rule parts with <b>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</b> are conditions.</li>
-<li> Supported <b>variables (case-insensitive)</b>: <b><tt>Amount</tt></b>, <b><tt>Weight</tt></b>, <b><tt>ZIP</tt></b>, <b><tt>Products</tt></b> (number of different products), <b><tt>Articles</tt></b> (counted with quantity), <b><tt>Volume</tt></b> (total volume of the order) and <b><tt>MinVolume</tt>, <tt>MinLength</tt>, <tt>MinWidth</tt>, <tt>MinHeight</tt></b> as well as the same variables with <tt>Max</tt> instead of <tt>Min</tt>.</li>
-<li>A condition can consist of multiple chained comparisons.</li>
-<li>All rule parts of the form <b><tt>[VARIABLE]=VALUE</tt> are assignments</b>, with <tt>[VARIABLE]</tt> being one of <b><tt>Name</tt></b> (optional name of the rule, displayed in the cart and invoice), <b><tt>Shipping</tt></b> (shipping cost without tax if the rule matches) and <b><tt>ShippingWithTax</tt></b> (shipping cost including taxes if the rule matches). The <tt>Shipping=</tt> can be left out (<tt>ShippingWithTax=</tt> can not be left out). I.e. a rule part consisting only of a numerical value is understood as net shipping cost without tax.</li>
-<li>In the advanced version, all expressions (conditions and shipping costs) may contain <b>arbitrary basic arithmetic expressions (+, -, *, /, %, ^ and parentheses)</b> of the above variables.</li>
-</ul>
-<p>EXAMPLE: A rule named &quot;Europe&quot; that sets shipping costs of 5€ plus 1.50€ per article for order amounts from 50 to less than 100, and free shipping from 100€ on would be:</p><blockquote><tt>Name=Europe; 50&lt;=Amount&lt;100; Shipping=5+1.50*Articles<br>Name=Free Shipping; 100&lt;= Amount; 0</blockquote>
-</div>"
+VMSHIPMENT_RULES_HELP="<div style='background: #DDDDDD; padding:5px; margin:3px;'><h2>Overview of the Rules Syntax</h2><ul><li>Each line contains one rule consisting of several <b>conditions and assignments in arbitrary order and separated by semicolons</b>. </li><li>The <b>first matching rule is used</b> to calculate the shipping costs.</li><li>All rule parts with <b>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</b> are conditions.</li><li> Supported <b>variables (case-insensitive)</b>: <b><tt>Amount</tt></b>, <b><tt>Weight</tt></b>, <b><tt>ZIP</tt></b>, <b><tt>Products</tt></b> (number of different products), <b><tt>Articles</tt></b> (counted with quantity), <b><tt>Volume</tt></b> (total volume of the order) and <b><tt>MinVolume</tt>, <tt>MinLength</tt>, <tt>MinWidth</tt>, <tt>MinHeight</tt></b> as well as the same variables with <tt>Max</tt> instead of <tt>Min</tt>.</li><li>A condition can consist of multiple chained comparisons.</li><li>All rule parts of the form <b><tt>[VARIABLE]=VALUE</tt> are assignments</b>, with <tt>[VARIABLE]</tt> being one of <b><tt>Name</tt></b> (optional name of the rule, displayed in the cart and invoice), <b><tt>Shipping</tt></b> (shipping cost without tax if the rule matches) and <b><tt>ShippingWithTax</tt></b> (shipping cost including taxes if the rule matches). The <tt>Shipping=</tt> can be left out (<tt>ShippingWithTax=</tt> can not be left out). I.e. a rule part consisting only of a numerical value is understood as net shipping cost without tax.</li></ul><p>EXAMPLE: A rule named &quot;Europe&quot; that sets shipping costs of 4.50 for order amounts from 50 to less than 100, and free shipping from 100€ on would be:</p><blockquote><tt>Name=Europe; 50&lt;=Amount&lt;100; Shipping=4.50<br>Name=Free Shipping; 100&lt;= Amount; 0</tt></blockquote></div>"
+VMSHIPMENT_RULES_HELP_ADV="<div style='background: #DDDDDD; padding:5px; margin:3px;'><h2>Overview of the Rules Syntax</h2><ul><li>Each line contains one rule consisting of several <b>conditions and assignments in arbitrary order and separated by semicolons</b>. </li><li>The <b>first matching rule is used</b> to calculate the shipping costs.</li><li>All rule parts with <b>comparison operators (&lt;, &lt;=, =&lt;, ==, !=, &lt;&gt;, &gt;=, =&gt;, &gt;)</b> are conditions.</li><li> Supported <b>variables (case-insensitive)</b>: <b><tt>Amount</tt></b>, <b><tt>Weight</tt></b>, <b><tt>ZIP</tt></b>, <b><tt>Products</tt></b> (number of different products), <b><tt>Articles</tt></b> (counted with quantity), <b><tt>Volume</tt></b> (total volume of the order) and <b><tt>MinVolume</tt>, <tt>MinLength</tt>, <tt>MinWidth</tt>, <tt>MinHeight</tt></b> as well as the same variables with <tt>Max</tt> instead of <tt>Min</tt>.</li><li>A condition can consist of multiple chained comparisons.</li><li>All rule parts of the form <b><tt>[VARIABLE]=VALUE</tt> are assignments</b>, with <tt>[VARIABLE]</tt> being one of <b><tt>Name</tt></b> (optional name of the rule, displayed in the cart and invoice), <b><tt>Shipping</tt></b> (shipping cost without tax if the rule matches) and <b><tt>ShippingWithTax</tt></b> (shipping cost including taxes if the rule matches). The <tt>Shipping=</tt> can be left out (<tt>ShippingWithTax=</tt> can not be left out). I.e. a rule part consisting only of a numerical value is understood as net shipping cost without tax.</li><li>In the advanced version, all expressions (conditions and shipping costs) may contain <b>arbitrary basic arithmetic expressions (+, -, *, /, %, ^ and parentheses)</b> of the above variables.</li></ul><p>EXAMPLE: A rule named &quot;Europe&quot; that sets shipping costs of 5€ plus 1.50€ per article for order amounts from 50 to less than 100, and free shipping from 100€ on would be:</p><blockquote><tt>Name=Europe; 50&lt;=Amount&lt;100; Shipping=5+1.50*Articles<br>Name=Free Shipping; 100&lt;= Amount; 0</blockquote></div>"
 
 VMSHIPMENT_RULES_COUNTRIES1_LABEL="<b>Rules for country set 1</b>"
 VMSHIPMENT_RULES_COUNTRIES2_LABEL="<b>Rules for country set 2</b>"
diff --git a/language/en-GB/en-GB.plg_vmshipment_rules_shipping.sys.ini b/language/en-GB/en-GB.plg_vmshipment_rules_shipping.sys.ini
index 211a00a..eef99b4 100644
--- a/language/en-GB/en-GB.plg_vmshipment_rules_shipping.sys.ini
+++ b/language/en-GB/en-GB.plg_vmshipment_rules_shipping.sys.ini
@@ -2,7 +2,7 @@
 ; Copyright (C)  20123Reinhold Kainhofer. All rights reserved.
 ; License http://www.gnu.org/licenses/gpl.html GNU/GPL
 ; Note : All ini files need to be saved as UTF-8 - No BOM
-VMSHIPMENT_RULES = "VM2 - Shipping by Rules"
-VMSHIPMENT_RULES_DESC = ""
-VMSHIPMENT_RULES_ADV = "VM2 - Advanced Shipping by Rules"
-VMSHIPMENT_RULES_ADV_DESC = ""
+VMSHIPMENT_RULES="VM2 - Shipping by Rules"
+VMSHIPMENT_RULES_DESC=""
+VMSHIPMENT_RULES_ADV="VM2 - Advanced Shipping by Rules"
+VMSHIPMENT_RULES_ADV_DESC=""
diff --git a/rules_shipping.xml b/rules_shipping.xml
index b9d6a62..7d1d634 100644
--- a/rules_shipping.xml
+++ b/rules_shipping.xml
@@ -6,7 +6,7 @@
     <authorUrl>http://www.kainhofer.com</authorUrl>
     <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
     <license>GPL v3+</license>
-    <version>2.0.1</version>
+    <version>2.1</version>
     <description>VMSHIPMENT_RULES_DESC</description>
     <files>
 	<filename plugin="rules_shipping">rules_shipping.php</filename>
@@ -14,16 +14,16 @@
 	<folder>language</folder>
 	<folder>elements</folder>
     </files>
-    <languages folder="language/en-GB">
-	<language tag="en-GB">en-GB.plg_vmshipment_rules_shipping.ini</language>
-	<language tag="en-GB">en-GB.plg_vmshipment_rules_shipping.sys.ini</language>
+    <languages folder="language">
+	<language tag="en-GB">en-GB/en-GB.plg_vmshipment_rules_shipping.ini</language>
+	<language tag="en-GB">en-GB/en-GB.plg_vmshipment_rules_shipping.sys.ini</language>
     </languages>
     <scriptfile>rules_shipping.script.php</scriptfile>
 
 
-    <params addpath="/plugins/vmshipment/rules_shipping/elements/" />
+    <params  addpath="/administrator/components/com_virtuemart/elements"/>
 
-    <params addpath="/administrator/components/com_virtuemart/elements">
+    <params addpath="/plugins/vmshipment/rules_shipping_advanced/elements/">
 	<param type="vmjpluginwarning" />
 	<param type="spacer" default='VMSHIPMENT_RULES_PLUGIN' level="level1" />
 	<param	name="shipment_logos" type="vmfiles" label="VMSHIPMENT_WEIGHT_COUNTRIES_LOGOS"
diff --git a/rules_shipping_advanced.xml b/rules_shipping_advanced.xml
index 3b2af1e..628641b 100644
--- a/rules_shipping_advanced.xml
+++ b/rules_shipping_advanced.xml
@@ -6,7 +6,7 @@
     <authorUrl>http://www.kainhofer.com</authorUrl>
     <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
     <license>GPL v3+</license>
-    <version>2.0.1</version>
+    <version>2.1</version>
     <description>VMSHIPMENT_RULES_ADV_DESC</description>
     <files>
 	<filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename>
-- 
GitLab