198. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-03-13 03:01:05 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

198.1 Files compared

#LocationFileLast Modified
1Porto v4.0.4/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/productlist.phtml2022-10-24 08:06:22 +0000
2Porto v4.0.5/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/productlist.phtml2023-02-06 13:32:49 +0000

198.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged7986
Changed26
Inserted44
Removed00

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

198.4 Active regular expressions

No regular expressions were active.

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