Skip to content

Commit 83b55d6

Browse files
committed
Improved event listing info
1 parent 6ac997d commit 83b55d6

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

Block/Adminhtml/System/Config/Form/EventList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected function _getElementHtml(AbstractElement $element): string
8181
*
8282
* @return bool
8383
*/
84-
public function isPlusEnabled()
84+
public function isPlusEnabled(): bool
8585
{
8686
return (bool)$this->moduleManager->isEnabled('Magefan_GoogleTagManagerPlus');
8787
}
@@ -91,7 +91,7 @@ public function isPlusEnabled()
9191
*
9292
* @return bool
9393
*/
94-
public function isExtraEnabled()
94+
public function isExtraEnabled(): bool
9595
{
9696
return (bool)$this->moduleManager->isEnabled('Magefan_GoogleTagManagerExtra');
9797
}

view/adminhtml/templates/system/config/event/list.phtml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,18 @@ $eventsPlus = [
2525
'Add To Wishlist (add_to_wishlist)',
2626
'View Product List on category page, related/up-sell/cross-sell products (view_item_list)',
2727
'Shipping Step on Checkout Page (add_shipping_info)',
28-
'Payments Step on Checkout Page (add_payment_info)'
28+
'Payments Step on Checkout Page (add_payment_info)',
29+
'Google Ads - Conversion Tracking',
30+
'Google Ads - Dynamic Remarketing'
2931
];
3032
$eventsExtra = [
3133
'Sign In (login)',
3234
'Create an Account (sign_up)',
3335
'Search (search)',
36+
/*
3437
'Earn Virtual Currency (earn_virtual_currency)',
3538
'Spend Virtual Currency (spend_virtual_currency)'
39+
*/
3640
];
3741
?>
3842
<br/>
@@ -42,34 +46,39 @@ $eventsExtra = [
4246
<?= $escaper->escapeHtml(implode('</li><li>', $events), ['li']) ?>
4347
</li>
4448
</ul>
45-
<p <?php if (!$block->isPlusEnabled()) { ?>style="color: red"<?php } ?>>
49+
<p <?php if (!$block->isPlusEnabled()) { ?>style="color: #eb5202"<?php } ?>>
4650
<strong>
4751
<?= $escaper->escapeHtml(__(!$block->isPlusEnabled() ? 'Available in GTM Plus Only' : 'GTM Plus')) ?>
4852
<?php if (!$block->isPlusEnabled()) { ?>
49-
(<a href="https://magefan.com/magento-2-google-tag-manager/pricing" target="_blank">Read More</a>):
53+
(<a style="color: #eb5202; text-decoration: underline;" href="https://magefan.com/magento-2-google-tag-manager/pricing" target="_blank">Read more</a>):
5054
<?php } ?>
5155
</strong>
5256
</p>
53-
<div <?php if (!$block->isPlusEnabled()) { ?>style="opacity: 0.7; color: red"<?php } ?>>
57+
<div <?php if (!$block->isPlusEnabled()) { ?>style="opacity: 0.7; color: #eb5202"<?php } ?>>
5458
<ul>
5559
<li>
5660
<?= $escaper->escapeHtml(implode('</li><li>', $eventsPlus), ['li']) ?>
5761
</li>
5862
</ul>
5963
</div>
60-
<p <?php if (!$block->isExtraEnabled()) { ?>style="color: red"<?php } ?>>
64+
<p <?php if (!$block->isExtraEnabled()) { ?>style="color: #eb5202"<?php } ?>>
6165
<strong>
6266
<?= $escaper->escapeHtml(__(!$block->isExtraEnabled() ? 'Available in GTM Extra Only' : 'GTM Extra')) ?>
6367
<?php if (!$block->isExtraEnabled()) { ?>
64-
(<a href="https://magefan.com/magento-2-google-tag-manager/pricing" target="_blank">Read More</a>):
68+
(<a style="color: #eb5202; text-decoration: underline;" href="https://magefan.com/magento-2-google-tag-manager/pricing" target="_blank">Read more</a>):
6569
<?php } ?>
6670
</strong>
6771
</p>
68-
<div <?php if (!$block->isExtraEnabled()) { ?>style="opacity: 0.7; color: red"<?php } ?>>
72+
<div <?php if (!$block->isExtraEnabled()) { ?>style="opacity: 0.7; color: #eb5202"<?php } ?>>
6973
<ul>
7074
<li>
7175
<?= $escaper->escapeHtml(implode('</li><li>', $eventsExtra), ['li']) ?>
7276
</li>
7377
</ul>
7478
</div>
79+
<?php if (!$block->isPlusEnabled() || !$block->isExtraEnabled()) { ?>
80+
<button title="Upgrade" type="button" class="primary" onclick="window.open('https://magefan.com/magento-2-google-tag-manager/pricing')">
81+
<span>Upgrade to GTM <?php if (!$block->isPlusEnabled()) echo 'Plus or' ?> Extra</span>
82+
</button>
83+
<?php } ?>
7584
</div>

0 commit comments

Comments
 (0)