Skip to content

Commit 1510f00

Browse files
authored
Merge pull request #40 from landofcoder/develop
Develop
2 parents d0ab2d7 + 7017d09 commit 1510f00

File tree

7 files changed

+15
-6
lines changed

7 files changed

+15
-6
lines changed

Block/Tag/Product/Sidebar.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ public function __construct(
4848
public function _toHtml(){
4949
if(!$this->_tagHelper->getGeneralConfig('enabled')) return;
5050
if(!$this->_tagHelper->getGeneralConfig('enable_tag_sidebar')) return;
51-
return parent::_toHtml();
51+
$_tag_collection = $this->getTagCollection();
52+
if($_tag_collection && $_tag_collection->getSize()){
53+
return parent::_toHtml();
54+
}
55+
return "";
5256
}
5357
function getTagHelper(){
5458
return $this->_tagHelper;

Block/Tag/Product/TagProduct.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ public function __construct(
4848
public function _toHtml(){
4949
if(!$this->_tagHelper->getGeneralConfig('enabled')) return;
5050
if(!$this->_tagHelper->getGeneralConfig('enable_tag_on_product')) return;
51-
return parent::_toHtml();
51+
$_tag_collection = $this->getTagCollection();
52+
if($_tag_collection && $_tag_collection->getSize()){
53+
return parent::_toHtml();
54+
}
55+
return "";
5256
}
5357
function getTagHelper(){
5458
return $this->_tagHelper;

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "Assign one or multiple tags to your products and improve the navigation for your customers, who can narrow the search results by tags in the Product Filters or, vice versa, see all products with the tags",
44
"type": "magento2-module",
55
"license": "MIT",
6+
"version": "1.0.1",
67
"authors": [
78
{
89
"name": "Landofcoder",

etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
33
<system>
44
<tab id="landofcoder" sortOrder="999" translate="label">
5-
<label>landofcoder</label>
5+
<label>Landofcoder.com</label>
66
</tab>
77
<section id="lofproductags" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="10" translate="label">
88
<label>lofproductags</label>

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" ?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3-
<module name="Lof_ProductTags" setup_version="1.0.0"/>
3+
<module name="Lof_ProductTags" setup_version="1.0.1"/>
44
</config>

view/frontend/layout/catalog_category_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" ?>
2-
<page layout="2column-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
2+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
33
<body>
44
<!-- <move element="catalog.product.related" destination="sidebar.additional" after="tag.view"/> -->
55
<!-- <referenceBlock name="catalog.compare.sidebar" remove="true" />

view/frontend/layout/catalog_product_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" ?>
2-
<page layout="2column-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
2+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
33
<body>
44
<referenceContainer name="product.info.main">
55
<block class="Lof\ProductTags\Block\Tag\Product\TagProduct" name="tag.product.tagproduct" template="Lof_ProductTags::tag/product/tags.phtml"/>

0 commit comments

Comments
 (0)