Produced by Araxis Merge on 2021-05-13 09:09:06 +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 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/ajaxproducts | ajaxproducts.phtml | 2018-06-17 01:25:00 +0000 |
| 2 | /Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/ajaxproducts | ajaxproducts.phtml | 2021-03-27 08:04:46 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 8 | 202 |
| Changed | 6 | 16 |
| Inserted | 1 | 3 |
| 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 © 2018 Porto. All rights reserved. | 3 | * Copyright © 2018 Porto. All rights reserved. | |||
| 4 | */ | 4 | */ | |||
| 5 | 5 | |||||
| 6 | ?> | 6 | ?> | |||
| 7 | <?php | 7 | <?php | |||
| 8 | /** | 8 | /** | |||
| 9 | * Top menu for store | 9 | * Top menu for store | |||
| 10 | * | 10 | * | |||
| 11 | * @see \Smartwave\Megamenu\Block\Topmenu | 11 | * @see \Smartwave\Megamenu\Block\Topmenu | |||
| 12 | */ | 12 | */ | |||
| 13 | ?> | 13 | ?> | |||
| 14 | <?php | 14 | <?php | |||
| 15 | $_helper = $this->helper('Smartwave\Megamenu\Helper\Data'); | 15 | $_helper = $this->helper('Smartwave\Megamenu\Helper\Data'); | |||
| 16 | $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); | 16 | $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); | |||
| 17 | 17 | |||||
| 18 | $categories = $_helper->getFirstLevelCategories(); | 18 | $categories = $_helper->getFirstLevelCategories(); | |||
| 19 | $_category_config = $_portohelper->getConfig('porto_settings/category'); | 19 | $_category_config = $_portohelper->getConfig('porto_settings/category'); | |||
| 20 | $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); | 20 | $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); | |||
| 21 | 21 | |||||
| 22 | $aspect_ratio = $this->getData("aspect_ratio"); | 22 | $aspect_ratio = $this->getData("aspect_ratio"); | |||
| 23 | if($aspect_ratio == null) { | 23 | if($aspect_ratio == null) { | |||
| 24 | $aspect_ratio = $_category_config['aspect_ratio']; | 24 | $aspect_ratio = $_category_config['aspect_ratio']; | |||
| 25 | } | 25 | } | |||
| 26 | $ratio_width = $this->getData("image_width"); | 26 | $ratio_width = $this->getData("image_width"); | |||
| 27 | if(!$ratio_width) { | 27 | if(!$ratio_width) { | |||
| 28 | $ratio_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; | 28 | $ratio_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; | |||
| 29 | } | 29 | } | |||
| 30 | $ratio_height = $this->getData("image_height"); | 30 | $ratio_height = $this->getData("image_height"); | |||
| 31 | if(!$ratio_height) { | 31 | if(!$ratio_height) { | |||
| 32 | $ratio_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; | 32 | $ratio_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; | |||
| 33 | } | 33 | } | |||
| 34 | $lazy_owl = $this->getData("lazy_owl"); | 34 | $lazy_owl = $this->getData("lazy_owl"); | |||
| 35 | if(!$lazy_owl) | 35 | if(!$lazy_owl) | |||
| 36 | $lazy_owl = 0; | 36 | $lazy_owl = 0; | |||
| 37 | $product_count = $this->getData("product_count"); | 37 | $product_count = $this->getData("product_count"); | |||
| 38 | if(!$product_count) | 38 | if(!$product_count) | |||
| 39 | $product_count = 8; | 39 | $product_count = 8; | |||
| 40 | $columns = $this->getData("columns"); | 40 | $columns = $this->getData("columns"); | |||
| 41 | if(!$columns) | 41 | if(!$columns) | |||
| 42 | $columns = 4; | 42 | $columns = 4; | |||
| 43 | ?> | 43 | ?> | |||
| 44 | <div class="ajax-products"> | 44 | <div class="ajax-products"> | |||
| 45 | <div class="category-list col-md-2"> | 45 | <div class="category-list col-md-2"> | |||
| 46 | <span><?php echo __('Shop by'); ?>:</span> | 46 | <span><?php echo __('Shop by'); ?>:</span> | |||
| 47 | <ul> | 47 | <ul> | |||
| 48 | <?php | 48 | <?php | |||
| 49 | foreach($categories as $category) { | 49 | foreach($categories as $category) { | |||
| 50 | $cat_id = $category->getId(); | 50 | $cat_id = $category->getId(); | |||
| 51 | if($category->getIsActive()) { | 51 | if($category->getIsActive()) { | |||
| 52 | echo '<li><a class="" cat_id="'.$cat_id.'" href="javascript:void(0)"><span>'.$category->getName().'</span></a></li>'; | 52 | echo '<li><a class="" cat_id="'.$cat_id.'" href="javascript:void(0)"><span>'.$category->getName().'</span></a></li>'; | |||
| 53 | } | 53 | } | |||
| 54 | } | 54 | } | |||
| 55 | ?> | 55 | ?> | |||
| 56 | </ul> | 56 | </ul> | |||
| 57 | </div> | 57 | </div> | |||
| 58 | <div class="category-detail col-md-10"> | 58 | <div class="category-detail col-md-10"> | |||
| 59 | <div class="ajax_products_loader" style="text-align: center; display: none;"><i class="ajax-loader large animate-spin" style="position: absolute;top: 50%;top: 35vh;margin-top: -20px;left: 50%;margin-left: -18px;"></i></div> | 59 | <div class="ajax_products_loader" style="text-align: center; display: none;"><i class="ajax-loader large animate-spin" style="position: absolute;top: 50%;top: 35vh;margin-top: -20px;left: 50%;margin-left: -18px;"></i></div> | |||
| 60 | <div class="products-area"></div> | 60 | <div class="products-area"></div> | |||
| 61 | </div> | 61 | </div> | |||
| 62 | </div> | 62 | </div> | |||
| 63 | <div class="clearer"></div> | 63 | <div class="clearer"></div> | |||
| 64 | <script type="text/javascript"> | 64 | <script type="text/javascript"> | |||
| 65 | require([ | 65 | require([ | |||
| 66 | 'jquery' | 66 | 'jquery' | |||
| 67 | ], function ($) { | 67 | ], function ($) { | |||
| 68 | $(".ajax-products > .category-list > ul > li > a").off("click").on("click", function(){ | 68 | $(".ajax-products > .category-list > ul > li > a").off("click").on("click", function(){ | |||
| 69 | url = "<?php echo $_portohelper->getBaseLinkUrl()."swporto/index/showcategoryproducts" ?>"; | 69 | url = "<?php echo $_portohelper->getBaseLinkUrl()."swporto/index/showcategoryproducts" ?>"; | |||
| 70 | cat_id = $(this).attr("cat_id"); | 70 | cat_id = $(this).attr("cat_id"); | |||
| 71 | $(this).parent().parent().children("li").children("a").removeClass("active"); | 71 | $(this).parent().parent().children("li").children("a").removeClass("active"); | |||
| 72 | $(this).addClass("active"); | 72 | $(this).addClass("active"); | |||
| 73 | $(".ajax-products > .category-detail > .ajax_products_loader").fadeIn(); | 73 | $(".ajax-products > .category-detail > .ajax_products_loader").fadeIn(); | |||
| 74 | 74 | |||||
| 75 | $.ajax({ | 75 | $.ajax({ | |||
| 76 | method:"POST", | 76 | method:"POST", | |||
| 77 | url:url, | 77 | url:url, | |||
| 78 | data:{ | 78 | data:{ | |||
| 79 | aspect_ratio:"<?php echo $aspect_ratio; ?>", | 79 | aspect_ratio:"<?php echo $aspect_ratio; ?>", | |||
| 80 | image_width:"<?php echo $ratio_width; ?>", | 80 | image_width:"<?php echo $ratio_width; ?>", | |||
| 81 | image_height:"<?php echo $ratio_height; ?>", | 81 | image_height:"<?php echo $ratio_height; ?>", | |||
| 82 | product_count:"<?php echo $product_count; ?>", | 82 | product_count:"<?php echo $product_count; ?>", | |||
| 83 | columns:"<?php echo $columns; ?>", | 83 | columns:"<?php echo $columns; ?>", | |||
| 84 | category_id:cat_id | 84 | category_id:cat_id | |||
| 85 | }, | 85 | }, | |||
| 86 | dataType: 'json' | 86 | dataType: 'json' | |||
| 87 | }).done(function(data){ | 87 | }).done(function(data){ | |||
| 88 | $(".ajax-products > .category-detail > .products-area").html(data.result); | 88 | $(".ajax-products > .category-detail > .products-area").html(data.result); | |||
| 89 | 89 | if($("form[data-role=tocart-form]").length > 0 && !redirect_cart) { | ||||
| 90 | $("form[data-role=tocart-form]").catalogAddToCart(); | |||||
| 91 | } | |||||
| 90 | if(typeof enable_quickview != 'undefined' && enable_quickview == true) { | 92 | if(typeof enable_quickview != 'undefined' && enable_quickview == true) { | |||
| 91 | requirejs(['jquery', 'weltpixel_quickview' ], function($, quickview) { | 93 | requirejs(['jquery', 'weltpixel_quickview' ], function($, quickview) { | |||
| 92 | $('.weltpixel-quickview').off('click').on('click', function() { | 94 | $('.weltpixel-quickview').off('click').on('click', function() { | |||
| 93 | var prodUrl = $(this).attr('data-quickview-url'); | 95 | var prodUrl = $(this).attr('data-quickview-url'); | |||
| 94 | if (prodUrl.length) { | 96 | if (prodUrl.length) { | |||
| 95 | quickview.displayContent(prodUrl); | 97 | quickview.displayContent(prodUrl); | |||
| 96 | } | 98 | } | |||
| 97 | }); | 99 | }); | |||
| 100 | $(".ajax-products .products-grid .weltpixel-quickview").each(function(){ | |||||
| 101 | $(this).appendTo($(this).parent().parent().children(".product-item-photo")); | |||||
| 102 | }); | |||||
| 98 | }); | 103 | }); | |||
| 99 | } | 104 | } | |||
| 100 | }).fail(function(){ | 105 | }).fail(function(){ | |||
| 101 | 106 | |||||
| 102 | }).always(function(){ | 107 | }).always(function(){ | |||
| 103 | $(".ajax-products > .category-detail > .ajax_products_loader").fadeOut(); | 108 | $(".ajax-products > .category-detail > .ajax_products_loader").fadeOut(); | |||
| 104 | }); | 109 | }); | |||
| 105 | }); | 110 | }); | |||
| 106 | $(".ajax-products > .category-list > ul > li:first-child > a").click(); | 111 | $(".ajax-products > .category-list > ul > li:first-child > a").click(); | |||
| 107 | }); | 112 | }); | |||
| 108 | </script> | 113 | </script> |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.