Skip to content

Commit

Permalink
trim exit points & fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
eug-L committed Aug 14, 2024
1 parent 081f9dc commit cc31f21
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
40 changes: 20 additions & 20 deletions prestashop1.6/tawkto.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,26 +106,26 @@ public function hookDisplayFooter()
$show = true;
}

if (!$show) {
if ('index' == $this->context->controller->php_self) {
if (false == $options->show_onfrontpage) {
return;
}
}
if ('category' == $this->context->controller->php_self) {
if (false == $options->show_oncategory) {
return;
}
}
if ('product' == $this->context->controller->php_self) {
if (false == $options->show_onproduct) {
return;
}
}
}

if (!$show && !in_array($this->context->controller->php_self, array('index', 'category', 'product'))) {
return;
if (!$show) {
if ('index' == $this->context->controller->php_self) {
if ($options->show_onfrontpage) {
$show = true;
}
}
if ('category' == $this->context->controller->php_self) {
if ($options->show_oncategory) {
$show = true;
}
}
if ('product' == $this->context->controller->php_self) {
if ($options->show_onproduct) {
$show = true;
}
}
}

if (!$show) {
return '';
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions prestashop1.7/tawkto.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,26 @@ public function hookDisplayFooter()

if (!$show) {
if ('product' == $this->context->controller->php_self) {
if (false==$options->show_onproduct) {
return;
if ($options->show_onproduct) {
$show = true;
}
}

if ('category' == $this->context->controller->php_self) {
if (false==$options->show_oncategory) {
return;
if ($options->show_oncategory) {
$show = true;
}
}

if ('index' == $this->context->controller->php_self) {
if (false==$options->show_onfrontpage) {
return;
if ($options->show_onfrontpage) {
$show = true;
}
}
}

if (!$show && !in_array($this->context->controller->php_self, array('index', 'category', 'product'))) {
return;
if (!$show) {
return '';
}
} else {
// hide on specified urls
Expand Down

0 comments on commit cc31f21

Please sign in to comment.