File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Block/Adminhtml/System/Config/Form
view/adminhtml/templates/system/config/event Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -85,4 +85,14 @@ public function isPlusEnabled()
8585 {
8686 return (bool )$ this ->moduleManager ->isEnabled ('Magefan_GoogleTagManagerPlus ' );
8787 }
88+
89+ /**
90+ * Retrieve true if GTM Extra is enabled
91+ *
92+ * @return bool
93+ */
94+ public function isExtraEnabled ()
95+ {
96+ return (bool )$ this ->moduleManager ->isEnabled ('Magefan_GoogleTagManagerExtra ' );
97+ }
8898}
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ $eventsPlus = [
2727 'Shipping Step on Checkout Page (add_shipping_info) ' ,
2828 'Payments Step on Checkout Page (add_payment_info) '
2929];
30+ $ eventsExtra = [
31+ 'Sign In (login) ' ,
32+ 'Create an Account (sign_up) ' ,
33+ 'Search (search) ' ,
34+ 'Earn Virtual Currency (earn_virtual_currency) ' ,
35+ 'Spend Virtual Currency (spend_virtual_currency) '
36+ ];
3037?>
3138<br/>
3239<div>
@@ -50,4 +57,19 @@ $eventsPlus = [
5057 </li>
5158 </ul>
5259 </div>
60+ <p <?php if (!$ block ->isExtraEnabled ()) { ?> style="color: red"<?php } ?> >
61+ <strong>
62+ <?= $ escaper ->escapeHtml (__ (!$ block ->isExtraEnabled () ? 'Available in GTM Extra Only ' : 'GTM Extra ' )) ?>
63+ <?php if (!$ block ->isExtraEnabled ()) { ?>
64+ (<a href="https://magefan.com/magento-2-google-tag-manager/pricing" target="_blank">Read More</a>):
65+ <?php } ?>
66+ </strong>
67+ </p>
68+ <div <?php if (!$ block ->isExtraEnabled ()) { ?> style="opacity: 0.7; color: red"<?php } ?> >
69+ <ul>
70+ <li>
71+ <?= $ escaper ->escapeHtml (implode ('</li><li> ' , $ eventsExtra ), ['li ' ]) ?>
72+ </li>
73+ </ul>
74+ </div>
5375</div>
You can’t perform that action at this time.
0 commit comments