Produced by Araxis Merge on 2021-05-13 09:09:16 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | /Applications/Ampps/www/Porto 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/WeltPixel_Quickview/templates/product/view | gallery.phtml | 2019-09-17 14:00:12 +0000 |
| 2 | /Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/WeltPixel_Quickview/templates/product/view | gallery.phtml | 2021-02-22 03:20:56 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 12 | 60 |
| Changed | 8 | 142 |
| Inserted | 2 | 11 |
| Removed | 2 | 3 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | 1 | <?php | |||
| 2 | /** | 2 | /** | |||
| 3 | * Copyright © 2015 Magento | 3 | * Copyright © | |||
| 4 | * See COPYING.txt for license details. | 4 | * See COPYING.txt for license details. | |||
| 5 | */ | 5 | */ | |||
| 6 | 6 | |||||
| 7 | // @codingStandardsIgnoreFile | 7 | // @codingStandardsIgnoreFile | |||
| 8 | 8 | |||||
| 9 | /** | 9 | /** | |||
| 10 | * Product media data template | 10 | * Product media data template | |||
| 11 | * | 11 | * | |||
| 12 | * @var $block \Magento\Catalog\Block\Product\View\Gallery | 12 | * @var $block \Magento\Catalog\Block\Product\View\Gallery | |||
| 13 | */ | 13 | */ | |||
| 14 | ?> | 14 | ?> | |||
| 15 | <?php | 15 | <?php | |||
| 16 | $helper = $block->getData('imageHelper'); | |||||
| 16 | $porto_helper = $this->helper('Smartwave\Porto\Helper\Data'); | 17 | $porto_helper = $this->helper('Smartwave\Porto\Helper\Data'); | |||
| 17 | $_config = $porto_helper->getConfig('porto_settings/product'); | 18 | $_config = $porto_helper->getConfig('porto_settings/product'); | |||
| 18 | $image_width = (isset($_config['ratio_width']) && $_config['ratio_width'])?$_config['ratio_width']:600; | 19 | $image_width = (isset($_config['ratio_width']) && $_config['ratio_width'])?$_config['ratio_width']:600; | |||
| 19 | $image_height = (isset($_config['ratio_height']) && $_config['ratio_height'])?$_config['ratio_height']:600; | 20 | $image_height = (isset($_config['ratio_height']) && $_config['ratio_height'])?$_config['ratio_height']:600; | |||
| 20 | $aspect_ratio = (isset($_config['aspect_ratio']))?$_config['aspect_ratio']:0; | 21 | $aspect_ratio = (isset($_config['aspect_ratio']))?$_config['aspect_ratio']:0; | |||
| 21 | if ($aspect_ratio) | 22 | $thumb_width = 100; | |||
| 22 | $image_height = $image_width; | 23 | ||||
| 23 | if ($aspect_ratio) | 24 | $thumbnail_type = 'horizontal'; | |||
| 24 | $thumb_height = 75; | |||||
| 25 | $_product = $block->getProduct(); | |||||
| 26 | ?> | 25 | ?> | |||
| 27 | <?php | 26 | <?php | |||
| 28 | $gallery_images = json_decode($block->getGalleryImagesJson()); | 27 | $images = $block->getGalleryImages()->getItems(); | |||
| 28 | $mainImage = current(array_filter($images, function ($img) use ($block) { | |||||
| 29 | return $block->isMainImage($img); | |||||
| 30 | })); | |||||
| 31 | if (!empty($images) && empty($mainImage)) { | |||||
| 32 | $mainImage = $block->getGalleryImages()->getFirstItem(); | |||||
| 33 | } | |||||
| 34 | $mainImageData = $mainImage ? | |||||
| 35 | $mainImage->getData('medium_image_url') : | |||||
| 36 | $helper->getDefaultPlaceholderUrl('image'); | |||||
| 37 | ||||||
| 29 | ?> | 38 | ?> | |||
| 30 | <div id="gallery_images" class="owl-carousel owl-bottom-narrow"> | 39 | <div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder"> | |||
| 31 | <?php foreach($gallery_images as $gallery_image): ?> | 40 | <img | |||
| 32 | <div class="item"> | 41 | alt="main product photo" | |||
| 33 | <img src="<?php echo $gallery_image->img; ?>" alt=""/> | 42 | class="gallery-placeholder__image" | |||
| 43 | src="<?= /* @noEscape */ $mainImageData ?>" | |||||
| 44 | /> | |||||
| 45 | <div data-role="loader" class="loading-mask"> | |||||
| 46 | <div class="loader"> | |||||
| 47 | <img src="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>" | |||||
| 48 | alt="<?php /* @escapeNotVerified */ echo __('Loading...') ?>"> | |||||
| 49 | </div> | |||||
| 34 | </div> | 50 | </div> | |||
| 35 | <?php endforeach; ?> | |||||
| 36 | </div> | 51 | </div> | |||
| 37 | <script type="text/javascript"> | 52 | <!--Fix for jumping content. Loader must be the same size as gallery.--> | |||
| 38 | require([ | 53 | <script> | |||
| 39 | 'jquery', | 54 | var config = { | |||
| 40 | 'owl.carousel/owl.carousel.min' | 55 | "width": <?php /* @escapeNotVerified */ echo $image_width; ?>, | |||
| 41 | ], function ($) { | 56 | "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height') | |||
| 42 | $("#gallery_images").owlCarousel({ | 57 | ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>, | |||
| 43 | autoplay: false, | 58 | "navtype": "<?php /* @escapeNotVerified */ echo $block->getVar("gallery/navtype"); ?>", | |||
| 44 | autoplayTimeout: 5000, | 59 | <?php if (!$aspect_ratio): ?> | |||
| 45 | autoplayHoverPause: true, | 60 | "height": <?php /* @escapeNotVerified */ echo $image_height; ?> | |||
| 46 | loop: false, | 61 | <?php endif; ?> | |||
| 47 | navRewind: true, | |||||
| 48 | margin: 0, | |||||
| 49 | nav: false, | |||||
| 50 | navText: ["<em class='porto-icon-left-open-huge'></em>","<em class='porto-icon-right-open-huge'></em>"], | |||||
| 51 | dots: true, | |||||
| 52 | responsive: { | |||||
| 53 | 0: { | |||||
| 54 | items:1 | |||||
| 55 | }, | 62 | }, | |||
| 56 | 768: { | 63 | thumbBarHeight = 0, | |||
| 57 | items:1 | 64 | loader = document.querySelectorAll('[data-gallery-role="gallery-placeholder"] [data-role="loader"]')[0]; | |||
| 65 | ||||||
| 66 | if (config.navtype === 'horizontal') { | |||||
| 67 | thumbBarHeight = config.thumbheight; | |||||
| 68 | } | |||||
| 69 | ||||||
| 70 | loader.style.paddingBottom = ( config.height / config.width * 100) + "%"; | |||||
| 71 | </script> | |||||
| 72 | <script type="text/x-magento-init"> | |||||
| 73 | { | |||||
| 74 | "[data-gallery-role=gallery-placeholder]": { | |||||
| 75 | "mage/gallery/gallery": { | |||||
| 76 | "mixins":["magnifier/magnify"], | |||||
| 77 | "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>, | |||||
| 78 | "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>, | |||||
| 79 | "options": { | |||||
| 80 | "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>", | |||||
| 81 | <?php if (($block->getVar("gallery/loop"))): ?> | |||||
| 82 | "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ?>, | |||||
| 83 | <?php endif; ?> | |||||
| 84 | <?php if (($block->getVar("gallery/keyboard"))): ?> | |||||
| 85 | "keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ?>, | |||||
| 86 | <?php endif; ?> | |||||
| 87 | <?php if (($block->getVar("gallery/arrows"))): ?> | |||||
| 88 | "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/arrows") ?>, | |||||
| 89 | <?php endif; ?> | |||||
| 90 | <?php if (($block->getVar("gallery/allowfullscreen"))): ?> | |||||
| 91 | "allowfullscreen": <?= /* @escapeNotVerified */ $block->getVar("gallery/allowfullscreen") ?>, | |||||
| 92 | <?php endif; ?> | |||||
| 93 | <?php if (($block->getVar("gallery/caption"))): ?> | |||||
| 94 | "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/caption") ?>, | |||||
| 95 | <?php endif; ?> | |||||
| 96 | "width": <?php /* @escapeNotVerified */ echo $image_width; ?>, | |||||
| 97 | "thumbwidth": <?php /* @escapeNotVerified */ echo $thumb_width; ?>, | |||||
| 98 | "thumbheight": <?php /* @escapeNotVerified */ echo $thumb_height; ?>, | |||||
| 99 | <?php if(!$aspect_ratio): ?> | |||||
| 100 | "height": <?php /* @escapeNotVerified */ echo $image_height; ?>, | |||||
| 101 | <?php endif; ?> | |||||
| 102 | "thumbmargin": <?php echo $block->getVar("gallery/thumbmargin") ?>, | |||||
| 103 | <?php if ($block->getVar("gallery/transition/duration")): ?> | |||||
| 104 | "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>, | |||||
| 105 | <?php endif; ?> | |||||
| 106 | "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>", | |||||
| 107 | <?php if (($block->getVar("gallery/navarrows"))): ?> | |||||
| 108 | "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>, | |||||
| 109 | <?php endif; ?> | |||||
| 110 | "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>", | |||||
| 111 | "navdir": "<?= /* @escapeNotVerified */ $thumbnail_type ?>" | |||||
| 58 | }, | 112 | }, | |||
| 59 | 992: { | 113 | "fullscreen": { | |||
| 60 | items:1 | 114 | "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/nav") ?>", | |||
| 115 | <?php if ($block->getVar("gallery/fullscreen/loop")): ?> | |||||
| 116 | "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ?>, | |||||
| 117 | <?php endif; ?> | |||||
| 118 | "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navdir") ?>", | |||||
| 119 | <?php if ($block->getVar("gallery/transition/navarrows")): ?> | |||||
| 120 | "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ?>, | |||||
| 121 | <?php endif; ?> | |||||
| 122 | "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navtype") ?>", | |||||
| 123 | <?php if ($block->getVar("gallery/fullscreen/arrows")): ?> | |||||
| 124 | "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/arrows") ?>, | |||||
| 125 | <?php endif; ?> | |||||
| 126 | <?php if ($block->getVar("gallery/fullscreen/caption")): ?> | |||||
| 127 | "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/caption") ?>, | |||||
| 128 | <?php endif; ?> | |||||
| 129 | <?php if ($block->getVar("gallery/fullscreen/transition/duration")): ?> | |||||
| 130 | "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/duration") ?>, | |||||
| 131 | <?php endif; ?> | |||||
| 132 | "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/effect") ?>" | |||||
| 61 | }, | 133 | }, | |||
| 62 | 1200: { | 134 | "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?> | |||
| 63 | items:1 | 135 | } | |||
| 64 | } | 136 | } | |||
| 65 | } | 137 | } | |||
| 66 | }); | |||||
| 67 | }); | |||||
| 68 | </script> | 138 | </script> | |||
| 139 | <style type="text/css"> | |||||
| 140 | @media (min-width: 768px) { | |||||
| 141 | .product.media { | |||||
| 142 | width: 50% !important; | |||||
| 143 | } | |||||
| 144 | .product-info-main { | |||||
| 145 | width: 50% !important; | |||||
| 146 | } | |||||
| 147 | } | |||||
| 148 | </style> |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.