From 990eb58f700aa033838ce6bf7d529f964c7b175b Mon Sep 17 00:00:00 2001 From: Dane MacMillan Date: Thu, 2 Nov 2017 14:03:17 -0400 Subject: [PATCH] #13 Fixes inconsistency in generating legal product IDs between the Magento1 and Magento2 module. This ensures that data will continue to get pulled into Magento2 stores when the product ID has a perfectly legal period in it. --- Helper/Data.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Helper/Data.php b/Helper/Data.php index a1735f1..b4e19b6 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -106,7 +106,7 @@ public function getProductId($product) $rawProductId = $product; /** Customizations go here */ - $rawProductId = preg_replace_callback('/\./s', create_function('$match', 'return "_bv".ord($match[0])."_";'), $rawProductId); + /** No further customizations after this */ return $this->replaceIllegalCharacters($rawProductId); @@ -131,7 +131,7 @@ public function replaceIllegalCharacters($rawId) * Example encoded = qwerty_bv36__bv37__bv64__bv35_asdf */ - return preg_replace_callback('/[^\w\d\*-\-_]/s', create_function('$match', 'return "_bv".ord($match[0])."_";'), $rawId); + return preg_replace_callback('/[^\w\d\*-\-\._]/s', create_function('$match', 'return "_bv".ord($match[0])."_";'), $rawId); }