Skip to content

Commit

Permalink
Fixed duplicate display of text after price, if no tier prices are av…
Browse files Browse the repository at this point in the history
…ailable
  • Loading branch information
sydekumf committed Dec 30, 2016
1 parent 079b3e0 commit 65127c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Model/Plugin/AfterPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public function __construct(
*/
public function afterRender(\Magento\Framework\Pricing\Render $subject, $renderHtml)
{
// check if html is empty
if ($renderHtml == '' || str_replace("\n", "", $renderHtml) == '') {
return $renderHtml;
}

return $renderHtml . $this->_getAfterPriceHtml();
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"magento/module-tax": "^100.1"
},
"type": "magento2-module",
"version": "1.0.1",
"version": "1.0.2",
"license": "OSL-3.0",
"autoload": {
"files": [
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magenerds_GermanLaw" setup_version="1.0.1" />
<module name="Magenerds_GermanLaw" setup_version="1.0.2" />
</config>

0 comments on commit 65127c8

Please sign in to comment.