291. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2021-05-13 09:09:06 +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.

291.1 Files compared

#LocationFileLast Modified
1/Applications/Ampps/www/Porto 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/ajaxproductsgrid.phtml2019-09-10 12:54:02 +0000
2/Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/ajaxproductsgrid.phtml2021-03-27 08:06:20 +0000

291.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged18728
Changed1332
Inserted26
Removed22

291.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

291.4 Active regular expressions

No regular expressions were active.

291.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Copyright © 2015 Magento. All rights reserved. 3  * Copyright © 2015 Magento. All rights reserved.
4  * See COPYING.txt for license details. 4  * See COPYING.txt for license details.
5  */ 5  */
6 use Magento\Framework\App\Action\Action; 6 use Magento\Framework\App\Action\Action;
7  7 
8 // @codingStandardsIgnoreFile 8 // @codingStandardsIgnoreFile
9 ?> 9 ?>
10 <?php 10 <?php
11 /** 11 /**
12  * Product list template 12  * Product list template
13  * 13  *
14  * @var $block \Smartwave\Filterproducts\Block\ 14  * @var $block \Smartwave\Filterproducts\Block\
15  */ 15  */
16 ?> 16 ?>
17 <?php 17 <?php
18 $_productCollection = $block->getLoadedProductCollection(); 18 $_productCollection = $block->getLoadedProductCollection();
19 $_helper = $this->helper('Magento\Catalog\Helper\Output'); 19 $_helper = $this->helper('Magento\Catalog\Helper\Output');
20 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); 20 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image');
21 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); 21 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
22 $review_model = $_portohelper->getModel('\Magento\Review\Model\Review');    
23 $_category_config = $_portohelper->getConfig('porto_settings/category'); 22 $_category_config = $_portohelper->getConfig('porto_settings/category');
24 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); 23 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');
25 $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label'); 24 $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label');
26  25 
27 $aspect_ratio = $this->getData("aspect_ratio"); 26 $aspect_ratio = $this->getData("aspect_ratio");
28 if($aspect_ratio == null) { 27 if($aspect_ratio == null) {
29     $aspect_ratio = $_category_config['aspect_ratio']; 28     $aspect_ratio = $_category_config['aspect_ratio'];
30 } 29 }
31 $image_width = $this->getData("image_width"); 30 $image_width = $this->getData("image_width");
32 if(!$image_width) { 31 if(!$image_width) {
33     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; 32     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
34 } 33 }
35 $image_height = $this->getData("image_height"); 34 $image_height = $this->getData("image_height");
36 if(!$image_height) { 35 if(!$image_height) {
37     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;   36     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
38 } 37 }
39 $column_count = $this->getData("column_count"); 38 $column_count = $this->getData("column_count");
40 if($column_count == null) { 39 if($column_count == null) {
41     $column_count = 4; 40     $column_count = 4;
42 } 41 }
43 $product_count = $this->getData("product_count"); 42 $product_count = $this->getData("product_count");
44 $category_id = $this->getData("category_id"); 43 $category_id = $this->getData("category_id");
45 $product_type = $_category_grid_config['product_type']; 44 $product_type = $_category_grid_config['product_type'];
46 if($product_type == null) { 45 if($product_type == null) {
47     $product_type = 1; 46     $product_type = 1;
48 } 47 }
49 ?> 48 ?>
50 <?php if (!$_productCollection->count()): ?> 49 <?php if (!$_productCollection->count()): ?>
51     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> 50     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div>
52 <?php else: ?> 51 <?php else: ?>
53     <?php 52     <?php
54     $viewMode = 'grid'; 53     $viewMode = 'grid';
55     $image = 'category_page_grid'; 54     $image = 'category_page_grid';
56     $hover_image = 'category_page_grid-hover'; 55     $hover_image = 'category_page_grid-hover';
57     $showDescription = false; 56     $showDescription = false;
58     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; 57     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
59     ?> 58     ?>
60     <div class="products wrapper <?php echo $viewMode; ?> columns<?php echo $column_count; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>"> 59     <div class="products wrapper <?php echo $viewMode; ?> columns<?php echo $column_count; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>">
61         <?php $iterator = 1; ?> 60         <?php $iterator = 1; ?>
62         <ol class="filterproducts products list items product-items"> 61         <ol class="filterproducts products list items product-items">
63             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> 62             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
64             <?php foreach ($_productCollection as $_product): ?> 63             <?php foreach ($_productCollection as $_product): ?>
65                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?> 64                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
66                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid"> 65                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid">
67                     <?php // Product Image ?> 66                     <?php // Product Image ?>
68                     <div class="product photo product-item-photo"> 67                     <div class="product photo product-item-photo">
69                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> 68                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1">
70                         <?php 69                         <?php
71                             if($aspect_ratio) 70                             if($aspect_ratio)
72                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 71                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
73                             else 72                             else
74                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); 73                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height);
75                             $productImageUrl = $productImage->getUrl(); 74                             $productImageUrl = $productImage->getUrl();
76                         ?> 75                         ?>
77                             <img class="product-image-photo default_image" src="<?php echo $productImageUrl; ?>" alt="<?php echo $productImage->getLabel(); ?>"/> 76                             <img class="product-image-photo default_image" src="<?php echo $productImageUrl; ?>" alt="<?php echo $productImage->getLabel(); ?>"/>
78                         <?php if($_category_config['alternative_image']): ?> 77                         <?php if($_category_config['alternative_image']): ?>
79                         <?php 78                         <?php
80                             if($aspect_ratio) 79                             if($aspect_ratio)
81                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 80                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
82                             else 81                             else
83                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); 82                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height);
84                             $productHoverImageUrl = $productHoverImage->getUrl(); 83                             $productHoverImageUrl = $productHoverImage->getUrl();
85                         ?> 84                         ?>
86                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> 85                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>
87                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php echo $productHoverImage->getLabel(); ?>"/> 86                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php echo $productHoverImage->getLabel(); ?>"/>
88                             <?php endif; ?> 87                             <?php endif; ?>
89                         <?php endif; ?> 88                         <?php endif; ?>
90                         </a> 89                         </a>
91                         <?php 90                         <?php
92                             $product_label = ""; 91                             $product_label = "";
93                             if($_product_label_config['sale_label']) { 92                             if($_product_label_config['sale_label']) {
94                                 $orgprice = $_product->getPrice(); 93                                 $orgprice = $_product->getPrice();
95                                 $specialprice = $_product->getSpecialPrice(); 94                                 $specialprice = $_product->getSpecialPrice();
96                                 $specialfromdate = $_product->getSpecialFromDate(); 95                                 $specialfromdate = $_product->getSpecialFromDate();
97                                 $specialtodate = $_product->getSpecialToDate(); 96                                 $specialtodate = $_product->getSpecialToDate();
98                                 $today = time(); 97                                 $today = time();
99                                 if(!$specialprice) 98                                 if(!$specialprice)
100                                     $specialprice = $orgprice; 99                                     $specialprice = $orgprice;
101                                 if($specialprice < $orgprice) { 100                                 if($specialprice < $orgprice) {
102                                     if((is_null($specialfromdate) && is_null($specialtodate)) || ($today >= strtotime($specialfromdate) && is_null($specialtodate)) || ($today <= strtotime($specialtodate) && is_null($specialfromdate)) || ($today >= strtotime($specialfromdate) && $today <= strtotime($specialtodate))){ 101                                     if((is_null($specialfromdate) && is_null($specialtodate)) || ($today >= strtotime($specialfromdate) && is_null($specialtodate)) || ($today <= strtotime($specialtodate) && is_null($specialfromdate)) || ($today >= strtotime($specialfromdate) && $today <= strtotime($specialtodate))){
103                                         if($_product_label_config['sale_label_percent']) { 102                                         if($_product_label_config['sale_label_percent']) {
104                                             $save_percent = 100-round(($specialprice/$orgprice)*100); 103                                             $save_percent = 100-round(($specialprice/$orgprice)*100);
105                                             $product_label .= '<div class="product-label sale-label">'.'-'.$save_percent.'%'.'</div>'; 104                                             $product_label .= '<div class="product-label sale-label">'.'-'.$save_percent.'%'.'</div>';
106                                         } else { 105                                         } else {
107                                             $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; 106                                             $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>';
108                                         } 107                                         }
109                                     } 108                                     }
110                                 } 109                                 }
111                             } 110                             }
112                             if($_product_label_config['new_label']) { 111                             if($_product_label_config['new_label']) {
113                                 $now = date("Y-m-d"); 112                                 $now = date("Y-m-d");
114                                 $newsFrom= substr($_product->getData('news_from_date'),0,10); 113                                 $newsFrom= substr($_product->getData('news_from_date'),0,10);
115                                 $newsTo=  substr($_product->getData('news_to_date'),0,10); 114                                 $newsTo=  substr($_product->getData('news_to_date'),0,10);
116                                  115 
117                                 if ($newsTo != '' || $newsFrom != ''){ 116                                 if ($newsTo != '' || $newsFrom != ''){
118                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { 117                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) {
119                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; 118                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>';
120                                     } 119                                     }
121                                 } 120                                 }
122                             } 121                             }
123                             if($product_label) 122                             if($product_label)
124                                 echo '<div class="product-labels">'.$product_label.'</div>'; 123                                 echo '<div class="product-labels">'.$product_label.'</div>';
125                         ?> 124                         ?>
126                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?> 125                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?>
127                         <div class="product-item-inner"> 126                         <div class="product-item-inner">
128                             <div class="product actions product-item-actions"> 127                             <div class="product actions product-item-actions">
129                                 <div class="actions-primary"> 128                                 <div class="actions-primary">
130                                     <?php if ($_product->isSaleable()): ?> 129                                     <?php if ($_product->isSaleable()): ?>
131                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 130                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
132                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 131                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
133                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 132                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
134                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 133                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
135                                             <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?> 134 
136                                                 <div class="qty-box">    
137                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a>    
138                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php /* @escapeNotVerified */ echo $block->getProductDefaultQty() * 1 ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>    
139                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a>    
140                                                 </div>    
141                                             <?php endif;?>    
142                                             <?php echo $block->getBlockHtml('formkey')?> 135                                             <?php echo $block->getBlockHtml('formkey')?>
143                                             <button type="submit" 136                                             <button type="submit"
144                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 137                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
145                                                     class="action tocart primary"> 138                                                     class="action tocart primary">
146                                                 <span><?php echo __('Add to Cart') ?></span> 139                                                 <span><?php echo __('Add to Cart') ?></span>
147                                             </button> 140                                             </button>
148                                         </form> 141                                         </form>
149                                     <?php else: ?> 142                                     <?php else: ?>
150                                         <?php if ($_product->getIsSalable()): ?> 143                                         <?php if ($_product->getIsSalable()): ?>
151                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 144                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
152                                         <?php else: ?> 145                                         <?php else: ?>
153                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 146                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
154                                         <?php endif; ?> 147                                         <?php endif; ?>
155                                     <?php endif; ?> 148                                     <?php endif; ?>
156                                 </div> 149                                 </div>
157                                 <?php if ($block->getMode() == 'grid'): ?> 150                                 <?php if ($block->getMode() == 'grid'): ?>
158                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 151                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
159                                     <a href="#" 152                                     <a href="#"
160                                        class="action towishlist actions-secondary" 153                                        class="action towishlist actions-secondary"
161                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 154                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
162                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 155                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
163                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 156                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
164                                        data-action="add-to-wishlist" 157                                        data-action="add-to-wishlist"
165                                        role="button"> 158                                        role="button">
166                                         <span><?php echo __('Add to Wish List') ?></span> 159                                         <span><?php echo __('Add to Wish List') ?></span>
167                                     </a> 160                                     </a>
168                                 <?php endif; ?> 161                                 <?php endif; ?>
169                                 <?php endif; ?> 162                                 <?php endif; ?>
170                                 <?php if($_category_config['addtocompare']): ?> 163                                 <?php if($_category_config['addtocompare']): ?>
171                                 <?php 164                                 <?php
172                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 165                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
173                                 ?> 166                                 ?>
174                                 <a href="#" 167                                 <a href="#"
175                                    class="action tocompare actions-secondary" 168                                    class="action tocompare actions-secondary"
176                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 169                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
177                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 170                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
178                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 171                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
179                                    role="button"> 172                                    role="button">
180                                     <span><?php echo __('Add to Compare') ?></span> 173                                     <span><?php echo __('Add to Compare') ?></span>
181                                 </a> 174                                 </a>
182                                 <?php endif; ?> 175                                 <?php endif; ?>
183                             </div> 176                             </div>
184                         </div> 177                         </div>
185                         <?php endif; ?> 178                         <?php endif; ?>
186                     </div> 179                     </div>
187                     <div class="product details product-item-details"> 180                     <div class="product details product-item-details">
188                         <?php 181                         <?php
189                             $_productNameStripped = $block->stripTags($_product->getName(), null, true); 182                             $_productNameStripped = $block->stripTags($_product->getName(), null, true);
190                         ?> 183                         ?>
191                         <strong class="product name product-item-name"> 184                         <strong class="product name product-item-name">
192                             <a class="product-item-link" 185                             <a class="product-item-link"
193                                href="<?php echo $_product->getProductUrl() ?>"> 186                                href="<?php echo $_product->getProductUrl() ?>">
194                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> 187                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
195                             </a> 188                             </a>
196                         </strong> 189                         </strong>
197                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?> 190                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?>
198                         <?php if($_category_config['rating_star']): ?> 191                         <?php if($_category_config['rating_star']): ?>
199                         <?php 192                         <?php
200                             $review_model->getEntitySummary($_product);    
201                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType); 193                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType);
202                         ?> 194                         ?>
203                         <?php if($review_html): ?> 195                         <?php if($review_html): ?>
204                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> 196                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
205                         <?php else: ?> 197                         <?php else: ?>
206                         <div class="product-reviews-summary short"> 198                         <div class="product-reviews-summary short">
207                             <div class="rating-summary"> 199                             <div class="rating-summary">
208                                 <span class="label"><span>Rating:</span></span> 200                                 <span class="label"><span>Rating:</span></span>
209                                 <div class="rating-result" title="0%"> 201                                 <div class="rating-result" title="0%">
210                                     <span style="width:0"><span>0%</span></span> 202                                     <span style="width:0"><span>0%</span></span>
211                                 </div> 203                                 </div>
212                             </div> 204                             </div>
213                         </div> 205                         </div>
214                         <?php endif; ?> 206                         <?php endif; ?>
215                         <?php endif; ?> 207                         <?php endif; ?>
216                         <?php if ($showDescription):?> 208                         <?php if ($showDescription):?>
217                             <div class="product description product-item-description"> 209                             <div class="product description product-item-description">
218                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> 210                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
219                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" 211                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>"
220                                    class="action more"><?php echo __('Learn More') ?></a> 212                                    class="action more"><?php echo __('Learn More') ?></a>
221                             </div> 213                             </div>
222                         <?php endif; ?> 214                         <?php endif; ?>
223                         <?php if($_category_config['product_price']): ?> 215                         <?php if($_category_config['product_price']): ?>
224                         <?php echo $block->getProductPrice($_product) ?> 216                         <?php echo $block->getProductPrice($_product) ?>
225                         <?php endif; ?> 217                         <?php endif; ?>
226                         <?php echo $block->getProductDetailsHtml($_product); ?> 218                         <?php echo $block->getProductDetailsHtml($_product); ?>
227                          219 
228                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?> 220                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?>
229                         <div class="product-item-inner"> 221                         <div class="product-item-inner">
230                             <div class="product actions product-item-actions"> 222                             <div class="product actions product-item-actions">
231                                 <?php if ($block->getMode() == 'grid'): ?> 223                                 <?php if ($block->getMode() == 'grid'): ?>
232                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?> 224                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?>
233                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 225                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
234                                     <a href="#" 226                                     <a href="#"
235                                        class="action towishlist actions-secondary <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?>has-qty<?php endif;?>" 227                                        class="action towishlist actions-secondary"
236                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 228                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
237                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 229                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
238                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 230                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
239                                        data-action="add-to-wishlist" 231                                        data-action="add-to-wishlist"
240                                        role="button"> 232                                        role="button">
241                                         <span><?php echo __('Add to Wish List') ?></span> 233                                         <span><?php echo __('Add to Wish List') ?></span>
242                                     </a> 234                                     </a>
243                                 <?php endif; ?> 235                                 <?php endif; ?>
244                                 <?php endif; ?> 236                                 <?php endif; ?>
245                                 <?php endif; ?> 237                                 <?php endif; ?>
246                                 <div class="actions-primary"> 238                                 <div class="actions-primary">
247                                     <?php if ($_product->isSaleable()): ?> 239                                     <?php if ($_product->isSaleable()): ?>
248                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 240                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
249                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 241                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
250                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 242                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
251                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 243                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
252                                             <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?> 244                                             <?php if($product_type == 10):?>
253                                                 <div class="qty-box"> 245                                                 <div class="qty-box">
254                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> 246                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a>
255                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php /* @escapeNotVerified */ echo 
$block->getProductDefaultQty(
) * 1
 ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>
 247                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php 
echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>
256                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> 248                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a>
257                                                 </div> 249                                                 </div>
258                                             <?php endif;?> 250                                             <?php endif;?>
259                                             <?php echo $block->getBlockHtml('formkey')?> 251                                             <?php echo $block->getBlockHtml('formkey')?>
260                                             <button type="submit" 252                                             <button type="submit"
261                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 253                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
262                                                     class="action tocart primary"> 254                                                     class="action tocart primary">
263                                                 <span><?php echo __('Add to Cart') ?></span> 255                                                 <span><?php echo __('Add to Cart') ?></span>
264                                             </button> 256                                             </button>
265                                         </form> 257                                         </form>
266                                     <?php else: ?> 258                                     <?php else: ?>
267                                         <?php if ($_product->getIsSalable()): ?> 259                                         <?php if ($_product->getIsSalable()): ?>
268                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 260                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
269                                         <?php else: ?> 261                                         <?php else: ?>
270                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 262                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
271                                         <?php endif; ?> 263                                         <?php endif; ?>
272                                     <?php endif; ?> 264                                     <?php endif; ?>
273                                 </div> 265                                 </div>
274                                 <?php if ($block->getMode() == 'grid'): ?> 266                                 <?php if ($block->getMode() == 'grid'): ?>
275                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?> 267                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?>
276                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 268                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
277                                     <a href="#" 269                                     <a href="#"
278                                        class="action towishlist actions-secondary <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?>has-qty<?php endif;?>" 270                                        class="action towishlist actions-secondary"
279                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 271                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
280                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 272                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
281                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 273                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
282                                        data-action="add-to-wishlist" 274                                        data-action="add-to-wishlist"
283                                        role="button"> 275                                        role="button">
284                                         <span><?php echo __('Add to Wish List') ?></span> 276                                         <span><?php echo __('Add to Wish List') ?></span>
285                                     </a> 277                                     </a>
286                                 <?php endif; ?> 278                                 <?php endif; ?>
287                                 <?php endif; ?> 279                                 <?php endif; ?>
288                                 <?php endif; ?> 280                                 <?php endif; ?>
289                                 <?php if($_category_config['addtocompare']): ?> 281                                 <?php if($_category_config['addtocompare']): ?>
290                                 <?php 282                                 <?php
291                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 283                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
292                                 ?> 284                                 ?>
293                                 <a href="#" 285                                 <a href="#"
294                                    class="action tocompare actions-secondary <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?>has-qty<?php endif;?>" 286                                    class="action tocompare actions-secondary"
295                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 287                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
296                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 288                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
297                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 289                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
298                                    role="button"> 290                                    role="button">
299                                     <span><?php echo __('Add to Compare') ?></span> 291                                     <span><?php echo __('Add to Compare') ?></span>
300                                 </a> 292                                 </a>
301                                 <?php endif; ?> 293                                 <?php endif; ?>
302                             </div> 294                             </div>
303                         </div> 295                         </div>
304                         <?php endif; ?> 296                         <?php endif; ?>
305                     </div> 297                     </div>
306                 </div> 298                 </div>
307                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?> 299                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?>
308             <?php endforeach; ?> 300             <?php endforeach; ?>
309         </ol> 301         </ol>
310         <div style="clear:both;"></div> 302         <div style="clear:both;"></div>
311         <?php if($product_count == count($_productCollection)): ?> 303         <?php if($product_count == count($_productCollection)): ?>
312         <div class="load-more-area"> 304         <div class="load-more-area">
313             <p class="ajax-loader-area" style="margin: 40px 0;display: none;"><i class="ajax-loader large animate-spin"></i></p> 305             <p class="ajax-loader-area" style="margin: 40px 0;display: none;"><i class="ajax-loader large animate-spin"></i></p>
314             <a href="javascript:void(0)" cat_id="<?php echo $category_id; ?>" product_count="<?php echo $product_count + $column_count; ?>"><?php echo __("Load More"); ?></a> 306             <a href="javascript:void(0)" cat_id="<?php echo $category_id; ?>" product_count="<?php echo $product_count + $column_count; ?>"><?php echo __("Load More"); ?></a>
315         </div> 307         </div>
316         <?php endif; ?> 308         <?php endif; ?>
317     </div> 309     </div>
318     <script type="text/javascript"> 310     <script type="text/javascript">
319         require([ 311         require([
320             'jquery' 312             'jquery'
321         ], function ($) { 313         ], function ($) {
322             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n)').addClass('nth-child-2n'); 314             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n)').addClass('nth-child-2n');
323             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); 315             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n+1)').addClass('nth-child-2np1');
324             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n)').addClass('nth-child-3n'); 316             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n)').addClass('nth-child-3n');
325             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); 317             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n+1)').addClass('nth-child-3np1');
326             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n)').addClass('nth-child-4n'); 318             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n)').addClass('nth-child-4n');
327             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); 319             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n+1)').addClass('nth-child-4np1');
328             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n)').addClass('nth-child-5n'); 320             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n)').addClass('nth-child-5n');
329             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); 321             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n+1)').addClass('nth-child-5np1');
330             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n)').addClass('nth-child-6n'); 322             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n)').addClass('nth-child-6n');
331             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); 323             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n+1)').addClass('nth-child-6np1');
332             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n)').addClass('nth-child-7n'); 324             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n)').addClass('nth-child-7n');
333             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); 325             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n+1)').addClass('nth-child-7np1');
334             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n)').addClass('nth-child-8n'); 326             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n)').addClass('nth-child-8n');
335             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); 327             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n+1)').addClass('nth-child-8np1');
336              328 
337             $('.load-more-area > a').off("click").on("click", function(){ 329             $('.load-more-area > a').off("click").on("click", function(){
338                 url = "<?php echo $_portohelper->getBaseLinkUrl()."swporto/index/showcategoryproducts" ?>"; 330                 url = "<?php echo $_portohelper->getBaseLinkUrl()."swporto/index/showcategoryproducts" ?>";
339                 cat_id = $(this).attr("cat_id"); 331                 cat_id = $(this).attr("cat_id");
340                  332 
341                 $(".ajax-products .load-more-area > .ajax-loader-area").fadeIn(); 333                 $(".ajax-products .load-more-area > .ajax-loader-area").fadeIn();
342                  334 
343                 $.ajax({ 335                 $.ajax({
344                     method:"POST", 336                     method:"POST",
345                     url:url, 337                     url:url,
346                     data:{ 338                     data:{
347                         aspect_ratio:"<?php echo $aspect_ratio; ?>", 339                         aspect_ratio:"<?php echo $aspect_ratio; ?>",
348                         image_width:"<?php echo $image_width; ?>", 340                         image_width:"<?php echo $image_width; ?>",
349                         image_height:"<?php echo $image_height; ?>", 341                         image_height:"<?php echo $image_height; ?>",
350                         product_count:"<?php echo $product_count+$column_count; ?>", 342                         product_count:"<?php echo $product_count+$column_count; ?>",
351                         columns:"<?php echo $column_count; ?>", 343                         columns:"<?php echo $column_count; ?>",
352                         category_id:cat_id 344                         category_id:cat_id
353                     }, 345                     },
354                     dataType: 'json' 346                     dataType: 'json'
355                 }).done(function(data){ 347                 }).done(function(data){
356                     $(".ajax-products > .category-detail > .products-area").html(data.result); 348                     $(".ajax-products > .category-detail > .products-area").html(data.result);
    349                     if($("form[data-role=tocart-form]").length > 0 && !redirect_cart) {
    350                         $("form[data-role=tocart-form]").catalogAddToCart();
    351                     }
357                 }).fail(function(){ 352                 }).fail(function(){
358                      353 
359                 }).always(function(){ 354                 }).always(function(){
360                     $(".ajax-products > .category-detail > .ajax_products_loader").fadeOut(); 355                     $(".ajax-products > .category-detail > .ajax_products_loader").fadeOut();
361                     if(typeof enable_quickview != 'undefined' && enable_quickview == true) { 356                     if(typeof enable_quickview != 'undefined' && enable_quickview == true) {
362                         requirejs(['jquery', 'weltpixel_quickview' ], 357                         requirejs(['jquery', 'weltpixel_quickview' ],
363                         function   ($, quickview) { 358                         function   ($, quickview) {
364                             $('.weltpixel-quickview').off('click').on('click', function() { 359                             $('.weltpixel-quickview').off('click').on('click', function() {
365                                 var prodUrl = $(this).attr('data-quickview-url'); 360                                 var prodUrl = $(this).attr('data-quickview-url');
366                                 if (prodUrl.length) { 361                                 if (prodUrl.length) {
367                                     quickview.displayContent(prodUrl); 362                                     quickview.displayContent(prodUrl);
368                                 } 363                                 }
369                             }); 364                             });
    365                             $(".ajax-products .products-grid .weltpixel-quickview").each(function(){
    366                                 $(this).appendTo($(this).parent().parent().children(".product-item-photo"));
    367                             });
370                         }); 368                         });
371                     } 369                     }
372                 }); 370                 });
373             }); 371             });
374         }); 372         });
375     </script> 373     </script>
376     <?php if (!$block->isRedirectToCartEnabled()) : ?> 374     <?php if (!$block->isRedirectToCartEnabled()) : ?>
377         <script type="text/x-magento-init"> 375         <script type="text/x-magento-init">
378         { 376         {
379             "[data-role=tocart-form], .form.map.checkout": { 377             "[data-role=tocart-form], .form.map.checkout": {
380                 "catalogAddToCart": {} 378                 "catalogAddToCart": {}
381             } 379             }
382         } 380         }
383         </script> 381         </script>
384     <?php endif; ?> 382     <?php endif; ?>
385 <?php endif; ?> 383 <?php endif; ?>