Produced by Araxis Merge on 2023-07-12 04:42:39 +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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Porto v4.0.5/Theme Files/Porto Theme/app/code/Smartwave/Dailydeals/view/frontend/templates | list.phtml | 2020-03-13 04:39:12 +0000 |
| 2 | Porto v4.0.6/Theme Files/Porto Theme/app/code/Smartwave/Dailydeals/view/frontend/templates | list.phtml | 2023-07-01 14:48:04 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 40 | 478 |
| Changed | 21 | 285 |
| Inserted | 6 | 71 |
| Removed | 12 | 19 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | 1 | <?php | |||
| 2 | /** | 2 | /** | |||
| 3 | * Copyright © 2016 Magento. All rights reserved. | 3 | * Copyright © 2016 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 | <h1>Daily Deal Collection</h1> | 18 | <h1>Daily Deal Collection</h1> | |||
| 19 | <?php | 19 | <?php | |||
| 20 | 20 | |||||
| 21 | $dailydealproductCollection = $block->getDailydealEnableProduct(); | 21 | $dailydealproductCollection = $block->getDailydealEnableProduct(); | |||
| 22 | ||||||
| 23 | $_helper = $this->helper('Magento\Catalog\Helper\Output'); | 22 | $_helper = $this->helper('Magento\Catalog\Helper\Output'); | |||
| 24 | // Daily deal Helper | |||||
| 25 | $dailydealhelper=$this->helper('Smartwave\Dailydeals\Helper\Data'); | |||||
| 26 | 23 | |||||
| 24 | $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); | |||||
| 25 | // Daily deal Helper | |||||
| 26 | $dailydealhelper=$this->helper('Smartwave\Dailydeals\Helper\Data'); | |||||
| 27 | $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); | |||||
| 28 | $_category_config = $_portohelper->getConfig('porto_settings/category'); | |||||
| 29 | $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); | |||||
| 30 | $_product_label_config = $_portohelper->getConfig('porto_settings/product_label'); | |||||
| 31 | $_lazyload = $_portohelper->getConfig('porto_settings/optimization/lazyload'); | |||||
| 32 | $iterator = 1; | |||||
| 27 | ?> | 33 | ?> | |||
| 28 | <?php if (!$dailydealproductCollection->count()): ?> | 34 | <?php if (!$dailydealproductCollection->count()): ?> | |||
| 29 | <div class="message info empty"><div><?php /* @escapeNotVerified */ echo __('We can\'t find products matching the selection.') ?></div></div> | 35 | <div class="message info empty"><div><?php /* @escapeNotVerified */ echo __('We can\'t find products matching the selection.') ?></div></div> | |||
| 30 | <?php else: ?> | 36 | <?php else: ?> | |||
| 31 | <?php //echo $block->getToolbarHtml() ?> | |||||
| 32 | <?php //echo $block->getAdditionalHtml() ?> | |||||
| 33 | <?php | 37 | <?php | |||
| 34 | if ($block->getMode() == 'grid') { | 38 | if ($block->getMode() == 'grid') { | |||
| 35 | $viewMode = 'grid'; | 39 | $viewMode = 'grid'; | |||
| 36 | $image = 'category_page_grid'; | 40 | $image = 'category_page_grid'; | |||
| 41 | $hover_image = 'category_page_grid-hover'; | |||||
| 37 | $showDescription = false; | 42 | $showDescription = false; | |||
| 38 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; | 43 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; | |||
| 44 | if($_category_grid_config['columns']> 3){ | |||||
| 45 | $columns = 'columns'.$_category_grid_config['columns']; | |||||
| 46 | }else{ | |||||
| 47 | $columns = 'columns4'; | |||||
| 48 | } | |||||
| 49 | ||||||
| 50 | $product_type = $_category_grid_config['product_type']; | |||||
| 51 | if($product_type == null) { | |||||
| 52 | $product_type = 1; | |||||
| 53 | } | |||||
| 39 | } else { | 54 | } else { | |||
| 40 | $viewMode = 'list'; | 55 | $viewMode = 'list'; | |||
| 41 | $image = 'category_page_list'; | 56 | $image = 'category_page_list'; | |||
| 57 | $hover_image = 'category_page_grid-hover'; | |||||
| 42 | $showDescription = true; | 58 | $showDescription = true; | |||
| 43 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW; | 59 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW; | |||
| 60 | $columns = ''; | |||||
| 61 | $product_type = 0; | |||||
| 44 | } | 62 | } | |||
| 45 | /** | 63 | /** | |||
| 46 | * Position for actions regarding image size changing in vde if needed | 64 | * Position for actions regarding image size changing in vde if needed | |||
| 47 | */ | 65 | */ | |||
| 48 | $pos = $block->getPositioned() | 66 | $pos = $block->getPositioned()?$block->getPositioned():''; | |||
| 67 | $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; | |||||
| 68 | $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; | |||||
| 69 | $aspect_ratio = $_category_config['aspect_ratio']; | |||||
| 70 | if($aspect_ratio) | |||||
| 71 | $image_height = $image_width; | |||||
| 49 | ?> | 72 | ?> | |||
| 50 | <div class="products wrapper <?php /* @escapeNotVerified */ echo $viewMode; ?> products-<?php /* @escapeNotVerified */ echo $viewMode; ?>"> | 73 | <div class="products wrapper <?php /* @escapeNotVerified */ 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; ?>"> | |||
| 51 | <?php $iterator = 1; ?> | 74 | ||||
| 52 | <ol class=" | 75 | <ol class="filterproducts products list items product-items" id="dailydealproduct"> | |||
| 53 | <!-- Loop for Fetch the product Sku from dailydeal collection --> | 76 | <!-- Loop for Fetch the product Sku from dailydeal collection --> | |||
| 54 | <?php foreach($dailydealproductCollection as $dealproduct) : ?> | 77 | <?php foreach($dailydealproductCollection as $dealproduct) : ?> | |||
| 55 | ||||||
| 56 | <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> | 78 | <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> | |||
| 57 | ||||||
| 58 | <?php if($block->recentlyDailydeal($dealproduct->getSwProductSku())) : ?> | 79 | <?php if($block->recentlyDailydeal($dealproduct->getSwProductSku())) : ?> | |||
| 59 | ||||||
| 60 | <?php foreach ($block->getDailyDealProduct($dealproduct->getSwProductSku()) as $_product): ?> | 80 | <?php foreach ($block->getDailyDealProduct($dealproduct->getSwProductSku()) as $_product): ?> | |||
| 61 | <?php /* @escapeNotVerified */ echo($iterator++ == 1) ? '<li class="item product product-item ">' : '</li><li class="item product product-item">' ?> | 81 | <?php /* @escapeNotVerified */ echo($iterator++ == 1) ? '<li class="item product product-item ">' : '</li><li class="item product product-item">' ?> | |||
| 62 | <div class="product-item-info | 82 | <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid"> | |||
| 83 | <div class="product photo product-item-photo"> | |||||
| 84 | <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> | |||||
| 63 | <?php | 85 | <?php | |||
| 64 | 86 | if($aspect_ratio) | ||||
| 65 | $productImage = $block->getImage($_product, $image); | 87 | $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | |||
| 66 | if ($pos != null) { | 88 | else | |||
| 67 | $position = ' style="left:' . $productImage->getWidth() . 'px;' | 89 | $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); | |||
| 68 | . 'top:' . $productImage->getHeight() . 'px;"'; | 90 | $productImageUrl = $productImage->getUrl(); | |||
| 69 | } | |||||
| 70 | ?> | 91 | ?> | |||
| 71 | <?php // Product Image ?> | 92 | <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();?>"/> | |||
| 72 | <a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl().'?dailydealproduct=true' ?>" class="product photo product-item-photo" tabindex="-1"> | 93 | <?php if($_category_config['alternative_image']): ?> | |||
| 73 | <?php echo $productImage->toHtml(); ?> | |||||
| 74 | </a> | |||||
| 75 | <div class="product details product-item-details"> | |||||
| 76 | <?php | 94 | <?php | |||
| 77 | $_productNameStripped = $block->stripTags($_product->getName(), null, true); | 95 | if($aspect_ratio) | |||
| 96 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | |||||
| 97 | else | |||||
| 98 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); | |||||
| 99 | $productHoverImageUrl = $productHoverImage->getUrl(); | |||||
| 78 | ?> | 100 | ?> | |||
| 79 | <strong class="product name product-item-name"> | 101 | <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> | |||
| 80 | <a class="product-item-link" | 102 | <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();?>"/> | |||
| 81 | href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl().'?dailydealproduct=true' ?>" > | 103 | <?php endif; ?> | |||
| 82 | <?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | 104 | <?php endif; ?> | |||
| 83 | </a> | 105 | </a> | |||
| 84 | </strong> | 106 | <?php | |||
| 85 | 107 | $product_label = ""; | ||||
| 86 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | 108 | if($_product_label_config['sale_label']) { | |||
| 87 | 109 | if ($percentage = $_portohelper->getPercentage($_product)) { | ||||
| 88 | <?php echo "<div id='dailydeal' style='margin-top:5px; margin-bottom:5px;'>".$block->getProductPrice($_product)."</div>"; ?> | 110 | if($_product_label_config['sale_label_percent']) { | |||
| 89 | <?php /* @escapeNotVerified */ ?> | 111 | $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>'; | |||
| 90 | <?php echo $block->getProductDetailsHtml($_product); ?> | 112 | } else { | |||
| 91 | | 113 | $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; | |||
| 92 | <?php if($_product->getPrice() == 0) : ?> | 114 | } | |||
| 93 | <?php if($_product->getTypeId() != "bundle" && $_product->getTypeId() != "grouped") : ?> | 115 | } | |||
| 94 | <?php $_children = $_product->getTypeInstance()->getUsedProducts($_product); | 116 | } | |||
| 95 | foreach ($_children as $child){ | 117 | if($_product_label_config['new_label']) { | |||
| 96 | | 118 | $now = date("Y-m-d"); | |||
| 97 | $price=$child->getPrice();} | 119 | $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10); | |||
| 120 | $newsTo= substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10); | |||||
| 121 | ||||||
| 122 | if ($newsTo != '' || $newsFrom != ''){ | |||||
| 123 | if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { | |||||
| 124 | $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; | |||||
| 125 | } | |||||
| 126 | } | |||||
| 127 | } | |||||
| 128 | if($product_label) | |||||
| 129 | echo '<div class="product-labels">'.$product_label.'</div>'; | |||||
| 98 | ?> | 130 | ?> | |||
| 99 | <?php endif; ?> | 131 | <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?> | |||
| 132 | <div class="product-item-inner"> | |||||
| 133 | <div class="product actions product-item-actions"> | |||||
| 134 | <div class="actions-primary"> | |||||
| 135 | <?php if ($_product->isSaleable()): ?> | |||||
| 136 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | |||||
| 137 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> | |||||
| 138 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | |||||
| 139 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | |||||
| 140 | <?php echo $block->getBlockHtml('formkey')?> | |||||
| 141 | <button type="submit" | |||||
| 142 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | |||||
| 143 | class="action tocart primary"> | |||||
| 144 | <span><?php echo __('Add to Cart') ?></span> | |||||
| 145 | </button> | |||||
| 146 | </form> | |||||
| 100 | <?php else: ?> | 147 | <?php else: ?> | |||
| 101 | <?php $price=$_product->getPrice(); ?> | 148 | <?php if ($_product->getIsSalable()): ?> | |||
| 102 | <?php endif;?> | 149 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | |||
| 103 | ||||||
| 104 | <?php if($_product->getTypeId() == "bundle" || $_product->getTypeId() == "grouped" ) : ?> | |||||
| 105 | <?php if($dealproduct->getSwDiscountType() ==1) :?> | |||||
| 106 | <div style="margin-top:20px; "><?php echo "<strong>Save: ".$dailydealhelper->getcurrencySymbol()."".number_format($dealproduct->getSwDiscountAmount(),2)."</strong>"; ?></div> | |||||
| 107 | ||||||
| 108 | <?php elseif($dealproduct->getSwDiscountType() ==2) : ?> | |||||
| 109 | <div style="margin-top:20px;"><strong>OFF:<?php echo number_format($dealproduct->getSwDiscountAmount(),2); ?>%</strong></div> | |||||
| 110 | <?php endif; ?> | |||||
| 111 | <?php else: ?> | 150 | <?php else: ?> | |||
| 112 | <!-- Show Save and Off value for non bundle Product --> | 151 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | |||
| 113 | <?php if($dealproduct->getSwDiscountType() ==1) :?> | 152 | <?php endif; ?> | |||
| 114 | 153 | <?php endif; ?> | ||||
| 115 | <?php $off=(($price-$dealproduct->getSwProductPrice())* 100)/ $price ; ?> | 154 | </div> | |||
| 116 | <div style="float:right; margin-top:-20px;"><strong>OFF:<?php echo number_format($off,2); ?>%</strong></div> | 155 | <?php if ($block->getMode() == 'grid'): ?> | |||
| 117 | <div style="float:left; margin-top:-20px;"><strong>Save:<?php echo "" .$dailydealhelper->getcurrencySymbol()."".number_format($dealproduct->getSwDiscountAmount(),2); ?></strong></div> | 156 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 118 | 157 | <?php if($_category_config['addtowishlist']): ?> | ||||
| 119 | <?php elseif($dealproduct->getSwDiscountType() ==2) : ?> | 158 | <a href="#" | |||
| 120 | 159 | class="action towishlist actions-secondary" | ||||
| 121 | 160 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | ||||
| 122 | <div style="float:right; margin-top:-20px;"><?php echo "<strong>OFF: ".number_format($dealproduct->getSwDiscountAmount(),2)."%</strong>"; ?></div> | 161 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 123 | <div style="float:left; margin-top:-20px; "><?php echo "<strong>Save: ".$dailydealhelper->getcurrencySymbol()."".number_format($price-$dealproduct->getSwProductPrice(),2)."</strong>"; ?></div> | 162 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||
| 124 | 163 | data-action="add-to-wishlist" | ||||
| 125 | 164 | role="button"> | ||||
| 165 | <span><?php echo __('Add to Wish List') ?></span> | |||||
| 166 | </a> | |||||
| 167 | <?php endif; ?> | |||||
| 126 | <?php endif; ?> | 168 | <?php endif; ?> | |||
| 127 | <?php endif; ?> | 169 | <?php endif; ?> | |||
| 128 | <input type="text" style="display: none" id="todate_<?php echo $iterator; ?>" value="<?php echo $dealproduct->getSwDateTo(); ?>" | 170 | <?php if($_category_config['addtocompare']): ?> | |||
| 129 | <input type="text" style="display: none" id="fromdate_<?php echo $iterator; ?>" value="<?php echo $dealproduct->getSwDateFrom(); ?>" | 171 | <?php | |||
| 130 | <input type="text" style="display: none" id="currentdate_<?php echo $iterator; ?>" value="<?php echo $dailydealhelper->getcurrentDate(); ?>" | 172 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | |||
| 131 | 173 | ?> | ||||
| 132 | <div class="sw-dailydeal"> | 174 | <a href="#" | |||
| 175 | class="action tocompare actions-secondary" | |||||
| 176 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||||
| 177 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||||
| 178 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | |||||
| 179 | role="button"> | |||||
| 180 | <span><?php echo __('Add to Compare') ?></span> | |||||
| 181 | </a> | |||||
| 182 | <?php endif; ?> | |||||
| 183 | </div> | |||||
| 184 | </div> | |||||
| 185 | <?php endif; ?> | |||||
| 186 | <input type="text" style="display: none" id="todate_<?php echo $iterator; ?>" value="<?php echo $dealproduct->getSwDateTo(); ?>" /> | |||||
| 187 | <input type="text" style="display: none" id="fromdate_<?php echo $iterator; ?>" value="<?php echo $dealproduct->getSwDateFrom(); ?>"/> | |||||
| 188 | <input type="text" style="display: none" id="currentdate_<?php echo $iterator; ?>" value="<?php echo $dailydealhelper->getcurrentDate(); ?>" /> | |||||
| 189 | <div class="sw-dailydeal-wrapper"> | |||||
| 190 | <div class="sw-dailydeal"> | |||||
| 133 | <div id="CDT"> | 191 | <div id="CDT"> | |||
| 134 | <p id="expired_<?php echo $iterator; ?>"></p> | 192 | <p id="expired_<?php echo $iterator; ?>"></p> | |||
| 135 | <div class="countdowncontainer_<?php echo $iterator; ?>" style="display:none;"> | 193 | <div class="countdowncontainer_<?php echo $iterator; ?>" style="display:none;"> | |||
| 136 | » » » » » » » <span class="dailydeal-label"> | 194 | » » » » » » » <span class="dailydeal-label"><?php echo __('Ends In:'); ?></span> | |||
| 137 | » » » » » » » » » <?php echo __('Ends In:'); ?> | |||||
| 138 | » » » » » » » » </span> | |||||
| 139 | » » » » » » » » <span class="number-wrapper"> | 195 | » » » » » » » » <span class="number-wrapper"> | |||
| 140 | » » » » » » » » » <div class="line"></div> | 196 | » » » » » » » » » <div class="line"></div> | |||
| 141 | » » » » » » » » » <span class="number day"><p id="countdown_days_<?php echo $iterator; ?>">00</p></span> | 197 | » » » » » » » » » <span class="number day"><p id="countdown_days_<?php echo $iterator; ?>">00</p></span> | |||
| 142 | » » » » » » » » » <div class="caption"><?php echo __('Day(s), '); ?></div> | 198 | » » » » » » » » » <div class="caption"><?php echo __('Day(s), '); ?></div> | |||
| 143 | » » » » » » » » </span> | 199 | » » » » » » » » </span> | |||
| 144 | ||||||
| 145 | » » » » » » » » <span class="number-wrapper"> | 200 | » » » » » » » » <span class="number-wrapper"> | |||
| 146 | » » » » » » » » » <div class="line"></div> | 201 | » » » » » » » » » <div class="line"></div> | |||
| 147 | » » » » » » » » » <span class="number hour"><p id="countdown_hours_<?php echo $iterator; ?>">00</p></span> | 202 | » » » » » » » » » <span class="number hour"><p id="countdown_hours_<?php echo $iterator; ?>">00</p></span> | |||
| 148 | » » » » » » » » » <div class="caption">:</div> | 203 | » » » » » » » » » <div class="caption">:</div> | |||
| 149 | » » » » » » » » </span> | 204 | » » » » » » » » </span> | |||
| 150 | ||||||
| 151 | » » » » » » » » <span class="number-wrapper"> | 205 | » » » » » » » » <span class="number-wrapper"> | |||
| 152 | » » » » » » » » » <div class="line"></div> | 206 | » » » » » » » » » <div class="line"></div> | |||
| 153 | » » » » » » » » » <span class="number min"><p id="countdown_minutes_<?php echo $iterator; ?>">00</p></span> | 207 | » » » » » » » » » <span class="number min"><p id="countdown_minutes_<?php echo $iterator; ?>">00</p></span> | |||
| 154 | » » » » » » » » » <div class="caption">:</div> | 208 | » » » » » » » » » <div class="caption">:</div> | |||
| 155 | » » » » » » » » </span> | 209 | » » » » » » » » </span> | |||
| 156 | ||||||
| 157 | » » » » » » » » <span class="number-wrapper"> | 210 | » » » » » » » » <span class="number-wrapper"> | |||
| 158 | » » » » » » » » » <div class="line"></div> | 211 | » » » » » » » » » <div class="line"></div> | |||
| 159 | » » » » » » » » » <span class="number sec"><p id="countdown_seconds_<?php echo $iterator; ?>">00</p></span> | 212 | » » » » » » » » » <span class="number sec"><p id="countdown_seconds_<?php echo $iterator; ?>">00</p></span> | |||
| 160 | » » » » » » » » » <div class="caption"></div> | 213 | » » » » » » » » » <div class="caption"></div> | |||
| 161 | » » » » » » » » </span> | 214 | » » » » » » » » </span> | |||
| 162 | </div> | 215 | </div> | |||
| 163 | </div> | 216 | </div> | |||
| 164 | </div> | 217 | </div> | |||
| 218 | </div> | |||||
| 219 | </div> | |||||
| 220 | <div class="product details product-item-details"> | |||||
| 221 | <?php | |||||
| 222 | $_productNameStripped = $block->stripTags($_product->getName(), null, true); | |||||
| 223 | ?> | |||||
| 224 | <strong class="product name product-item-name"> | |||||
| 225 | <a class="product-item-link" | |||||
| 226 | href="<?php echo $_product->getProductUrl() ?>"> | |||||
| 227 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | |||||
| 228 | </a> | |||||
| 229 | </strong> | |||||
| 230 | ||||||
| 231 | <?php if($_category_config['rating_star']): ?> | |||||
| 232 | <?php | |||||
| 233 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | |||||
| 234 | ?> | |||||
| 235 | <?php if($review_html): ?> | |||||
| 236 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | |||||
| 237 | <?php else: ?> | |||||
| 238 | <div class="product-reviews-summary short"> | |||||
| 239 | <div class="rating-summary"> | |||||
| 240 | <span class="label"><span>Rating:</span></span> | |||||
| 241 | <div class="rating-result" title="0%"> | |||||
| 242 | <span style="width:0"><span>0%</span></span> | |||||
| 243 | </div> | |||||
| 244 | </div> | |||||
| 245 | </div> | |||||
| 246 | <?php endif; ?> | |||||
| 247 | <?php endif; ?> | |||||
| 248 | ||||||
| 249 | <?php echo "<div id='dailydeal' style='margin-top:5px; margin-bottom:5px;'>".$block->getProductPrice($_product)."</div>"; ?> | |||||
| 250 | <?php /* @escapeNotVerified */ ?> | |||||
| 251 | <?php echo $block->getProductDetailsHtml($_product); ?> | |||||
| 252 | ||||||
| 253 | <?php if($_product->getPrice() == 0) : ?> | |||||
| 254 | <?php if($_product->getTypeId() != "bundle" && $_product->getTypeId() != "grouped") : ?> | |||||
| 255 | <?php | |||||
| 256 | $_children = $_product->getTypeInstance()->getUsedProducts($_product); | |||||
| 257 | foreach ($_children as $child){ | |||||
| 258 | $price=$child->getPrice(); | |||||
| 259 | } | |||||
| 260 | ?> | |||||
| 261 | <?php endif; ?> | |||||
| 262 | <?php else: ?> | |||||
| 263 | <?php $price=$_product->getPrice(); ?> | |||||
| 264 | <?php endif;?> | |||||
| 265 | <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?> | |||||
| 165 | <div class="product-item-inner"> | 266 | <div class="product-item-inner"> | |||
| 166 | <div class="product actions product-item-actions"<?php echo strpos($pos, $viewMode . '-actions') ? $position : ''; ?>> | 267 | <div class="product actions product-item-actions" | |||
| 167 | <div class="actions-primary"<?php echo strpos($pos, $viewMode . '-primary') ? $position : ''; ?>> | 268 | <?php if ($block->getMode() == 'grid'): ?> | |||
| 269 | <?php if($_category_config['addtowishlist'] && $product_type != 4): ?> | |||||
| 270 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||||
| 271 | <a href="#" | |||||
| 272 | class="action towishlist actions-secondary" | |||||
| 273 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||||
| 274 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||||
| 275 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||||
| 276 | data-action="add-to-wishlist" | |||||
| 277 | role="button"> | |||||
| 278 | <span><?php echo __('Add to Wish List') ?></span> | |||||
| 279 | </a> | |||||
| 280 | <?php endif; ?> | |||||
| 281 | <?php endif; ?> | |||||
| 282 | <?php endif; ?> | |||||
| 283 | <div class="actions-primary"> | |||||
| 168 | <?php if ($_product->isSaleable()): ?> | 284 | <?php if ($_product->isSaleable()): ?> | |||
| 169 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | 285 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | |||
| 170 | <form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post"> | 286 | <form data-role="tocart-form" action="<?php | |||
| 171 | <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>"> | 287 | <input type="hidden" name="product" value="<?php | |||
| 172 | <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | 288 | <input type="hidden" name="<?php | |||
| 289 | <?php if($product_type == 10):?> | |||||
| 290 | <div class="qty-box"> | |||||
| 291 | <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> | |||||
| 292 | <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())) ?>"/> | |||||
| 293 | <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> | |||||
| 294 | </div> | |||||
| 295 | <?php endif;?> | |||||
| 173 | <?php echo $block->getBlockHtml('formkey')?> | 296 | <?php echo $block->getBlockHtml('formkey')?> | |||
| 174 | <button type="submit" | 297 | <button type="submit" | |||
| 175 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | 298 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | |||
| 176 | class="action tocart primary"> | 299 | class="action tocart primary"> | |||
| 177 | <span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span> | 300 | <span><?php | |||
| 178 | </button> | 301 | </button> | |||
| 179 | </form> | 302 | </form> | |||
| 180 | <?php else: ?> | 303 | <?php else: ?> | |||
| 181 | <?php if ($_product->getIsSalable()): ?> | 304 | <?php if ($_product->getIsSalable()): ?> | |||
| 182 | <div class="stock available"><span><?php /* @escapeNotVerified */ echo __('In stock') ?></span></div> | 305 | <div class="stock available"><span><?php | |||
| 183 | <?php else: ?> | 306 | <?php else: ?> | |||
| 184 | <div class="stock unavailable"><span><?php /* @escapeNotVerified */ echo __('Out of stock') ?></span></div> | 307 | <div class="stock unavailable"><span><?php | |||
| 185 | <?php endif; ?> | 308 | <?php endif; ?> | |||
| 186 | <?php endif; ?> | 309 | <?php endif; ?> | |||
| 187 | </div> | 310 | </div> | |||
| 188 | <div data-role="add-to-links" class="actions-secondary"<?php echo strpos($pos, $viewMode . '-secondary') ? $position : ''; ?>> | 311 | <?php if ($block->getMode() == 'grid'): ?> | |||
| 189 | <?php if ($addToBlock = $block->getChildBlock( | 312 | <?php if($_category_config['addtowishlist'] && $product_type == 4): ?> | |||
| 190 | <?php echo $addToBlock->setProduct($_product)->getChildHtml(); ?> | 313 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 314 | <a href="#" | |||||
| 315 | class="action towishlist actions-secondary" | |||||
| 316 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||||
| 317 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||||
| 318 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||||
| 319 | data-action="add-to-wishlist" | |||||
| 320 | role="button"> | |||||
| 321 | <span><?php echo __('Add to Wish List') ?></span> | |||||
| 322 | </a> | |||||
| 323 | <?php endif; ?> | |||||
| 324 | <?php endif; ?> | |||||
| 325 | <?php endif; ?> | |||||
| 326 | <?php if ($ | |||||
| 327 | <?php if($_category_config['addtowishlist']): ?> | |||||
| 328 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||||
| 329 | <a href="#" | |||||
| 330 | class="action towishlist actions-secondary" | |||||
| 331 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||||
| 332 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||||
| 333 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||||
| 334 | data-action="add-to-wishlist" | |||||
| 335 | role="button"> | |||||
| 336 | <span><?php echo __('Add to Wish List') ?></span> | |||||
| 337 | </a> | |||||
| 338 | <?php endif; ?> | |||||
| 339 | <?php endif; ?> | |||||
| 340 | <?php endif; ?> | |||||
| 341 | <?php if($_category_config['addtocompare']): ?> | |||||
| 342 | <?php | |||||
| 343 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | |||||
| 344 | ?> | |||||
| 345 | <a href="#" | |||||
| 346 | class="action tocompare actions-secondary" | |||||
| 347 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||||
| 348 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||||
| 349 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | |||||
| 350 | role="button"> | |||||
| 351 | <span><?php echo __('Add to Compare') ?></span> | |||||
| 352 | </a> | |||||
| 191 | <?php endif; ?> | 353 | <?php endif; ?> | |||
| 192 | </div> | 354 | </div> | |||
| 193 | </div> | 355 | </div> | |||
| 194 | <?php if ($showDescription):?> | |||||
| 195 | <div class="product description product-item-description"> | |||||
| 196 | <?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> | |||||
| 197 | <a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" title="<?php /* @escapeNotVerified */ echo $_productNameStripped ?>" | |||||
| 198 | class="action more"><?php /* @escapeNotVerified */ echo __('Learn More') ?></a> | |||||
| 199 | </div> | |||||
| 200 | <?php endif; ?> | 356 | <?php endif; ?> | |||
| 201 | </div> | 357 | </div> | |||
| 202 | </div> | 358 | </div> | |||
| 203 | </div> | |||||
| 204 | <?php echo($iterator == count($dailydealproductCollection)+1) ? '</li>' : '' ?> | 359 | <?php echo($iterator == count($dailydealproductCollection)+1) ? '</li>' : '' ?> | |||
| 205 | <?php endforeach; ?> | 360 | <?php endforeach; ?> | |||
| 206 | <?php endif; ?> | 361 | <?php endif; ?> | |||
| 207 | <?php endforeach; ?> | 362 | <?php endforeach; ?> | |||
| 208 | </ol> | 363 | </ol> | |||
| 209 | </div> | 364 | </div> | |||
| 210 | <?php echo $block->getToolbarHtml() ?> | |||||
| 211 | <?php if (!$block->isRedirectToCartEnabled()) : ?> | 365 | <?php if (!$block->isRedirectToCartEnabled()) : ?> | |||
| 212 | <script type="text/x-magento-init"> | 366 | <script type="text/x-magento-init"> | |||
| 213 | { | 367 | { | |||
| 214 | "[data-role=tocart-form], .form.map.checkout": { | 368 | "[data-role=tocart-form], .form.map.checkout": { | |||
| 215 | "catalogAddToCart": {} | 369 | "catalogAddToCart": {} | |||
| 216 | } | 370 | } | |||
| 217 | } | 371 | } | |||
| 218 | </script> | 372 | </script> | |||
| 219 | <?php endif; ?> | 373 | <?php endif; ?> | |||
| 220 | <?php endif; ?> | 374 | <?php endif; ?> | |||
| 221 | 375 | <script type="text/javascript"> | ||||
| 376 | require([ | |||||
| 377 | 'jquery' | |||||
| 378 | ], function ($) { | |||||
| 379 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(2n)').addClass('nth-child-2n'); | |||||
| 380 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); | |||||
| 381 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(3n)').addClass('nth-child-3n'); | |||||
| 382 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); | |||||
| 383 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(4n)').addClass('nth-child-4n'); | |||||
| 384 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); | |||||
| 385 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(5n)').addClass('nth-child-5n'); | |||||
| 386 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); | |||||
| 387 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(6n)').addClass('nth-child-6n'); | |||||
| 388 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); | |||||
| 389 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(7n)').addClass('nth-child-7n'); | |||||
| 390 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); | |||||
| 391 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(8n)').addClass('nth-child-8n'); | |||||
| 392 | $('.products.grid .product-items.filterproducts li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); | |||||
| 393 | }); | |||||
| 394 | </script> | |||||
| 222 | <script type="text/javascript"> | 395 | <script type="text/javascript"> | |||
| 223 | require([ | 396 | require([ | |||
| 224 | 'jquery' | 397 | 'jquery' | |||
| 225 | ], function ($) { | 398 | ], function ($) { | |||
| 226 | var app = { | 399 | var app = { | |||
| 227 | isAppleDevice: function() { | 400 | isAppleDevice: function() { | |||
| 228 | if (navigator.userAgent.match(/(iPhone|iPod|iPad|Safari)/) != null) { | 401 | if (navigator.userAgent.match(/(iPhone|iPod|iPad|Safari)/) != null) { | |||
| 229 | return true; | 402 | return true; | |||
| 230 | } | 403 | } | |||
| 231 | return false; | 404 | return false; | |||
| 232 | } | 405 | } | |||
| 233 | } | 406 | } | |||
| 234 | // Timer for LEFT time for Dailydeal product | 407 | // Timer for LEFT time for Dailydeal product | |||
| 235 | var _second = 1000; | 408 | var _second = 1000; | |||
| 236 | var _minute = _second * 60; | 409 | var _minute = _second * 60; | |||
| 237 | var _hour = _minute * 60; | 410 | var _hour = _minute * 60; | |||
| 238 | var _day = _hour * 24; | 411 | var _day = _hour * 24; | |||
| 239 | var timer; | 412 | var timer; | |||
| 240 | 413 | |||||
| 241 | function showRemaining(currentdate) | 414 | function showRemaining(currentdate) | |||
| 242 | { | 415 | { | |||
| 243 | var count; | 416 | var count; | |||
| 244 | for (count = 2; count <= <?php echo $iterator; ?>; count++) | 417 | for (count = 2; count <= <?php echo $iterator; ?>; count++) | |||
| 245 | { | 418 | { | |||
| 246 | // get Value of dailydeal product | 419 | // get Value of dailydeal product | |||
| 247 | var cid='countdown_'+count; | 420 | var cid='countdown_'+count; | |||
| 248 | var daysid='countdown_days_'+count; | 421 | var daysid='countdown_days_'+count; | |||
| 249 | var hoursid='countdown_hours_'+count; | 422 | var hoursid='countdown_hours_'+count; | |||
| 250 | var minutesid='countdown_minutes_'+count; | 423 | var minutesid='countdown_minutes_'+count; | |||
| 251 | var secondsid='countdown_seconds_'+count; | 424 | var secondsid='countdown_seconds_'+count; | |||
| 252 | 425 | |||||
| 253 | var startdateid='fromdate_'+count; | 426 | var startdateid='fromdate_'+count; | |||
| 254 | var id='todate_'+count; | 427 | var id='todate_'+count; | |||
| 255 | 428 | |||||
| 256 | var enddate = new Date($('#'+id).val()); | 429 | var enddate = new Date($('#'+id).val()); | |||
| 257 | var dealstartdate=new Date($('#'+startdateid).val()); | 430 | var dealstartdate=new Date($('#'+startdateid).val()); | |||
| 258 | if (app.isAppleDevice() && $('#'+id).val() && $('#'+startdateid).val()) { | 431 | if (app.isAppleDevice() && $('#'+id).val() && $('#'+startdateid).val()) { | |||
| 259 | var ledate = $('#'+id).val(); | 432 | var ledate = $('#'+id).val(); | |||
| 260 | var ledateParts = ledate.substring(0,10).split('-'); | 433 | var ledateParts = ledate.substring(0,10).split('-'); | |||
| 261 | var letimePart = ledate.substr(11); | 434 | var letimePart = ledate.substr(11); | |||
| 262 | enddate = ledateParts[1] + '/' + ledateParts[2] + '/' + ledateParts[0] + ' ' + letimePart; | 435 | enddate = ledateParts[1] + '/' + ledateParts[2] + '/' + ledateParts[0] + ' ' + letimePart; | |||
| 263 | enddate = new Date(enddate).getTime(); | 436 | enddate = new Date(enddate).getTime(); | |||
| 264 | 437 | |||||
| 265 | var lsdate = $('#'+startdateid).val(); | 438 | var lsdate = $('#'+startdateid).val(); | |||
| 266 | var lsdateParts = lsdate.substring(0,10).split('-'); | 439 | var lsdateParts = lsdate.substring(0,10).split('-'); | |||
| 267 | var lstimePart = lsdate.substr(11); | 440 | var lstimePart = lsdate.substr(11); | |||
| 268 | dealstartdate = lsdateParts[1] + '/' + lsdateParts[2] + '/' + lsdateParts[0] + ' ' + lstimePart; | 441 | dealstartdate = lsdateParts[1] + '/' + lsdateParts[2] + '/' + lsdateParts[0] + ' ' + lstimePart; | |||
| 269 | dealstartdate = new Date(dealstartdate).getTime(); | 442 | dealstartdate = new Date(dealstartdate).getTime(); | |||
| 270 | } | 443 | } | |||
| 271 | // Get Current Date from magentodatetime | 444 | // Get Current Date from magentodatetime | |||
| 272 | var currentdate=new Date(currentdate).getTime(); | 445 | var currentdate=new Date(currentdate).getTime(); | |||
| 273 | 446 | |||||
| 274 | //Get Difference between Two dates | 447 | //Get Difference between Two dates | |||
| 275 | var distance = enddate - currentdate; | 448 | var distance = enddate - currentdate; | |||
| 276 | $('.sw-dailydeal-wrapper').show(); | 449 | $('.sw-dailydeal-wrapper').show(); | |||
| 277 | 450 | |||||
| 278 | if (distance < 0) { | 451 | if (distance < 0) { | |||
| 279 | // clearInterval(timer); | 452 | // clearInterval(timer); | |||
| 280 | $('#expired_'+count).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>"); | 453 | $('#expired_'+count).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>"); | |||
| 281 | 454 | |||||
| 282 | } else if(dealstartdate > currentdate) { | 455 | } else if(dealstartdate > currentdate) { | |||
| 283 | $('.countdowncontainer_'+count).hide(); | 456 | $('.countdowncontainer_'+count).hide(); | |||
| 284 | var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>"; | 457 | var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>"; | |||
| 285 | $('#expired_'+count).html(msg); | 458 | $('#expired_'+count).html(msg); | |||
| 286 | } else { | 459 | } else { | |||
| 287 | var days = Math.floor(distance / _day); | 460 | var days = Math.floor(distance / _day); | |||
| 288 | var hours = Math.floor((distance % _day) / _hour); | 461 | var hours = Math.floor((distance % _day) / _hour); | |||
| 289 | var minutes = Math.floor((distance % _hour) / _minute); | 462 | var minutes = Math.floor((distance % _hour) / _minute); | |||
| 290 | var seconds = Math.floor((distance % _minute) / _second); | 463 | var seconds = Math.floor((distance % _minute) / _second); | |||
| 291 | 464 | |||||
| 292 | if(hours < 10) | 465 | if(hours < 10) | |||
| 293 | hours = "0" + hours; | 466 | hours = "0" + hours; | |||
| 294 | if(minutes < 10) | 467 | if(minutes < 10) | |||
| 295 | minutes = "0" + minutes; | 468 | minutes = "0" + minutes; | |||
| 296 | if(seconds < 10) | 469 | if(seconds < 10) | |||
| 297 | seconds = "0" + seconds; | 470 | seconds = "0" + seconds; | |||
| 298 | $('.countdowncontainer_'+count).show(); | 471 | $('.countdowncontainer_'+count).show(); | |||
| 299 | $('#'+daysid).html(days); | 472 | $('#'+daysid).html(days); | |||
| 300 | $('#'+hoursid).html(hours); | 473 | $('#'+hoursid).html(hours); | |||
| 301 | $('#'+minutesid).html(minutes); | 474 | $('#'+minutesid).html(minutes); | |||
| 302 | $('#'+secondsid).html(seconds); | 475 | $('#'+secondsid).html(seconds); | |||
| 303 | } | 476 | } | |||
| 304 | } | 477 | } | |||
| 305 | } | 478 | } | |||
| 306 | 479 | |||||
| 307 | //Set date as magentodatetime | 480 | //Set date as magentodatetime | |||
| 308 | var date = new Date('<?php echo $dailydealhelper->getcurrentDate() ?>'); | 481 | var date = new Date('<?php echo $dailydealhelper->getcurrentDate() ?>'); | |||
| 309 | if (app.isAppleDevice()) { | 482 | if (app.isAppleDevice()) { | |||
| 310 | var mdate = '<?php echo $dailydealhelper->getcurrentDate() ?>'; | 483 | var mdate = '<?php echo $dailydealhelper->getcurrentDate() ?>'; | |||
| 311 | var dateParts = mdate.substring(0,10).split('-'); | 484 | var dateParts = mdate.substring(0,10).split('-'); | |||
| 312 | var timePart = mdate.substr(11); | 485 | var timePart = mdate.substr(11); | |||
| 313 | date = dateParts[1] + '/' + dateParts[2] + '/' + dateParts[0] + ' ' + timePart; | 486 | date = dateParts[1] + '/' + dateParts[2] + '/' + dateParts[0] + ' ' + timePart; | |||
| 314 | date = new Date(date); | 487 | date = new Date(date); | |||
| 315 | } | 488 | } | |||
| 316 | var day = date.getDate(); | 489 | var day = date.getDate(); | |||
| 317 | var month = date.getMonth(); | 490 | var month = date.getMonth(); | |||
| 318 | var year = date.getFullYear(); | 491 | var year = date.getFullYear(); | |||
| 319 | var hours = date.getHours(); | 492 | var hours = date.getHours(); | |||
| 320 | var minutes = "0" + date.getMinutes(); | 493 | var minutes = "0" + date.getMinutes(); | |||
| 321 | var seconds = "0" + date.getSeconds(); | 494 | var seconds = "0" + date.getSeconds(); | |||
| 322 | 495 | |||||
| 323 | var fulldate = year+'/'+(month+1)+'/'+day+' '+hours + ':' + minutes.substr(minutes.length-2) + ':' + seconds.substr(seconds.length-2); | 496 | var fulldate = year+'/'+(month+1)+'/'+day+' '+hours + ':' + minutes.substr(minutes.length-2) + ':' + seconds.substr(seconds.length-2); | |||
| 324 | 497 | |||||
| 325 | // Set Interval | 498 | // Set Interval | |||
| 326 | timer = setInterval(function() | 499 | timer = setInterval(function() | |||
| 327 | { | 500 | { | |||
| 328 | date.setSeconds(date.getSeconds() + 1); | 501 | date.setSeconds(date.getSeconds() + 1); | |||
| 329 | var month=date.getMonth(); | 502 | var month=date.getMonth(); | |||
| 330 | var currentdatetime=date.getFullYear()+"/"+(month+1)+"/"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds(); | 503 | var currentdatetime=date.getFullYear()+"/"+(month+1)+"/"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds(); | |||
| 331 | showRemaining(currentdatetime); | 504 | showRemaining(currentdatetime); | |||
| 332 | }, 1000); | 505 | }, 1000); | |||
| 333 | }); | 506 | }); | |||
| 334 | </script> | 507 | </script> | |||
| 335 | <style type="text/css"> | 508 | <style type="text/css"> | |||
| 336 | .page-layout-1column .toolbar-products { | 509 | .page-layout-1column .toolbar-products { | |||
| 337 | position: relative; | 510 | position: relative; | |||
| 338 | display:none; | 511 | display:none; | |||
| 339 | } | 512 | } | |||
| 340 | </style> | 513 | </style> |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.