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

V4.99a: Fix function signature (forgotten products argument)

parent c0890556
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ BASE=rules_shipping
BASE_ADV=rules_shipping_advanced
PLUGINTYPE=vmshipment
ZIPBASE=opentools_vm2
VERSION=4.99
VERSION=4.99a
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 added
File added
<?xml version="1.0" encoding="UTF-8" ?>
<extension version="1.5" type="plugin" group="vmshipment" method="upgrade">
<extension version="2.5" type="plugin" group="vmshipment" method="upgrade">
<name>VMSHIPMENT_RULES</name>
<creationDate>2014-09-14</creationDate>
<author>Reinhold Kainhofer</author>
<authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013-2014, Reinhold Kainhofer</copyright>
<license>GPL v3+</license>
<version>4.99</version>
<version>4.99a</version>
<description>VMSHIPMENT_RULES_DESC</description>
<files>
<filename plugin="rules_shipping">rules_shipping.php</filename>
......
......@@ -60,12 +60,12 @@ class plgVmShipmentRules_Shipping_Advanced extends plgVmShipmentRules_Shipping_B
}
/** Allow child classes to add additional variables for the rules
*/
protected function addCustomCartValues (VirtueMartCart $cart, $cart_prices, &$values) {
protected function addCustomCartValues (VirtueMartCart $cart, $products, $cart_prices, &$values) {
$values['coupon'] = $cart->couponCode;
// Postal code Check for UK postal codes: Use regexp to determine if ZIP structure matches and also to extract the parts.
// Also handle UK overseas areas/islands that use four-letter outward codes rather than "A{1,2}0{1,2}A{0,1} 0AA"
if ($values['zip']) {
if (isset($values['zip'])) {
$zip=strtoupper($values['zip']);
}
if (isset($zip) and preg_match('/^\s*(([A-Z]{1,2})(\d{1,2})([A-Z]?)|[A-Z]{4}|GIR)\s*(\d[A-Z]{2})\s*$/', $zip, $match)) {
......
......@@ -6,7 +6,7 @@
<authorUrl>http://www.open-tools.net</authorUrl>
<copyright>Copyright (C) 2013-2014, Reinhold Kainhofer</copyright>
<license>GPL v3+</license>
<version>4.99</version>
<version>4.99a</version>
<description>VMSHIPMENT_RULES_ADV_DESC</description>
<files>
<filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment