From ca3245fc9c80247dfd637e5699914bea1b1e8df8 Mon Sep 17 00:00:00 2001 From: gwharton Date: Mon, 7 May 2018 19:03:23 +0100 Subject: [PATCH 1/2] Revert "[2.2-develop] Update Gallery Template to handle boolean config Variables" This reverts commit 8ef039ec281a7fc6af014b42fc69a9d77e4bf277. --- .../templates/product/view/gallery.phtml | 40 ++++++++++++++----- 1 file changed, 30 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 a39701b2c8a17..ffecb2ba4f305 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 @@ -47,11 +47,21 @@ "data": getGalleryImagesJson() ?>, "options": { "nav": "getVar("gallery/nav") ?>", - "loop": getVar("gallery/loop") ? 'true' : 'false' ?>, - "keyboard": getVar("gallery/keyboard") ? 'true' : 'false' ?>, - "arrows": getVar("gallery/arrows") ? 'true' : 'false' ?>, - "allowfullscreen": getVar("gallery/allowfullscreen") ? 'true' : 'false' ?>, - "showCaption": getVar("gallery/caption") ? 'true' : 'false' ?>, + getVar("gallery/loop"))): ?> + "loop": getVar("gallery/loop") ?>, + + getVar("gallery/keyboard"))): ?> + "keyboard": getVar("gallery/keyboard") ?>, + + getVar("gallery/arrows"))): ?> + "arrows": getVar("gallery/arrows") ?>, + + getVar("gallery/allowfullscreen"))): ?> + "allowfullscreen": getVar("gallery/allowfullscreen") ?>, + + getVar("gallery/caption"))): ?> + "showCaption": getVar("gallery/caption") ?>, + "width": "getImageAttribute('product_page_image_medium', 'width') ?>", "thumbwidth": "getImageAttribute('product_page_image_small', 'width') ?>", getImageAttribute('product_page_image_small', 'height') || $block->getImageAttribute('product_page_image_small', 'width')): ?> @@ -69,18 +79,28 @@ "transitionduration": getVar("gallery/transition/duration") ?>, "transition": "getVar("gallery/transition/effect") ?>", - "navarrows": getVar("gallery/navarrows") ? 'true' : 'false' ?>, + getVar("gallery/navarrows"))): ?> + "navarrows": getVar("gallery/navarrows") ?>, + "navtype": "getVar("gallery/navtype") ?>", "navdir": "getVar("gallery/navdir") ?>" }, "fullscreen": { "nav": "getVar("gallery/fullscreen/nav") ?>", - "loop": getVar("gallery/fullscreen/loop") ? 'true' : 'false' ?>, + getVar("gallery/fullscreen/loop")): ?> + "loop": getVar("gallery/fullscreen/loop") ?>, + "navdir": "getVar("gallery/fullscreen/navdir") ?>", - "navarrows": getVar("gallery/fullscreen/navarrows") ? 'true' : 'false' ?>, + getVar("gallery/transition/navarrows")): ?> + "navarrows": getVar("gallery/fullscreen/navarrows") ?>, + "navtype": "getVar("gallery/fullscreen/navtype") ?>", - "arrows": getVar("gallery/fullscreen/arrows") ? 'true' : 'false' ?>, - "showCaption": getVar("gallery/fullscreen/caption") ? 'true' : 'false' ?>, + getVar("gallery/fullscreen/arrows")): ?> + "arrows": getVar("gallery/fullscreen/arrows") ?>, + + getVar("gallery/fullscreen/caption")): ?> + "showCaption": getVar("gallery/fullscreen/caption") ?>, + getVar("gallery/fullscreen/transition/duration")): ?> "transitionduration": getVar("gallery/fullscreen/transition/duration") ?>, From 874260d3bf90d51c003597d071392c14bad315cf Mon Sep 17 00:00:00 2001 From: gwharton Date: Mon, 7 May 2018 19:05:15 +0100 Subject: [PATCH 2/2] Correct missing commits for #10210 Add missing commits for \app\code\Magento\Sales\Model\Order\Email\Sender\OrderSender.php --- .../Sales/Model/Order/Email/Sender/OrderSender.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php b/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php index e98f400973c6d..92d00d0436634 100644 --- a/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php +++ b/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php @@ -13,6 +13,7 @@ use Magento\Sales\Model\ResourceModel\Order as OrderResource; use Magento\Sales\Model\Order\Address\Renderer; use Magento\Framework\Event\ManagerInterface; +use Magento\Framework\DataObject; /** * Class OrderSender @@ -130,14 +131,17 @@ protected function prepareTemplate(Order $order) 'formattedShippingAddress' => $this->getFormattedShippingAddress($order), 'formattedBillingAddress' => $this->getFormattedBillingAddress($order), ]; - $transport = new \Magento\Framework\DataObject($transport); + $transportObject = new DataObject($transport); + /** + * Event argument `transport` is @deprecated. Use `transportObject` instead. + */ $this->eventManager->dispatch( 'email_order_set_template_vars_before', - ['sender' => $this, 'transport' => $transport] + ['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject] ); - $this->templateContainer->setTemplateVars($transport->getData()); + $this->templateContainer->setTemplateVars($transportObject->getData()); parent::prepareTemplate($order); }