From f1cab8e1d856e10bb364909b0c46954917c4a6a3 Mon Sep 17 00:00:00 2001 From: gwharton Date: Fri, 7 Sep 2018 13:49:28 +0100 Subject: [PATCH 01/11] Revert "magento/magento2#12285: The option false for mobile device don't work in product view page gallery" This reverts commit b8232c5d957b25cbb0c902f4928349617803b488. --- lib/internal/Magento/Framework/Config/Converter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Config/Converter.php b/lib/internal/Magento/Framework/Config/Converter.php index 3e66f641b8697..380aeeee5a068 100644 --- a/lib/internal/Magento/Framework/Config/Converter.php +++ b/lib/internal/Magento/Framework/Config/Converter.php @@ -103,7 +103,7 @@ protected function parseVarElement(\DOMElement $node) } } if (!count($result)) { - $result = (strtolower($node->nodeValue) !== 'true' && strtolower($node->nodeValue) !== 'false') + $result = (strtolower($node->nodeValue) !== 'true' && strtolower($node->nodeValue) !== 'false') ? $node->nodeValue : filter_var($node->nodeValue, FILTER_VALIDATE_BOOLEAN); } From b1c26db2fc9dfb0fa9021e11decd0aeebb55d005 Mon Sep 17 00:00:00 2001 From: gwharton Date: Fri, 7 Sep 2018 13:55:10 +0100 Subject: [PATCH 02/11] Revert "magento/magento2#12285: The option false for mobile device don't work in product view page gallery" This reverts commit bf40afa9414d35fe7f9125af8fc9c8042a054842. --- .../testsuite/Magento/Framework/Config/ConverterTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/Config/ConverterTest.php b/dev/tests/integration/testsuite/Magento/Framework/Config/ConverterTest.php index 1d2e090d1923b..f68e36d39a3bf 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Config/ConverterTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Config/ConverterTest.php @@ -49,7 +49,6 @@ public function testParseVarElement($sourceString, $expected) */ public function parseVarElementDataProvider() { - // @codingStandardsIgnoreStart $sourceString = <<<'XML' @@ -62,7 +61,6 @@ public function parseVarElementDataProvider() XML; - // @codingStandardsIgnoreEnd $expectedResult = [ 'vars' => [ 'Magento_Test' => [ From 67ddd87c31b02e5635c3761b173b158c5010e57d Mon Sep 17 00:00:00 2001 From: gwharton Date: Fri, 7 Sep 2018 13:55:53 +0100 Subject: [PATCH 03/11] Revert "magento/magento2#12285: The option false for mobile device don't work in product view page gallery" This reverts commit ccc35c24de7b27d5e3cd4e42bdbfd57f8ce6de9d. --- .../Framework/Config/ConverterTest.php | 92 ------------------- .../Magento/Framework/Config/Converter.php | 4 +- 2 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 dev/tests/integration/testsuite/Magento/Framework/Config/ConverterTest.php diff --git a/dev/tests/integration/testsuite/Magento/Framework/Config/ConverterTest.php b/dev/tests/integration/testsuite/Magento/Framework/Config/ConverterTest.php deleted file mode 100644 index f68e36d39a3bf..0000000000000 --- a/dev/tests/integration/testsuite/Magento/Framework/Config/ConverterTest.php +++ /dev/null @@ -1,92 +0,0 @@ -loadXML($sourceString); - $actual = $this->converter->convert($document); - - self::assertEquals( - $expected, - $actual - ); - } - - /** - * Data provider for testParseVarElement. - * - * @return array - */ - public function parseVarElementDataProvider() - { - $sourceString = <<<'XML' - - - - some string - 1 - 0 - true - false - - -XML; - $expectedResult = [ - 'vars' => [ - 'Magento_Test' => [ - 'str' => 'some string', - 'int-1' => '1', - 'int-0' => '0', - 'bool-true' => true, - 'bool-false' => false - ] - ] - ]; - - return [ - [ - $sourceString, - $expectedResult - ], - ]; - } - - /** - * @inheritdoc - */ - protected function setUp() - { - $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->converter = $this->objectManager->get(Converter::class); - } -} diff --git a/lib/internal/Magento/Framework/Config/Converter.php b/lib/internal/Magento/Framework/Config/Converter.php index 380aeeee5a068..0401471f27ea5 100644 --- a/lib/internal/Magento/Framework/Config/Converter.php +++ b/lib/internal/Magento/Framework/Config/Converter.php @@ -103,9 +103,7 @@ protected function parseVarElement(\DOMElement $node) } } if (!count($result)) { - $result = (strtolower($node->nodeValue) !== 'true' && strtolower($node->nodeValue) !== 'false') - ? $node->nodeValue - : filter_var($node->nodeValue, FILTER_VALIDATE_BOOLEAN); + $result = $node->nodeValue; } return $result; } From ee0d3bcff5e7a4ac1946f774bddcf1eac49661dc Mon Sep 17 00:00:00 2001 From: gwharton Date: Fri, 7 Sep 2018 14:01:25 +0100 Subject: [PATCH 04/11] Added missed return type of array to function comments --- lib/internal/Magento/Framework/View/Element/AbstractBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 84dd4270c59cf..5c74edc9d4c6c 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -1142,7 +1142,7 @@ protected function _getSidPlaceholder($cacheKey = null) * * @param string $name variable name * @param string|null $module optional module name - * @return string|false + * @return string|false|array */ public function getVar($name, $module = null) { From 2921bf88b657ed2c2a548c787e0b9b2e84829214 Mon Sep 17 00:00:00 2001 From: gwharton Date: Fri, 7 Sep 2018 14:02:36 +0100 Subject: [PATCH 05/11] Implemented different fix for #12285 --- .../Catalog/Block/Product/View/Gallery.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Block/Product/View/Gallery.php b/app/code/Magento/Catalog/Block/Product/View/Gallery.php index 17828b9d375d3..8961ddf35fbd9 100644 --- a/app/code/Magento/Catalog/Block/Product/View/Gallery.php +++ b/app/code/Magento/Catalog/Block/Product/View/Gallery.php @@ -100,7 +100,9 @@ public function getMagnifier() */ public function getBreakpoints() { - return $this->jsonEncoder->encode($this->getVar('breakpoints')); + $breakpoints = $this->getVar('breakpoints'); + array_walk_recursive($breakpoints, [$this, 'convertBooleans']); + return $this->jsonEncoder->encode($breakpoints); } /** @@ -138,6 +140,23 @@ public function getGalleryImagesJson() return json_encode($imagesItems); } + /** + * Convert string to booleans + * + * @param string $item + * @param string $key + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected static function convertBooleans(&$item, $key) + { + if (strtolower($item) == 'true') { + $item = true; + } + if (strtolower($item) == 'false') { + $item = false; + } + } + /** * Retrieve gallery url * From cb267b92ec1e622de1103f0bde5f45c7813dda88 Mon Sep 17 00:00:00 2001 From: gwharton Date: Fri, 7 Sep 2018 16:49:43 +0100 Subject: [PATCH 06/11] Updated gallery.phtml to support changes made to getVar function --- .../templates/product/view/gallery.phtml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml index b2fa8e9aaf80f..b5a61b7259b2c 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml @@ -45,19 +45,19 @@ "data": getGalleryImagesJson() ?>, "options": { "nav": "escapeHtml($block->getVar("gallery/nav")) ?>", - getVar("gallery/loop"))) : ?> - "loop": escapeHtml($block->getVar("gallery/loop")) ?>, + getVar("gallery/loop")) : ?> + "loop": getVar("gallery/loop") ? 'true' : 'false'; ?>, - getVar("gallery/keyboard"))) : ?> - "keyboard": escapeHtml($block->getVar("gallery/keyboard")) ?>, + getVar("gallery/keyboard")) : ?> + "keyboard": getVar("gallery/keyboard") ? 'true' : 'false'; ?>, - getVar("gallery/arrows"))) : ?> - "arrows": escapeHtml($block->getVar("gallery/arrows")) ?>, + getVar("gallery/arrows")) : ?> + "arrows": getVar("gallery/arrows") ? 'true' : 'false'; ?>, - getVar("gallery/allowfullscreen"))) : ?> - "allowfullscreen": escapeHtml($block->getVar("gallery/allowfullscreen")) ?>, + getVar("gallery/allowfullscreen")) : ?> + "allowfullscreen": getVar("gallery/allowfullscreen") ? 'true' : 'false'; ?>, - getVar("gallery/caption"))) : ?> + getVar("gallery/caption")) : ?> "showCaption": getVar("gallery/caption") ? 'true' : 'false'; ?>, escapeHtml($block->getVar("gallery/transition/duration")) ?>, "transition": "escapeHtml($block->getVar("gallery/transition/effect")) ?>", - getVar("gallery/navarrows"))) : ?> - "navarrows": escapeHtml($block->getVar("gallery/navarrows")) ?>, + getVar("gallery/navarrows")) : ?> + "navarrows": getVar("gallery/navarrows") ? 'true' : 'false'; ?>, "navtype": "escapeHtml($block->getVar("gallery/navtype")) ?>", "navdir": "escapeHtml($block->getVar("gallery/navdir")) ?>" @@ -96,17 +96,17 @@ "fullscreen": { "nav": "escapeHtml($block->getVar("gallery/fullscreen/nav")) ?>", getVar("gallery/fullscreen/loop")) : ?> - "loop": escapeHtml($block->getVar("gallery/fullscreen/loop")) ?>, + "loop": getVar("gallery/fullscreen/loop") ? 'true' : 'false'; ?>, "navdir": "escapeHtml($block->getVar("gallery/fullscreen/navdir")) ?>", getVar("gallery/transition/navarrows")) : ?> - "navarrows": escapeHtml($block->getVar("gallery/fullscreen/navarrows")) ?>, + "navarrows": getVar("gallery/fullscreen/navarrows") ? 'true' : 'false'; ?>, "navtype": "escapeHtml($block->getVar("gallery/fullscreen/navtype")) ?>", getVar("gallery/fullscreen/arrows")) : ?> - "arrows": escapeHtml($block->getVar("gallery/fullscreen/arrows")) ?>, + "arrows": getVar("gallery/fullscreen/arrows") ? 'true' : 'false'; ?>, - getVar("gallery/fullscreen/caption"))) : ?> + getVar("gallery/fullscreen/caption")) : ?> getVar("gallery/fullscreen/caption") ? 'true' : 'false'; ?> "showCaption": , From 234188a8888a3f2eaab121d370267de773d6c41a Mon Sep 17 00:00:00 2001 From: gwharton Date: Fri, 7 Sep 2018 17:09:14 +0100 Subject: [PATCH 07/11] Updated gallery.phtml to support revertions to getVar functionality --- .../templates/product/view/gallery.phtml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml index b5a61b7259b2c..b1464233b4f4b 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml @@ -46,19 +46,19 @@ "options": { "nav": "escapeHtml($block->getVar("gallery/nav")) ?>", getVar("gallery/loop")) : ?> - "loop": getVar("gallery/loop") ? 'true' : 'false'; ?>, + "loop": getVar("gallery/loop"), FILTER_VALIDATE_BOOLEAN); ?>, getVar("gallery/keyboard")) : ?> - "keyboard": getVar("gallery/keyboard") ? 'true' : 'false'; ?>, + "keyboard": getVar("gallery/keyboard"), FILTER_VALIDATE_BOOLEAN); ?>, getVar("gallery/arrows")) : ?> - "arrows": getVar("gallery/arrows") ? 'true' : 'false'; ?>, + "arrows": getVar("gallery/arrows"), FILTER_VALIDATE_BOOLEAN); ?>, getVar("gallery/allowfullscreen")) : ?> - "allowfullscreen": getVar("gallery/allowfullscreen") ? 'true' : 'false'; ?>, + "allowfullscreen": getVar("gallery/allowfullscreen"), FILTER_VALIDATE_BOOLEAN); ?>, getVar("gallery/caption")) : ?> - "showCaption": getVar("gallery/caption") ? 'true' : 'false'; ?>, + "showCaption": getVar("gallery/caption"), FILTER_VALIDATE_BOOLEAN); ?>, getImageAttribute('product_page_image_medium', 'width'); @@ -88,7 +88,7 @@ "transition": "escapeHtml($block->getVar("gallery/transition/effect")) ?>", getVar("gallery/navarrows")) : ?> - "navarrows": getVar("gallery/navarrows") ? 'true' : 'false'; ?>, + "navarrows": getVar("gallery/navarrows"), FILTER_VALIDATE_BOOLEAN); ?>, "navtype": "escapeHtml($block->getVar("gallery/navtype")) ?>", "navdir": "escapeHtml($block->getVar("gallery/navdir")) ?>" @@ -96,18 +96,18 @@ "fullscreen": { "nav": "escapeHtml($block->getVar("gallery/fullscreen/nav")) ?>", getVar("gallery/fullscreen/loop")) : ?> - "loop": getVar("gallery/fullscreen/loop") ? 'true' : 'false'; ?>, + "loop": getVar("gallery/fullscreen/loop"), FILTER_VALIDATE_BOOLEAN); ?>, "navdir": "escapeHtml($block->getVar("gallery/fullscreen/navdir")) ?>", getVar("gallery/transition/navarrows")) : ?> - "navarrows": getVar("gallery/fullscreen/navarrows") ? 'true' : 'false'; ?>, + "navarrows": getVar("gallery/fullscreen/navarrows"), FILTER_VALIDATE_BOOLEAN); ?>, "navtype": "escapeHtml($block->getVar("gallery/fullscreen/navtype")) ?>", getVar("gallery/fullscreen/arrows")) : ?> - "arrows": getVar("gallery/fullscreen/arrows") ? 'true' : 'false'; ?>, + "arrows": getVar("gallery/fullscreen/arrows"), FILTER_VALIDATE_BOOLEAN); ?>, getVar("gallery/fullscreen/caption")) : ?> - getVar("gallery/fullscreen/caption") ? 'true' : 'false'; ?> + getVar("gallery/fullscreen/caption"), FILTER_VALIDATE_BOOLEAN); ?> "showCaption": , getVar("gallery/fullscreen/transition/duration")) : ?> From 723c8cc9ec7d4534affa66322875b82bdb4edaaa Mon Sep 17 00:00:00 2001 From: gwharton Date: Fri, 7 Sep 2018 17:17:07 +0100 Subject: [PATCH 08/11] Updated gallery.phtml to support revertions to getVar functionality --- .../templates/product/view/gallery.phtml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml index b1464233b4f4b..2c79d716db771 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml @@ -46,19 +46,19 @@ "options": { "nav": "escapeHtml($block->getVar("gallery/nav")) ?>", getVar("gallery/loop")) : ?> - "loop": getVar("gallery/loop"), FILTER_VALIDATE_BOOLEAN); ?>, + "loop": getVar("gallery/loop"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, getVar("gallery/keyboard")) : ?> - "keyboard": getVar("gallery/keyboard"), FILTER_VALIDATE_BOOLEAN); ?>, + "keyboard": getVar("gallery/keyboard"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, getVar("gallery/arrows")) : ?> - "arrows": getVar("gallery/arrows"), FILTER_VALIDATE_BOOLEAN); ?>, + "arrows": getVar("gallery/arrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, getVar("gallery/allowfullscreen")) : ?> - "allowfullscreen": getVar("gallery/allowfullscreen"), FILTER_VALIDATE_BOOLEAN); ?>, + "allowfullscreen": getVar("gallery/allowfullscreen"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, getVar("gallery/caption")) : ?> - "showCaption": getVar("gallery/caption"), FILTER_VALIDATE_BOOLEAN); ?>, + "showCaption": getVar("gallery/caption"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, getImageAttribute('product_page_image_medium', 'width'); @@ -88,7 +88,7 @@ "transition": "escapeHtml($block->getVar("gallery/transition/effect")) ?>", getVar("gallery/navarrows")) : ?> - "navarrows": getVar("gallery/navarrows"), FILTER_VALIDATE_BOOLEAN); ?>, + "navarrows": getVar("gallery/navarrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, "navtype": "escapeHtml($block->getVar("gallery/navtype")) ?>", "navdir": "escapeHtml($block->getVar("gallery/navdir")) ?>" @@ -96,18 +96,18 @@ "fullscreen": { "nav": "escapeHtml($block->getVar("gallery/fullscreen/nav")) ?>", getVar("gallery/fullscreen/loop")) : ?> - "loop": getVar("gallery/fullscreen/loop"), FILTER_VALIDATE_BOOLEAN); ?>, + "loop": getVar("gallery/fullscreen/loop"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, "navdir": "escapeHtml($block->getVar("gallery/fullscreen/navdir")) ?>", getVar("gallery/transition/navarrows")) : ?> - "navarrows": getVar("gallery/fullscreen/navarrows"), FILTER_VALIDATE_BOOLEAN); ?>, + "navarrows": getVar("gallery/fullscreen/navarrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, "navtype": "escapeHtml($block->getVar("gallery/fullscreen/navtype")) ?>", getVar("gallery/fullscreen/arrows")) : ?> - "arrows": getVar("gallery/fullscreen/arrows"), FILTER_VALIDATE_BOOLEAN); ?>, + "arrows": getVar("gallery/fullscreen/arrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, getVar("gallery/fullscreen/caption")) : ?> - getVar("gallery/fullscreen/caption"), FILTER_VALIDATE_BOOLEAN); ?> + getVar("gallery/fullscreen/caption"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?> "showCaption": , getVar("gallery/fullscreen/transition/duration")) : ?> From ab476ad30a1e9719dc0401e632083dd4ae8e4493 Mon Sep 17 00:00:00 2001 From: Graham Wharton Date: Sat, 8 Sep 2018 12:23:53 +0100 Subject: [PATCH 09/11] Resolved long line violations --- .../templates/product/view/gallery.phtml | 51 +++++++++++++------ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml index 2c79d716db771..5bc274f385c8d 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml @@ -45,20 +45,30 @@ "data": getGalleryImagesJson() ?>, "options": { "nav": "escapeHtml($block->getVar("gallery/nav")) ?>", - getVar("gallery/loop")) : ?> - "loop": getVar("gallery/loop"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + getVar("gallery/loop"))) : ?> + "loop": getVar("gallery/loop"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, - getVar("gallery/keyboard")) : ?> - "keyboard": getVar("gallery/keyboard"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + getVar("gallery/keyboard"))) : ?> + "keyboard": getVar("gallery/keyboard"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, - getVar("gallery/arrows")) : ?> - "arrows": getVar("gallery/arrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + getVar("gallery/arrows"))) : ?> + "arrows": getVar("gallery/arrows"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, - getVar("gallery/allowfullscreen")) : ?> - "allowfullscreen": getVar("gallery/allowfullscreen"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + getVar("gallery/allowfullscreen"))) : ?> + "allowfullscreen": getVar("gallery/allowfullscreen"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, getVar("gallery/caption")) : ?> - "showCaption": getVar("gallery/caption"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + "showCaption": getVar("gallery/caption"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, getImageAttribute('product_page_image_medium', 'width'); @@ -88,7 +98,9 @@ "transition": "escapeHtml($block->getVar("gallery/transition/effect")) ?>", getVar("gallery/navarrows")) : ?> - "navarrows": getVar("gallery/navarrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + "navarrows": getVar("gallery/navarrows"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, "navtype": "escapeHtml($block->getVar("gallery/navtype")) ?>", "navdir": "escapeHtml($block->getVar("gallery/navdir")) ?>" @@ -96,19 +108,26 @@ "fullscreen": { "nav": "escapeHtml($block->getVar("gallery/fullscreen/nav")) ?>", getVar("gallery/fullscreen/loop")) : ?> - "loop": getVar("gallery/fullscreen/loop"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + "loop": getVar("gallery/fullscreen/loop"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, "navdir": "escapeHtml($block->getVar("gallery/fullscreen/navdir")) ?>", - getVar("gallery/transition/navarrows")) : ?> - "navarrows": getVar("gallery/fullscreen/navarrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + getVar("gallery/transition/navarrows"))) : ?> + "navarrows": getVar("gallery/fullscreen/navarrows"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, "navtype": "escapeHtml($block->getVar("gallery/fullscreen/navtype")) ?>", getVar("gallery/fullscreen/arrows")) : ?> - "arrows": getVar("gallery/fullscreen/arrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, + "arrows": getVar("gallery/fullscreen/arrows"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, getVar("gallery/fullscreen/caption")) : ?> - getVar("gallery/fullscreen/caption"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?> - "showCaption": , + "showCaption": getVar("gallery/fullscreen/caption"), FILTER_VALIDATE_BOOLEAN) + ? 'true' : 'false'; ?>, getVar("gallery/fullscreen/transition/duration")) : ?> "transitionduration": Date: Sat, 8 Sep 2018 12:34:52 +0100 Subject: [PATCH 10/11] Corrected gallery/fullscreen/navarrows --- .../Catalog/view/frontend/templates/product/view/gallery.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml index 5bc274f385c8d..23b010ee953de 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml @@ -113,7 +113,7 @@ ? 'true' : 'false'; ?>, "navdir": "escapeHtml($block->getVar("gallery/fullscreen/navdir")) ?>", - getVar("gallery/transition/navarrows"))) : ?> + getVar("gallery/fullscreen/navarrows")) : ?> "navarrows": getVar("gallery/fullscreen/navarrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>, From 5cbd31a47de093686688d08a0b94b690da22fb8e Mon Sep 17 00:00:00 2001 From: gwharton <30697781+gwharton@users.noreply.github.com> Date: Sat, 8 Sep 2018 15:04:50 +0100 Subject: [PATCH 11/11] Reverted accidental removal of brackets --- .../Catalog/view/frontend/templates/product/view/gallery.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml index 23b010ee953de..1ff5e0c8a5eb0 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml @@ -97,7 +97,7 @@ "transitionduration": escapeHtml($block->getVar("gallery/transition/duration")) ?>, "transition": "escapeHtml($block->getVar("gallery/transition/effect")) ?>", - getVar("gallery/navarrows")) : ?> + getVar("gallery/navarrows"))) : ?> "navarrows": getVar("gallery/navarrows"), FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'; ?>,