283. Araxis Merge File Comparison Report

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

283.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_Filterproducts/templatesowl_list.phtml2019-12-13 07:50:00 +0000
2/Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Filterproducts/templatesowl_list.phtml2021-03-21 01:24:02 +0000

283.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged26818
Changed2358
Inserted00
Removed22

283.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

283.4 Active regular expressions

No regular expressions were active.

283.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 $_lazyload = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/optimization/lazyload'); 25 $_lazyload = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/optimization/lazyload');
27  26 $extra_class = $this->getData("extra_class");
28 // Daily deal Helper  27 // Daily deal Helper
29 $_dailydealhelper =$this->helper('Smartwave\Dailydeals\Helper\Data'); 28 $_dailydealhelper =$this->helper('Smartwave\Dailydeals\Helper\Data');
30  29 
31 $aspect_ratio = $this->getData("aspect_ratio"); 30 $aspect_ratio = $this->getData("aspect_ratio");
32 if($aspect_ratio == null) { 31 if($aspect_ratio == null) {
33     $aspect_ratio = $_category_config['aspect_ratio']; 32     $aspect_ratio = $_category_config['aspect_ratio'];
34 } 33 }
35 $image_width = $this->getData("image_width"); 34 $image_width = $this->getData("image_width");
36 if(!$image_width) { 35 if(!$image_width) {
37     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; 36     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
38 } 37 }
39 $image_height = $this->getData("image_height"); 38 $image_height = $this->getData("image_height");
40 if($aspect_ratio) 39 if($aspect_ratio)
41     $image_height = $image_width; 40     $image_height = $image_width;
42 if(!$image_height) { 41 if(!$image_height) {
43     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;   42     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
44 } 43 }
45 $product_type = $this->getData("product_type"); 44 $product_type = $this->getData("product_type");
46 if($product_type == null) { 45 if($product_type == null) {
47     $product_type = $_category_grid_config['product_type']; 46     $product_type = $_category_grid_config['product_type'];
48 } 47 }
49 if($product_type == null) { 48 if($product_type == null) {
50     $product_type = 1; 49     $product_type = 1;
51 } 50 }
52 ?> 51 ?>
53 <?php if (!$_productCollection->count()): ?> 52 <?php if (!$_productCollection->count()): ?>
54     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> 53     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div>
55 <?php else: ?> 54 <?php else: ?>
56     <?php 55     <?php
57     $viewMode = 'grid'; 56     $viewMode = 'grid';
58     $image = 'category_page_grid'; 57     $image = 'category_page_grid';
59     $hover_image = 'category_page_grid-hover'; 58     $hover_image = 'category_page_grid-hover';
60     $showDescription = false; 59     $showDescription = false;
61     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; 60     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
62     ?> 61     ?>
63     <div class="products wrapper <?php echo $viewMode; ?> 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; ?>"> 62     <div class="products wrapper <?php echo $viewMode; ?> 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; ?>">
64         <?php $iterator = 1; ?> 63         <?php $iterator = 1; ?>
65         <div class="filterproducts products 
list items product-items owl-carousel <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?>has-qty<?php endif;?>">
 64         <div class="filterproducts products products-slider list items product-items owl-carousel <?php echo $extra_class;?>">
66             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> 65             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
67             <?php foreach ($_productCollection as $_product): ?> 66             <?php foreach ($_productCollection as $_product): ?>
68                 <?php echo($iterator++ == 1) ? '<div class="item product product-item">' : '</div><div class="item product product-item">' ?> 67                 <?php echo($iterator++ == 1) ? '<div class="item product product-item">' : '</div><div class="item product product-item">' ?>
69                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid"> 68                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid">
70                     <?php // Product Image ?> 69                     <?php // Product Image ?>
71                     <div class="product photo product-item-photo"> 70                     <div class="product photo product-item-photo">
72                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> 71                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1">
73                         <?php 72                         <?php
74                             if($aspect_ratio) 73                             if($aspect_ratio)
75                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 74                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
76                             else 75                             else
77                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); 76                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height);
78                             $productImageUrl = $productImage->getUrl(); 77                             $productImageUrl = $productImage->getUrl();
79                         ?> 78                         ?>
80                             <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="
"/>
 79                             <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();?>"/>
81                         <?php if($_category_config['alternative_image']): ?> 80                         <?php if($_category_config['alternative_image']): ?>
82                         <?php 81                         <?php
83                             if($aspect_ratio) 82                             if($aspect_ratio)
84                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 83                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
85                             else 84                             else
86                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); 85                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height);
87                             $productHoverImageUrl = $productHoverImage->getUrl(); 86                             $productHoverImageUrl = $productHoverImage->getUrl();
88                         ?> 87                         ?>
89                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> 88                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>
90                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="
"/>
 89                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/>
91                             <?php endif; ?> 90                             <?php endif; ?>
92                         <?php endif; ?> 91                         <?php endif; ?>
93                         </a> 92                         </a>
94                         <?php 93                         <?php
95                             $product_label = ""; 94                             $product_label = "";
96                             if($_product_label_config['sale_label']) { 95                             if($_product_label_config['sale_label']) {
97                                 $orgprice = $_product->getPrice(); 96                                 $orgprice = $_product->getPrice();
98                                 $specialprice = $_product->getSpecialPrice(); 97                                 $specialprice = $_product->getSpecialPrice();
99                                 $specialfromdate = $_product->getSpecialFromDate(); 98                                 $specialfromdate = $_product->getSpecialFromDate();
100                                 $specialtodate = $_product->getSpecialToDate(); 99                                 $specialtodate = $_product->getSpecialToDate();
101                                 $today = time(); 100                                 $today = time();
102                                 if(!$specialprice) 101                                 if(!$specialprice)
103                                     $specialprice = $orgprice; 102                                     $specialprice = $orgprice;
104                                 if($specialprice < $orgprice) { 103                                 if($specialprice < $orgprice) {
105                                     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))){ 104                                     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))){
106                                         if($_product_label_config['sale_label_percent']) { 105                                         if($_product_label_config['sale_label_percent']) {
107                                             $save_percent = 100-round(($specialprice/$orgprice)*100); 106                                             $save_percent = 100-round(($specialprice/$orgprice)*100);
108                                             $product_label .= '<div class="product-label sale-label">'.'-'.$save_percent.'%'.'</div>'; 107                                             $product_label .= '<div class="product-label sale-label">'.'-'.$save_percent.'%'.'</div>';
109                                         } else { 108                                         } else {
110                                             $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; 109                                             $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>';
111                                         } 110                                         }
112                                     } 111                                     }
113                                 } 112                                 }
114                             } 113                             }
115                             if($_product_label_config['new_label']) { 114                             if($_product_label_config['new_label']) {
116                                 $now = date("Y-m-d"); 115                                 $now = date("Y-m-d");
117                                 $newsFrom= substr($_product->getData('news_from_date'),0,10); 116                                 $newsFrom= substr($_product->getData('news_from_date'),0,10);
118                                 $newsTo=  substr($_product->getData('news_to_date'),0,10); 117                                 $newsTo=  substr($_product->getData('news_to_date'),0,10);
119                                  118 
120                                 if ($newsTo != '' || $newsFrom != ''){ 119                                 if ($newsTo != '' || $newsFrom != ''){
121                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { 120                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) {
122                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; 121                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>';
123                                     } 122                                     }
124                                 } 123                                 }
125                             } 124                             }
126                             if($product_label) 125                             if($product_label)
127                                 echo '<div class="product-labels">'.$product_label.'</div>'; 126                                 echo '<div class="product-labels">'.$product_label.'</div>';
128                         ?> 127                         ?>
129                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9 || $product_type == 10): ?> 128                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9 || $product_type == 11): ?>
130                         <div class="product-item-inner"> 129                         <div class="product-item-inner">
131                             <div class="product actions product-item-actions"> 130                             <div class="product actions product-item-actions">
132                                 <div class="actions-primary"> 131                                 <div class="actions-primary">
133                                     <?php if ($_product->isSaleable()): ?> 132                                     <?php if ($_product->isSaleable()): ?>
134                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 133                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
135                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 134                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
136                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 135                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
137                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 136                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
138                                             <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?> 137 
139                                                 <div class="qty-box">    
140                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a>    
141                                                     <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())) ?>"/>    
142                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a>    
143                                                 </div>    
144                                             <?php endif;?>    
145                                             <?php echo $block->getBlockHtml('formkey')?> 138                                             <?php echo $block->getBlockHtml('formkey')?>
146                                             <button type="submit" 139                                             <button type="submit"
147                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 140                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
148                                                     class="action tocart primary"> 141                                                     class="action tocart primary">
149                                                 <span><?php echo __('Add to Cart') ?></span> 142                                                 <span><?php echo __('Add to Cart') ?></span>
150                                             </button> 143                                             </button>
151                                         </form> 144                                         </form>
152                                     <?php else: ?> 145                                     <?php else: ?>
153                                         <?php if ($_product->getIsSalable()): ?> 146                                         <?php if ($_product->getIsSalable()): ?>
154                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 147                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
155                                         <?php else: ?> 148                                         <?php else: ?>
156                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 149                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
157                                         <?php endif; ?> 150                                         <?php endif; ?>
158                                     <?php endif; ?> 151                                     <?php endif; ?>
159                                 </div> 152                                 </div>
160                                 <?php if ($block->getMode() == 'grid'): ?> 153                                 <?php if ($block->getMode() == 'grid'): ?>
161                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 154                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
162                                     <a href="#" 155                                     <a href="#"
163                                        class="action towishlist actions-secondary" 156                                        class="action towishlist actions-secondary"
164                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 157                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
165                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 158                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
166                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 159                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
167                                        data-action="add-to-wishlist" 160                                        data-action="add-to-wishlist"
168                                        role="button"> 161                                        role="button">
169                                         <span><?php echo __('Add to Wish List') ?></span> 162                                         <span><?php echo __('Add to Wish List') ?></span>
170                                     </a> 163                                     </a>
171                                 <?php endif; ?> 164                                 <?php endif; ?>
172                                 <?php endif; ?> 165                                 <?php endif; ?>
173                                 <?php if($_category_config['addtocompare']): ?> 166                                 <?php if($_category_config['addtocompare']): ?>
174                                 <?php 167                                 <?php
175                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 168                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
176                                 ?> 169                                 ?>
177                                 <a href="#" 170                                 <a href="#"
178                                    class="action tocompare actions-secondary" 171                                    class="action tocompare actions-secondary"
179                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 172                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
180                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 173                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
181                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 174                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
182                                    role="button"> 175                                    role="button">
183                                     <span><?php echo __('Add to Compare') ?></span> 176                                     <span><?php echo __('Add to Compare') ?></span>
184                                 </a> 177                                 </a>
185                                 <?php endif; ?> 178                                 <?php endif; ?>
186                             </div> 179                             </div>
187                         </div> 180                         </div>
188                         <?php endif; ?> 181                         <?php endif; ?>
189                         <!-- Dailydeal Product data --> 182                         <!-- Dailydeal Product data -->
190                         <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?> 183                         <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?>
191                         <?php $unique_id = $this->getData("name")."_".rtrim(base64_encode(md5(microtime())),"="); ?> 184                         <?php $unique_id = $this->getData("name")."_".rtrim(base64_encode(md5(microtime())),"="); ?>
192                         <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" > 185                         <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" >
193                         <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>"> 186                         <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>">
194                         <div class="sw-dailydeal-wrapper" style="display:none;" data-unique-id="<?php echo $unique_id; ?>"> 187                         <div class="sw-dailydeal-wrapper" style="display:none;" data-unique-id="<?php echo $unique_id; ?>">
195                             <div class="sw-dailydeal"> 188                             <div class="sw-dailydeal">
196                                 <p id="expired_<?php echo $unique_id; ?>"></p>  189                                 <p id="expired_<?php echo $unique_id; ?>"></p>
197                                 <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;"> 190                                 <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;">
198                                     <span class="dailydeal-label"> 191                                     <span class="dailydeal-label">
199                                         <?php echo __('Ends In:'); ?> 192                                         <?php echo __('Ends In:'); ?>
200                                     </span> 193                                     </span>
201                                     <span class="number-wrapper"> 194                                     <span class="number-wrapper">
202                                         <div class="line"></div> 195                                         <div class="line"></div>
203                                         <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span> 196                                         <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span>
204                                         <div class="caption"><?php echo __('Day(s), '); ?></div> 197                                         <div class="caption"><?php echo __('Day(s), '); ?></div>
205                                     </span> 198                                     </span>
206  199 
207                                     <span class="number-wrapper"> 200                                     <span class="number-wrapper">
208                                         <div class="line"></div> 201                                         <div class="line"></div>
209                                         <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span> 202                                         <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span>
210                                         <div class="caption">:</div> 203                                         <div class="caption">:</div>
211                                     </span> 204                                     </span>
212  205 
213                                     <span class="number-wrapper"> 206                                     <span class="number-wrapper">
214                                         <div class="line"></div> 207                                         <div class="line"></div>
215                                         <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span> 208                                         <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span>
216                                         <div class="caption">:</div> 209                                         <div class="caption">:</div>
217                                     </span> 210                                     </span>
218  211 
219                                     <span class="number-wrapper"> 212                                     <span class="number-wrapper">
220                                         <div class="line"></div> 213                                         <div class="line"></div>
221                                         <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span> 214                                         <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span>
222                                         <div class="caption"></div> 215                                         <div class="caption"></div>
223                                     </span> 216                                     </span>
224                                 </div> 217                                 </div>
225                             </div> 218                             </div>
226                         </div> 219                         </div>
227                         <?php endif; ?>  220                         <?php endif; ?>
228                         <!-- Dailydeal Product End --> 221                         <!-- Dailydeal Product End -->
229                     </div> 222                     </div>
230                     <div class="product details product-item-details"> 223                     <div class="product details product-item-details">
231                         <?php 224                         <?php
232                             $_productNameStripped = $block->stripTags($_product->getName(), null, true); 225                             $_productNameStripped = $block->stripTags($_product->getName(), null, true);
233                         ?> 226                         ?>
234                         <strong class="product name product-item-name"> 227                         <strong class="product name product-item-name">
235                             <a class="product-item-link" 228                             <a class="product-item-link"
236                                href="<?php echo $_product->getProductUrl() ?>"> 229                                href="<?php echo $_product->getProductUrl() ?>">
237                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> 230                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
238                             </a> 231                             </a>
239                         </strong> 232                         </strong>
240                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?> 233                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?>
241                         <?php if($_category_config['rating_star']): ?> 234                         <?php if($_category_config['rating_star']): ?>
242                         <?php 235                         <?php
243                             $review_model->getEntitySummary($_product);    
244                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType); 236                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType);
245                         ?> 237                         ?>
246                         <?php if($review_html): ?> 238                         <?php if($review_html): ?>
247                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> 239                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
248                         <?php else: ?> 240                         <?php else: ?>
249                         <div class="product-reviews-summary short"> 241                         <div class="product-reviews-summary short">
250                             <div class="rating-summary"> 242                             <div class="rating-summary">
251                                 <span class="label"><span>Rating:</span></span> 243                                 <span class="label"><span>Rating:</span></span>
252                                 <div class="rating-result" title="0%"> 244                                 <div class="rating-result" title="0%">
253                                     <span style="width:0"><span>0%</span></span> 245                                     <span style="width:0"><span>0%</span></span>
254                                 </div> 246                                 </div>
255                             </div> 247                             </div>
256                         </div> 248                         </div>
257                         <?php endif; ?> 249                         <?php endif; ?>
258                         <?php endif; ?> 250                         <?php endif; ?>
259                          251 
260                         <?php if ($showDescription):?> 252                         <?php if ($showDescription):?>
261                             <div class="product description product-item-description"> 253                             <div class="product description product-item-description">
262                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> 254                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
263                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" 255                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>"
264                                    class="action more"><?php echo __('Learn More') ?></a> 256                                    class="action more"><?php echo __('Learn More') ?></a>
265                             </div> 257                             </div>
266                         <?php endif; ?> 258                         <?php endif; ?>
267                         <?php if($_category_config['product_price']): ?> 259                         <?php if($_category_config['product_price']): ?>
268                         <?php echo $block->getProductPrice($_product) ?> 260                         <?php echo $block->getProductPrice($_product) ?>
269                         <?php endif; ?> 261                         <?php endif; ?>
270                         <?php echo $block->getProductDetailsHtml($_product); ?> 262                         <?php echo $block->getProductDetailsHtml($_product); ?>
271                          263 
272                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9 && $product_type != 10 && $product_type != 11): ?> 264                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9 && $product_type != 11 && $product_type != 12): ?>
273                         <div class="product-item-inner"> 265                         <div class="product-item-inner">
274                             <div class="product actions product-item-actions"> 266                             <div class="product actions product-item-actions">
275                                 <?php if ($block->getMode() == 'grid'): ?> 267                                 <?php if ($block->getMode() == 'grid'): ?>
276                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?> 268                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?>
277                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 269                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
278                                     <a href="#" 270                                     <a href="#"
279                                        class="action towishlist actions-secondary <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?>has-qty<?php endif;?>" 271                                        class="action towishlist actions-secondary"
280                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 272                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
281                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 273                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
282                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 274                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
283                                        data-action="add-to-wishlist" 275                                        data-action="add-to-wishlist"
284                                        role="button"> 276                                        role="button">
285                                         <span><?php echo __('Add to Wish List') ?></span> 277                                         <span><?php echo __('Add to Wish List') ?></span>
286                                     </a> 278                                     </a>
287                                 <?php endif; ?> 279                                 <?php endif; ?>
288                                 <?php endif; ?> 280                                 <?php endif; ?>
289                                 <?php endif; ?> 281                                 <?php endif; ?>
290                                 <div class="actions-primary"> 282                                 <div class="actions-primary">
291                                     <?php if ($_product->isSaleable()): ?> 283                                     <?php if ($_product->isSaleable()): ?>
292                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 284                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
293                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 285                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
294                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 286                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
295                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 287                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
296                                             <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?> 288                                             <?php if($product_type == 10):?>
297                                                 <div class="qty-box"> 289                                                 <div class="qty-box">
298                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> 290                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a>
299                                                     <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())) ?>"/>
 291                                                     <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())) ?>"/>
300                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> 292                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a>
301                                                 </div> 293                                                 </div>
302                                             <?php endif;?> 294                                             <?php endif;?>
303                                             <?php echo $block->getBlockHtml('formkey')?> 295                                             <?php echo $block->getBlockHtml('formkey')?>
304                                             <button type="submit" 296                                             <button type="submit"
305                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 297                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
306                                                     class="action tocart primary"> 298                                                     class="action tocart primary">
307                                                 <span><?php echo __('Add to Cart') ?></span> 299                                                 <span><?php echo __('Add to Cart') ?></span>
308                                             </button> 300                                             </button>
309                                         </form> 301                                         </form>
310                                     <?php else: ?> 302                                     <?php else: ?>
311                                         <?php if ($_product->getIsSalable()): ?> 303                                         <?php if ($_product->getIsSalable()): ?>
312                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 304                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
313                                         <?php else: ?> 305                                         <?php else: ?>
314                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 306                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
315                                         <?php endif; ?> 307                                         <?php endif; ?>
316                                     <?php endif; ?> 308                                     <?php endif; ?>
317                                 </div> 309                                 </div>
318                                 <?php if ($block->getMode() == 'grid'): ?> 310                                 <?php if ($block->getMode() == 'grid'): ?>
319                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?> 311                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?>
320                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 312                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
321                                     <a href="#" 313                                     <a href="#"
322                                        class="action towishlist actions-secondary <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?>has-qty<?php endif;?>" 314                                        class="action towishlist actions-secondary"
323                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 315                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
324                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 316                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
325                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 317                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
326                                        data-action="add-to-wishlist" 318                                        data-action="add-to-wishlist"
327                                        role="button"> 319                                        role="button">
328                                         <span><?php echo __('Add to Wish List') ?></span> 320                                         <span><?php echo __('Add to Wish List') ?></span>
329                                     </a> 321                                     </a>
330                                 <?php endif; ?> 322                                 <?php endif; ?>
331                                 <?php endif; ?> 323                                 <?php endif; ?>
332                                 <?php endif; ?> 324                                 <?php endif; ?>
333                                 <?php if($_category_config['addtocompare']): ?> 325                                 <?php if($_category_config['addtocompare']): ?>
334                                 <?php 326                                 <?php
335                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 327                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
336                                 ?> 328                                 ?>
337                                 <a href="#" 329                                 <a href="#"
338                                    class="action tocompare actions-secondary <?php if(isset($_category_config['qty_field']) && $_category_config['qty_field']):?>has-qty<?php endif;?>" 330                                    class="action tocompare actions-secondary"
339                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 331                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
340                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 332                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
341                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 333                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
342                                    role="button"> 334                                    role="button">
343                                     <span><?php echo __('Add to Compare') ?></span> 335                                     <span><?php echo __('Add to Compare') ?></span>
344                                 </a> 336                                 </a>
345                                 <?php endif; ?> 337                                 <?php endif; ?>
346                             </div> 338                             </div>
347                         </div> 339                         </div>
348                         <?php endif; ?> 340                         <?php endif; ?>
349                     </div> 341                     </div>
350                 </div> 342                 </div>
351                 <?php echo($iterator == count($_productCollection)+1) ? '</div>' : '' ?> 343                 <?php echo($iterator == count($_productCollection)+1) ? '</div>' : '' ?>
352             <?php endforeach; ?> 344             <?php endforeach; ?>
353         </div> 345         </div>
354     </div> 346     </div>
355     <?php if (!$_dailydealhelper->isLoadedTimer()): ?> 347     <?php if (!$_dailydealhelper->isLoadedTimer()): ?>
356     <script type="text/javascript"> 348     <script type="text/javascript">
357     require([ 349     require([
358         'jquery'         350         'jquery'
359     ], function ($) { 351     ], function ($) {
360     // Timer for LEFT time for Dailydeal product 352     // Timer for LEFT time for Dailydeal product
361         var _second = 1000; 353         var _second = 1000;
362         var _minute = _second * 60; 354         var _minute = _second * 60;
363         var _hour = _minute * 60; 355         var _hour = _minute * 60;
364         var _day = _hour * 24; 356         var _day = _hour * 24;
365         var timer; 357         var timer;
366  358 
367         //Set date as magentodatetime  359         //Set date as magentodatetime
368         var date = new Date('<?php echo $_dailydealhelper->getcurrentDate() ?>'); 360         var date = new Date('<?php echo $_dailydealhelper->getcurrentDate() ?>');
369         var l_date = new Date(); 361         var l_date = new Date();
370         var offset_date = l_date - date; 362         var offset_date = l_date - date;
371  363 
372         function showRemaining()  364         function showRemaining()
373         { 365         {
374             $(".sw-dailydeal-wrapper").each(function(){ 366             $(".sw-dailydeal-wrapper").each(function(){
375                 var unique_id = $(this).attr("data-unique-id"); 367                 var unique_id = $(this).attr("data-unique-id");
376                 // get Value of dailydeal product 368                 // get Value of dailydeal product
377                 var cid='countdown_'+unique_id; 369                 var cid='countdown_'+unique_id;
378                 var daysid='countdown_days_'+unique_id; 370                 var daysid='countdown_days_'+unique_id;
379                 var hoursid='countdown_hours_'+unique_id; 371                 var hoursid='countdown_hours_'+unique_id;
380                 var minutesid='countdown_minutes_'+unique_id; 372                 var minutesid='countdown_minutes_'+unique_id;
381                 var secondsid='countdown_seconds_'+unique_id; 373                 var secondsid='countdown_seconds_'+unique_id;
382  374 
383                 var startdateid='fromdate_'+unique_id; 375                 var startdateid='fromdate_'+unique_id;
384                 var id='todate_'+unique_id; 376                 var id='todate_'+unique_id;
385  377 
386                 var enddate = new Date($('#'+id).val()); 378                 var enddate = new Date($('#'+id).val());
387                 var dealstartdate=new Date($('#'+startdateid).val()); 379                 var dealstartdate=new Date($('#'+startdateid).val());
388  380 
389                 var currentdate=new Date(); 381                 var currentdate=new Date();
390  382 
391                 //Get Difference between Two dates 383                 //Get Difference between Two dates
392                 var distance = enddate - (currentdate - offset_date); 384                 var distance = enddate - (currentdate - offset_date);
393  385 
394                 $('.sw-dailydeal-wrapper').show(); 386                 $('.sw-dailydeal-wrapper').show();
395  387 
396                 if (distance < 0) { 388                 if (distance < 0) {
397                    // clearInterval(timer); 389                    // clearInterval(timer);
398                     $('#expired_'+unique_id).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>"); 390                     $('#expired_'+unique_id).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>");
399  391 
400                 } else if(dealstartdate > currentdate) { 392                 } else if(dealstartdate > currentdate) {
401                    $('.countdowncontainer_'+unique_id).hide(); 393                    $('.countdowncontainer_'+unique_id).hide();
402                    var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>"; 394                    var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>";
403                    $('#expired_'+unique_id).html(msg); 395                    $('#expired_'+unique_id).html(msg);
404                 } else { 396                 } else {
405                     var days = Math.floor(distance / _day); 397                     var days = Math.floor(distance / _day);
406                     var hours = Math.floor((distance % _day) / _hour); 398                     var hours = Math.floor((distance % _day) / _hour);
407                     var minutes = Math.floor((distance % _hour) / _minute); 399                     var minutes = Math.floor((distance % _hour) / _minute);
408                     var seconds = Math.floor((distance % _minute) / _second); 400                     var seconds = Math.floor((distance % _minute) / _second);
409  401 
410                     if(hours < 10) 402                     if(hours < 10)
411                         hours = "0" + hours; 403                         hours = "0" + hours;
412                     if(minutes < 10) 404                     if(minutes < 10)
413                         minutes = "0" + minutes; 405                         minutes = "0" + minutes;
414                     if(seconds < 10) 406                     if(seconds < 10)
415                         seconds = "0" + seconds; 407                         seconds = "0" + seconds;
416                     $('.countdowncontainer_'+unique_id).show(); 408                     $('.countdowncontainer_'+unique_id).show();
417                     $('#'+daysid).html(days); 409                     $('#'+daysid).html(days);
418                     $('#'+hoursid).html(hours); 410                     $('#'+hoursid).html(hours);
419                     $('#'+minutesid).html(minutes); 411                     $('#'+minutesid).html(minutes);
420                     $('#'+secondsid).html(seconds); 412                     $('#'+secondsid).html(seconds);
421                 } 413                 }
422             }); 414             });
423         } 415         }
424          416 
425         // Set Interval 417         // Set Interval
426         timer = setInterval(function()  418         timer = setInterval(function()
427         { 419         {
428             showRemaining(); 420             showRemaining();
429         }, 1000);  421         }, 1000);
430     });    422     });
431     </script> 423     </script>
432     <?php $_dailydealhelper->setLoadedTimer(); ?> 424     <?php $_dailydealhelper->setLoadedTimer(); ?>
433     <?php endif; ?> 425     <?php endif; ?>
434     <?php if (!$block->isRedirectToCartEnabled()) : ?> 426     <?php if (!$block->isRedirectToCartEnabled()) : ?>
435         <script type="text/x-magento-init"> 427         <script type="text/x-magento-init">
436         { 428         {
437             "[data-role=tocart-form], .form.map.checkout": { 429             "[data-role=tocart-form], .form.map.checkout": {
438                 "catalogAddToCart": {} 430                 "catalogAddToCart": {}
439             } 431             }
440         } 432         }
441         </script> 433         </script>
442     <?php endif; ?> 434     <?php endif; ?>
443 <?php endif; ?> 435 <?php endif; ?>