Commit 3cc285f7 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Version 3.97: Add city variable

parent ff49131e
......@@ -2,7 +2,7 @@ BASE=rules_shipping
BASE_ADV=rules_shipping_advanced
PLUGINTYPE=vmshipment
ZIPBASE=opentools_vm2
VERSION=3.96
VERSION=3.97
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
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
<license>GPL v3+</license>
<version>3.96</version>
<version>3.97</version>
<description>VMSHIPMENT_RULES_DESC</description>
<files>
<filename plugin="rules_shipping">rules_shipping.php</filename>
......
......@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
<license>GPL v3+</license>
<version>3.95</version>
<version>3.97</version>
<description>VMSHIPMENT_RULES_ADV_DESC</description>
<files>
<filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename>
......
......@@ -585,7 +585,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
}
protected function getCartValues (VirtueMartCart $cart, $method, $cart_prices) {
$address = (($cart->ST == 0) ? $cart->BT : $cart->ST);
$zip = trim($address['zip']);
$zip = isset($address['zip'])?trim($address['zip']):'';
$cartvals = array('zip'=>$zip,
'zip1'=>substr($zip,0,1),
'zip2'=>substr($zip,0,2),
......@@ -593,6 +593,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
'zip4'=>substr($zip,0,4),
'zip5'=>substr($zip,0,5),
'zip6'=>substr($zip,0,6),
'city'=>isset($address['city'])?trim($address['city']):'',
'articles'=>$this->getOrderArticles($cart),
'products'=>$this->getOrderProducts($cart),
'amount'=>$cart_prices['salesPrice'],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment