209. Araxis Merge File Comparison Report

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

209.1 Files compared

#LocationFileLast Modified
1/Applications/Ampps/www/Porto 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/productlist.phtml2020-03-13 04:34:50 +0000
2/Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/productlist.phtml2021-05-01 08:45:38 +0000

209.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged22970
Changed1940
Inserted11
Removed17

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

209.4 Active regular expressions

No regular expressions were active.

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