Produced by Araxis Merge on 2023-07-12 04:42:42 +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 | 2023-07-12 04:42:42 +0000 | ||
| 2 | Porto v4.0.6/Theme Files/Porto Theme/app/code/Smartwave/Filterproducts/view/frontend/templates/widget | side_list.phtml | 2023-07-12 04:24:15 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 183 |
| Removed | 0 | 0 |
| 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 | |||||
| 2 | /** | |||||
| 3 | * Copyright © 2015 Magento. All rights reserved. | |||||
| 4 | * See COPYING.txt for license details. | |||||
| 5 | */ | |||||
| 6 | use Magento\Framework\App\Action\Action; | |||||
| 7 | ||||||
| 8 | // @codingStandardsIgnoreFile | |||||
| 9 | ?> | |||||
| 10 | <?php | |||||
| 11 | /** | |||||
| 12 | * Product list template | |||||
| 13 | * | |||||
| 14 | * @var $block \Smartwave\Filterproducts\Block\ | |||||
| 15 | */ | |||||
| 16 | ?> | |||||
| 17 | <?php | |||||
| 18 | if ($exist = ($block->getProductCollection() && $block->getProductCollection()->getSize())) { | |||||
| 19 | $_productCollection = $block->getProductCollection()->getItems(); | |||||
| 20 | $_helper = $this->helper('Magento\Catalog\Helper\Output'); | |||||
| 21 | $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); | |||||
| 22 | ||||||
| 23 | $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); | |||||
| 24 | ||||||
| 25 | $_category_config = $_portohelper->getConfig('porto_settings/category'); | |||||
| 26 | $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); | |||||
| 27 | $_lazyload = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/optimization/lazyload'); | |||||
| 28 | ||||||
| 29 | $aspect_ratio = $this->getData("aspect_ratio"); | |||||
| 30 | if($aspect_ratio == null) { | |||||
| 31 | $aspect_ratio = $_category_config['aspect_ratio']; | |||||
| 32 | } | |||||
| 33 | $image_width = $this->getData("image_width"); | |||||
| 34 | if(!$image_width) { | |||||
| 35 | $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; | |||||
| 36 | } | |||||
| 37 | $image_height = $this->getData("image_height"); | |||||
| 38 | if($aspect_ratio) | |||||
| 39 | $image_height = $image_width; | |||||
| 40 | if(!$image_height) { | |||||
| 41 | $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; | |||||
| 42 | } | |||||
| 43 | $show_slide_nav = 'false'; | |||||
| 44 | if($this->hasData("show_slide_nav")){ | |||||
| 45 | $show_slide_nav = $this->getData("show_slide_nav") > 0 ? 'true': 'false'; | |||||
| 46 | } | |||||
| 47 | $show_slide_page = 'false'; | |||||
| 48 | if($this->hasData("show_slide_page")) { | |||||
| 49 | $show_slide_page = $this->getData("show_slide_page") > 0 ? 'true': 'false'; | |||||
| 50 | } | |||||
| 51 | $enable_autoplay = 'false'; | |||||
| 52 | if($this->hasData("enable_autoplay")) { | |||||
| 53 | $enable_autoplay = $this->getData("enable_autoplay") > 0 ? 'true': 'false'; | |||||
| 54 | } | |||||
| 55 | $id = $block->getData('page_var_name') . uniqid('', false); | |||||
| 56 | } | |||||
| 57 | ?> | |||||
| 58 | <?php if (!$exist): ?> | |||||
| 59 | <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> | |||||
| 60 | <?php else: ?> | |||||
| 61 | <?php | |||||
| 62 | $viewMode = 'grid'; | |||||
| 63 | $image = 'category_page_grid'; | |||||
| 64 | $hover_image = 'category_page_grid-hover'; | |||||
| 65 | $showDescription = false; | |||||
| 66 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; | |||||
| 67 | ?> | |||||
| 68 | <div id="side_product_<?php echo $id;?>"> | |||||
| 69 | <div class="products wrapper <?php echo $viewMode; ?> small-list products-<?php echo $viewMode; ?>"> | |||||
| 70 | <?php $iterator = 0; ?> | |||||
| 71 | <div class="filterproducts products list items product-items owl-carousel mb-0 show-nav-title"> | |||||
| 72 | <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> | |||||
| 73 | <?php foreach ($_productCollection as $_product): ?> | |||||
| 74 | <?php if(($iterator % 3) == 0): ?> | |||||
| 75 | <div class="item"> | |||||
| 76 | <?php endif; ?> | |||||
| 77 | <?php $iterator ++; ?> | |||||
| 78 | <div class="product product-item"> | |||||
| 79 | <div class="product-item-info" data-container="product-grid"> | |||||
| 80 | <?php // Product Image ?> | |||||
| 81 | <a href="<?php echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1"> | |||||
| 82 | <?php | |||||
| 83 | if($aspect_ratio) | |||||
| 84 | $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | |||||
| 85 | else | |||||
| 86 | $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); | |||||
| 87 | $productImageUrl = $productImage->getUrl(); | |||||
| 88 | ?> | |||||
| 89 | <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/> | |||||
| 90 | <?php if($_category_config['alternative_image']): ?> | |||||
| 91 | <?php | |||||
| 92 | if($aspect_ratio) | |||||
| 93 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | |||||
| 94 | else | |||||
| 95 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); | |||||
| 96 | $productHoverImageUrl = $productHoverImage->getUrl(); | |||||
| 97 | ?> | |||||
| 98 | <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> | |||||
| 99 | <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/> | |||||
| 100 | <?php endif; ?> | |||||
| 101 | <?php endif; ?> | |||||
| 102 | </a> | |||||
| 103 | <div class="product details product-item-details"> | |||||
| 104 | <?php | |||||
| 105 | $_productNameStripped = $block->stripTags($_product->getName(), null, true); | |||||
| 106 | ?> | |||||
| 107 | <a href="<?php echo $_product->getProductUrl() ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?></a> | |||||
| 108 | <?php if($_category_config['rating_star']): ?> | |||||
| 109 | <?php | |||||
| 110 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | |||||
| 111 | ?> | |||||
| 112 | <?php if($review_html): ?> | |||||
| 113 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | |||||
| 114 | <?php else: ?> | |||||
| 115 | <div class="product-reviews-summary short"> | |||||
| 116 | <div class="rating-summary"> | |||||
| 117 | <span class="label"><span>Rating:</span></span> | |||||
| 118 | <div class="rating-result" title="0%"> | |||||
| 119 | <span style="width:0"><span>0%</span></span> | |||||
| 120 | </div> | |||||
| 121 | </div> | |||||
| 122 | </div> | |||||
| 123 | <?php endif; ?> | |||||
| 124 | <?php endif; ?> | |||||
| 125 | <?php if ($showDescription):?> | |||||
| 126 | <div class="product description product-item-description"> | |||||
| 127 | <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> | |||||
| 128 | <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" | |||||
| 129 | class="action more"><?php echo __('Learn More') ?></a> | |||||
| 130 | </div> | |||||
| 131 | <?php endif; ?> | |||||
| 132 | <?php if($_category_config['product_price']): ?> | |||||
| 133 | <?php echo $block->getProductPrice($_product) ?> | |||||
| 134 | <?php endif; ?> | |||||
| 135 | <?php echo $block->getProductDetailsHtml($_product); ?> | |||||
| 136 | </div> | |||||
| 137 | </div> | |||||
| 138 | </div> | |||||
| 139 | <?php if(($iterator % 3) == 0 || $iterator == count($_productCollection)): ?> | |||||
| 140 | </div> | |||||
| 141 | <?php endif; ?> | |||||
| 142 | <?php endforeach; ?> | |||||
| 143 | </div> | |||||
| 144 | </div> | |||||
| 145 | <script type="text/javascript"> | |||||
| 146 | require([ | |||||
| 147 | 'jquery', | |||||
| 148 | 'Smartwave_Filterproducts/js/owl.carousel/owl.carousel.min', | |||||
| 149 | 'Smartwave_Filterproducts/js/lazyload/jquery.lazyload' | |||||
| 150 | ], function ($) { | |||||
| 151 | $("#side_product_<?php echo $id;?> .owl-carousel").owlCarousel({ | |||||
| 152 | autoplay: <?php echo $enable_autoplay;?>, | |||||
| 153 | autoplayTimeout: 5000, | |||||
| 154 | loop: false, | |||||
| 155 | items: 1, | |||||
| 156 | nav: <?php echo $show_slide_nav;?>, | |||||
| 157 | dots: <?php echo $show_slide_page;?> | |||||
| 158 | }); | |||||
| 159 | $("img.porto-lazyload:not(.porto-lazyload-loaded)").lazyload({effect:"fadeIn", effect_speed: 400 }); | |||||
| 160 | if ($('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').length) { | |||||
| 161 | $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('initialized.owl.carousel', function() { | |||||
| 162 | $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | |||||
| 163 | }); | |||||
| 164 | $('.porto-lazyload:not(.porto-lazyload-loaded)').closest('.owl-carousel').on('changed.owl.carousel', function() { | |||||
| 165 | $(this).find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | |||||
| 166 | }); | |||||
| 167 | } | |||||
| 168 | window.setTimeout(function(){ | |||||
| 169 | $('.sidebar-filterproducts').find('.porto-lazyload:not(.porto-lazyload-loaded)').trigger('appear'); | |||||
| 170 | },500); | |||||
| 171 | }); | |||||
| 172 | </script> | |||||
| 173 | </div> | |||||
| 174 | <?php if (!$block->isRedirectToCartEnabled()) : ?> | |||||
| 175 | <script type="text/x-magento-init"> | |||||
| 176 | { | |||||
| 177 | "[data-role=tocart-form], .form.map.checkout": { | |||||
| 178 | "catalogAddToCart": {} | |||||
| 179 | } | |||||
| 180 | } | |||||
| 181 | </script> | |||||
| 182 | <?php endif; ?> | |||||
| 183 | <?php endif; ?> |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.