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