diff --git a/library/rules_shipping_framework.php b/library/rules_shipping_framework.php index 9a33f4d69757d13959876f8aa3e04891015dcf48..ce7118b4205416d847447d7b17cf3f7c84074d2d 100644 --- a/library/rules_shipping_framework.php +++ b/library/rules_shipping_framework.php @@ -263,6 +263,10 @@ class RulesShippingFramework { return $cartvals; } + + protected function getCartProducts($cart, $method) { + return array(); + } /** This function evaluates all rules, one after the other until it finds a matching rule that * defines shipping costs (or uses NoShipping). If a modifier or definition is encountered, @@ -274,7 +278,7 @@ class RulesShippingFramework { return $this->match[$id]; } else { // Evaluate all rules and find the matching ones (including modifiers and definitions!) - $cartvals = $this->getCartValues ($cart, $cart->products, $method); + $cartvals = $this->getCartValues ($cart, $this->getCartProducts($cart, $method), $method); $result = array( "rule" => Null, "rule_name" => "", @@ -670,6 +674,7 @@ class ShippingRule { $filterkeys = array( "evaluate_for_categories" => 'categories', "evaluate_for_products" => 'products', + "evaluate_for_skus" => 'products', "evaluate_for_vendors" => 'vendors', "evaluate_for_manufacturers" => 'manufacturers' ); diff --git a/rules_shipping_framework_joomla.php b/rules_shipping_framework_joomla.php index c402dc1eaa1f70d8840d3d8a1d199e0c1f0d23a9..907cae9193617ea07752a3b7285ea4714725560e 100644 --- a/rules_shipping_framework_joomla.php +++ b/rules_shipping_framework_joomla.php @@ -68,6 +68,10 @@ class RulesShippingFrameworkJoomla extends RulesShippingFramework { $method->includes_tax = $r->includes_tax; } + protected function getCartProducts($cart, $method) { + return $cart->products; + } + protected function getMethodId($method) { return $method->virtuemart_shipmentmethod_id; }