96. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2022-11-18 03:12:09 +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.

96.1 Files compared

#LocationFileLast Modified
1Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Filterproducts/templatesowl_list.phtml2022-04-30 08:31:38 +0000
2Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Filterproducts/templatesowl_list.phtml2022-11-02 08:52:11 +0000

96.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged4846
Changed213
Inserted00
Removed11

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

96.4 Active regular expressions

No regular expressions were active.

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