Skip to content

Commit 943996d

Browse files
committed
Hide checkbox if module output was disabled by configuration
1 parent 5713ab0 commit 943996d

File tree

1 file changed

+3
-1
lines changed
  • src/app/code/community/Quafzi/CheckoutNewsletterSubscription/Model

1 file changed

+3
-1
lines changed

src/app/code/community/Quafzi/CheckoutNewsletterSubscription/Model/Observer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ class Quafzi_CheckoutNewsletterSubscription_Model_Observer
44

55
public function addCheckbox ($observer)
66
{
7-
if ($observer->getBlock() instanceof Mage_Checkout_Block_Agreements) {
7+
if ($observer->getBlock() instanceof Mage_Checkout_Block_Agreements
8+
&& false === (boolean)(int)Mage::getStoreConfig('advanced/modules_disable_output/Quafzi_CheckoutNewsletterSubscription')
9+
) {
810
$html = $observer->getTransport()->getHtml();
911
$checkboxHtml = '<li><p class="agree">'
1012
. '<input id="subscribe_newsletter" name="is_subscribed" checked="checked" value="1" class="checkbox" type="checkbox" />'

0 commit comments

Comments
 (0)