156. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2024-03-04 14:38:52 +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.

156.1 Files compared

#LocationFileLast Modified
1/Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme v4.0.7/app/design/frontend/Smartwave/porto/Smartwave_Filterproducts/templatesgrid.phtml2023-06-14 05:02:29 +0000
2/Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme v4.0.8/app/design/frontend/Smartwave/porto/Smartwave_Filterproducts/templatesgrid.phtml2023-12-03 09:21:47 +0000

156.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged2900
Changed12
Inserted00
Removed00

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

156.4 Active regular expressions

No regular expressions were active.

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