sitewards_disabledproducts - Version 1.0.0

Version Notes

FIrst release of the extension.

Download this release

Release Info

Developer Sitewards Magento Team
Extension sitewards_disabledproducts
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Sitewards/DisabledProducts/Helper/Data.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Sitewards_DisabledProducts_Helper_Data
4
+ *
5
+ * A helper class for the DisabledProducts extension
6
+ * Returns the id of the cms block and checks if the product is disabled
7
+ *
8
+ * @category Sitewards
9
+ * @package Sitewards_DisabledProducts
10
+ * @copyright Copyright (c) 2012 Sitewards GmbH (http://www.sitewards.com/de/)
11
+ */
12
+ class Sitewards_DisabledProducts_Helper_Data extends Mage_Core_Helper_Abstract {
13
+
14
+ /**
15
+ * Variable to hold if the extension is active
16
+ */
17
+ private $bEnabledExtension = null;
18
+
19
+ /**
20
+ * Returns cms block for disabled products defined in the extension config
21
+ *
22
+ * @return string
23
+ */
24
+ public function getDisabledProductsBlock() {
25
+ return Mage::getStoreConfig('sitewards_disabledproducts_config/sitewards_disabledproducts_general/disabled_product_block');
26
+ }
27
+
28
+ /**
29
+ * Returns if the extension is enabled and the given product disabled
30
+ *
31
+ * @param Mage_Catalog_Model_Product $oProduct
32
+ * @return boolean
33
+ */
34
+ public function isProductDisabled(Mage_Catalog_Model_Product $oProduct){
35
+ $this->bEnabledExtension = Mage::getStoreConfig('sitewards_disabledproducts_config/sitewards_disabledproducts_general/enable_ext');
36
+ if ( $this->bEnabledExtension == true ) {
37
+ $oProduct = Mage::getModel('catalog/product')->load($oProduct->getId());
38
+ return $oProduct->getIsDisabled();
39
+ } else {
40
+ return false;
41
+ }
42
+ }
43
+ }
app/code/community/Sitewards/DisabledProducts/Model/Resource/Eav/Mysql4/Setup.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Sitewards_DisabledProducts_Model_Resource_Eav_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
3
+ {
4
+ /**
5
+ * adds the disabled attribute to products
6
+ * @return array
7
+ */
8
+ public function getDefaultEntities()
9
+ {
10
+ return array(
11
+ 'catalog_product' => array(
12
+ 'entity_model' => 'catalog/product',
13
+ 'attribute_model' => 'catalog/resource_eav_attribute',
14
+ 'table' => 'catalog/product',
15
+ 'additional_attribute_table' => 'catalog/eav_attribute',
16
+ 'entity_attribute_collection' => 'catalog/product_attribute_collection',
17
+ 'attributes' => array(
18
+ 'is_disabled' => array(
19
+ 'group' => 'Sitewards Disabled',
20
+ 'label' => 'Is Disabled',
21
+ 'type' => 'int',
22
+ 'input' => 'boolean',
23
+ 'default' => '0',
24
+ 'class' => '',
25
+ 'backend' => '',
26
+ 'frontend' => '',
27
+ 'source' => '',
28
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
29
+ 'visible' => true,
30
+ 'required' => false,
31
+ 'user_defined' => false,
32
+ 'searchable' => false,
33
+ 'filterable' => false,
34
+ 'comparable' => false,
35
+ 'visible_on_front' => false,
36
+ 'visible_in_advanced_search' => false,
37
+ 'unique' => false
38
+ ),
39
+ ),
40
+ ),
41
+ );
42
+ }
43
+ }
app/code/community/Sitewards/DisabledProducts/Model/System/Config/Source/Cms/Block.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Sitewards_DisabledProducts_Model_System_Config_Source_Cms_Block
4
+ *
5
+ * Backend model for cms blocks dropdown in the configuration section
6
+ *
7
+ * @category Sitewards
8
+ * @package Sitewards_DisabledProducts
9
+ * @copyright Copyright (c) 2012 Sitewards GmbH (http://www.sitewards.com/de/)
10
+ */
11
+ class Sitewards_DisabledProducts_Model_System_Config_Source_Cms_Block {
12
+
13
+ protected $_options;
14
+
15
+ /**
16
+ * Returns all cms blocks as an array of values (block ids) and labels (block names)
17
+ * used in the admin config to select a block to be displayed instead of add-to-cart button
18
+ *
19
+ * @return array
20
+ */
21
+ public function toOptionArray()
22
+ {
23
+ if (!$this->_options) {
24
+ $aBlockOptionsArray = array();
25
+ $aBlocksCollection = Mage::getResourceModel('cms/block_collection')->load();
26
+
27
+ foreach($aBlocksCollection as $oBlock){
28
+ $aOption = array(
29
+ 'value' => $oBlock->getIdentifier(),
30
+ 'label' => $oBlock->getTitle()
31
+ );
32
+ $aBlockOptionsArray[] = $aOption;
33
+ }
34
+ $this->_options = $aBlockOptionsArray;
35
+
36
+ }
37
+ return $this->_options;
38
+ }
39
+ }
app/code/community/Sitewards/DisabledProducts/etc/adminhtml.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * The adminhtml config file of the Sitewards DisabledProducts extension
5
+ *
6
+ * @category Sitewards
7
+ * @package Sitewards_DisabledProducts
8
+ * @copyright Copyright (c) 2012 Sitewards GmbH (http://www.sitewards.com/de/)
9
+ */
10
+ -->
11
+ <config>
12
+ <acl>
13
+ <resources>
14
+ <admin>
15
+ <children>
16
+ <system>
17
+ <children>
18
+ <config>
19
+ <children>
20
+ <sitewards_disabledproducts_config translate="title">
21
+ <title>Sitewards DisabledProducts - Configuration</title>
22
+ <sort_order>1000</sort_order>
23
+ </sitewards_disabledproducts_config>
24
+ </children>
25
+ </config>
26
+ </children>
27
+ </system>
28
+ </children>
29
+ </admin>
30
+ </resources>
31
+ </acl>
32
+ </config>
app/code/community/Sitewards/DisabledProducts/etc/config.xml ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Sitewards_DisabledProducts>
5
+ <version>0.1.0</version>
6
+ </Sitewards_DisabledProducts>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <sitewards_disabledproducts>
11
+ <class>Sitewards_DisabledProducts_Model</class>
12
+ </sitewards_disabledproducts>
13
+ </models>
14
+ <blocks>
15
+ <sitewards_disabledproducts>
16
+ <class>Sitewards_DisabledProducts_Block</class>
17
+ </sitewards_disabledproducts>
18
+ </blocks>
19
+ <helpers>
20
+ <sitewards_disabledproducts>
21
+ <class>Sitewards_DisabledProducts_Helper</class>
22
+ </sitewards_disabledproducts>
23
+ </helpers>
24
+ <resources>
25
+ <sitewards_disabledproducts_setup>
26
+ <setup>
27
+ <module>Sitewards_DisabledProducts</module>
28
+ <class>Sitewards_DisabledProducts_Model_Resource_Eav_Mysql4_Setup</class>
29
+ </setup>
30
+ <connection>
31
+ <use>core_setup</use>
32
+ </connection>
33
+ </sitewards_disabledproducts_setup>
34
+ </resources>
35
+ </global>
36
+ <adminhtml>
37
+ <translate>
38
+ <modules>
39
+ <sitewards_disabledproducts>
40
+ <files>
41
+ <default>Sitewards_DisabledProducts.csv</default>
42
+ </files>
43
+ </sitewards_disabledproducts>
44
+ </modules>
45
+ </translate>
46
+ </adminhtml>
47
+ <default>
48
+ <disabled_product_config>
49
+ <disabled_product_general>
50
+ <disabled_product_text>This product is not avalible to buy</disabled_product_text>
51
+ <enable_ext>1</enable_ext>
52
+ </disabled_product_general>
53
+ </disabled_product_config>
54
+ </default>
55
+ <frontend>
56
+ <layout>
57
+ <updates>
58
+ <sitewards_disabledproducts>
59
+ <file>sitewards/disabledproducts.xml</file>
60
+ </sitewards_disabledproducts>
61
+ </updates>
62
+ </layout>
63
+ </frontend>
64
+ </config>
app/code/community/Sitewards/DisabledProducts/etc/system.xml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * The system config file of the Sitewards DisabledProducts extension
5
+ *
6
+ * @category Sitewards
7
+ * @package Sitewards_DisabledProducts
8
+ * @copyright Copyright (c) 2012 Sitewards GmbH (http://www.sitewards.com/de/)
9
+ */
10
+ -->
11
+ <config>
12
+ <tabs>
13
+ <sitewards_disabledproducts_tab translate="label" module="sitewards_disabledproducts">
14
+ <label>Sitewards Disabled Products</label>
15
+ <sort_order>1001</sort_order>
16
+ </sitewards_disabledproducts_tab>
17
+ </tabs>
18
+
19
+ <sections>
20
+ <sitewards_disabledproducts_config translate="label" module="sitewards_disabledproducts">
21
+ <label>Configuration</label>
22
+ <tab>sitewards_disabledproducts_tab</tab>
23
+ <frontend_type>text</frontend_type>
24
+ <sort_order>1</sort_order>
25
+ <show_in_default>1</show_in_default>
26
+ <show_in_website>1</show_in_website>
27
+ <show_in_store>1</show_in_store>
28
+ <groups>
29
+ <sitewards_disabledproducts_general translate="label">
30
+ <label>General Options</label>
31
+ <fronted_type>text</fronted_type>
32
+ <sort_order>1</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ <fields>
37
+ <enable_ext translate="label">
38
+ <label>Enable Sitewards "Disabled Products" Extension</label>
39
+ <frontend_type>select</frontend_type>
40
+ <source_model>adminhtml/system_config_source_yesno</source_model>
41
+ <sort_order>10</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ </enable_ext>
46
+ <disabled_product_block translate="label comment">
47
+ <label>Replacement cms block</label>
48
+ <comment>This block will be shown instead of the "add to cart" button</comment>
49
+ <frontend_type>select</frontend_type>
50
+ <source_model>sitewards_disabledproducts/system_config_source_cms_block</source_model>
51
+ <sort_order>20</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ <show_in_store>1</show_in_store>
55
+ </disabled_product_block>
56
+ </fields>
57
+ </sitewards_disabledproducts_general>
58
+ </groups>
59
+ </sitewards_disabledproducts_config>
60
+ </sections>
61
+ </config>
app/code/community/Sitewards/DisabledProducts/sql/sitewards_disabledproducts_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->installEntities();
app/design/frontend/base/default/layout/sitewards/disabledproducts.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <layout>
2
+ <catalog_product_view>
3
+ <reference name="product.info.addtocart">
4
+ <action method="setTemplate">
5
+ <template>sitewards/disabledproducts/catalog/product/addtocart.phtml</template>
6
+ </action>
7
+ </reference>
8
+ </catalog_product_view>
9
+ <review_product_list>
10
+ <reference name="product.info.addtocart">
11
+ <action method="setTemplate">
12
+ <template>sitewards/disabledproducts/catalog/product/addtocart.phtml</template>
13
+ </action>
14
+ </reference>
15
+ </review_product_list>
16
+ </layout>
app/design/frontend/base/default/template/sitewards/disabledproducts/catalog/product/addtocart.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_product = $this->getProduct(); ?>
2
+ <?php if (!Mage::helper('sitewards_disabledproducts')->isProductDisabled($_product)): ?>
3
+ <?php
4
+ echo $this->setTemplate('catalog/product/view/addtocart.phtml')->toHtml();
5
+ ?>
6
+ <?php else: ?>
7
+ <div class="add-to-cart">
8
+ <?php
9
+ $sBlockId = Mage::helper('sitewards_disabledproducts')->getDisabledProductsBlock();
10
+ echo $this->getLayout()->createBlock('cms/block')->setBlockId($sBlockId)->toHtml();
11
+ ?>
12
+ </div>
13
+ <?php endif; ?>
app/etc/modules/Sitewards_DisabledProducts.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Sitewards_DisabledProducts>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <depends>
8
+ <Mage_Catalog />
9
+ <Mage_Cms />
10
+ <Mage_Adminhtml />
11
+ </depends>
12
+ </Sitewards_DisabledProducts>
13
+ </modules>
14
+ </config>
app/locale/de_DE/Sitewards_DisabledProducts.csv ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ "Configuration","Konfiguration"
2
+ "General Options","Allgemeine Optionen"
3
+ "Enable Sitewards ""Disabled Products"" Extension","Sitewards-Extension ""Disabled Products"" aktivieren"
4
+ "Replacement cms block","Ersatz-CMS-Block"
5
+ "This block will be shown instead of the ""add to cart"" button","Dieser Block wird statt des ""In den Warenkorb""-Buttons angezeigt"
6
+ "Is Disabled","Ist deaktiviert"
package.xml ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>sitewards_disabledproducts</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Extension to disable the add-to-cart button on products and to display a static cms block instead.</summary>
10
+ <description>Magento extension to disable the add-to-cart button on products and to display a static cms block instead.&#xD;
11
+ &#xD;
12
+ Customization&#xD;
13
+ -------------&#xD;
14
+ &#xD;
15
+ * You can define the cms block to be displayed instead of the add-to-cart button&#xD;
16
+ * You can set products as disabled in the products details&#xD;
17
+ &#xD;
18
+ Installation instructions&#xD;
19
+ -------------------------&#xD;
20
+ &#xD;
21
+ 1. Copy all files in the root of Magento directory.&#xD;
22
+ 2. Manually adjust following files by replacing all blocks with "-" by blocks with "+"&#xD;
23
+ This is required, because the standard magento theme doesn't always use blocks for the add-to-cart button, but contains it directly in other template files&#xD;
24
+ &#xD;
25
+ app\design\frontend\base\default\template\catalog\product\list.phtml&#xD;
26
+ line 60 - 64&#xD;
27
+ - &lt;?php if($_product-&gt;isSaleable()): ?&gt;&#xD;
28
+ - &lt;p&gt;&lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" class="button btn-cart" onclick="setLocation('&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;')"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;&#xD;
29
+ - &lt;?php else: ?&gt;&#xD;
30
+ - &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
31
+ - &lt;?php endif; ?&gt;&#xD;
32
+ + &lt;?php if (!Mage::helper('sitewards_disabledproducts')-&gt;isProductDisabled($_product)): ?&gt;&#xD;
33
+ + &lt;?php if($_product-&gt;isSaleable()): ?&gt;&#xD;
34
+ + &lt;p&gt;&lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" class="button btn-cart" onclick="setLocation('&lt;?php echo $this-&gt;getAddToCartUrl($_product) ?&gt;')"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;&#xD;
35
+ + &lt;?php else: ?&gt;&#xD;
36
+ + &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
37
+ + &lt;?php endif; ?&gt;&#xD;
38
+ + &lt;?php else: ?&gt;&#xD;
39
+ + &lt;?php&#xD;
40
+ + $sBlockId = Mage::helper('sitewards_disabledproducts')-&gt;getDisabledProductsBlock();&#xD;
41
+ + echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId($sBlockId)-&gt;toHtml();&#xD;
42
+ + ?&gt;&#xD;
43
+ + &lt;?php endif; ?&gt;&#xD;
44
+ &#xD;
45
+ app\design\frontend\base\default\template\catalog\product\compare\list.phtml&#xD;
46
+ line 67-71&#xD;
47
+ - &lt;?php if($_item-&gt;isSaleable()): ?&gt;&#xD;
48
+ - &lt;p&gt;&lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" class="button btn-cart" onclick="setPLocation('&lt;?php echo $this-&gt;helper('catalog/product_compare')-&gt;getAddToCartUrl($_item) ?&gt;', true)"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;&#xD;
49
+ - &lt;?php else: ?&gt;&#xD;
50
+ - &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
51
+ - &lt;?php endif; ?&gt;&#xD;
52
+ + &lt;?php if (!Mage::helper('sitewards_disabledproducts')-&gt;isProductDisabled($_item)): ?&gt;&#xD;
53
+ + &lt;?php if($_item-&gt;isSaleable()): ?&gt;&#xD;
54
+ + &lt;p&gt;&lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" class="button btn-cart" onclick="setPLocation('&lt;?php echo $this-&gt;helper('catalog/product_compare')-&gt;getAddToCartUrl($_item) ?&gt;', true)"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;&#xD;
55
+ + &lt;?php else: ?&gt;&#xD;
56
+ + &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
57
+ + &lt;?php endif; ?&gt;&#xD;
58
+ + &lt;?php else: ?&gt;&#xD;
59
+ + &lt;?php&#xD;
60
+ + $sBlockId = Mage::helper('sitewards_disabledproducts')-&gt;getDisabledProductsBlock();&#xD;
61
+ + echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId($sBlockId)-&gt;toHtml();&#xD;
62
+ + ?&gt;&#xD;
63
+ + &lt;?php endif; ?&gt;&#xD;
64
+ &#xD;
65
+ app\design\frontend\base\default\template\catalog\product\compare\list.phtml&#xD;
66
+ line 127-131&#xD;
67
+ - &lt;?php if($_item-&gt;isSaleable()): ?&gt;&#xD;
68
+ - &lt;p&gt;&lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" class="button btn-cart" onclick="setPLocation('&lt;?php echo $this-&gt;helper('catalog/product_compare')-&gt;getAddToCartUrl($_item) ?&gt;', true)"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;&#xD;
69
+ - &lt;?php else: ?&gt;&#xD;
70
+ - &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
71
+ - &lt;?php endif; ?&gt;&#xD;
72
+ + &lt;?php if (!Mage::helper('sitewards_disabledproducts')-&gt;isProductDisabled($_item)): ?&gt;&#xD;
73
+ + &lt;?php if($_item-&gt;isSaleable()): ?&gt;&#xD;
74
+ + &lt;p&gt;&lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" class="button btn-cart" onclick="setPLocation('&lt;?php echo $this-&gt;helper('catalog/product_compare')-&gt;getAddToCartUrl($_item) ?&gt;', true)"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;/p&gt;&#xD;
75
+ + &lt;?php else: ?&gt;&#xD;
76
+ + &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
77
+ + &lt;?php endif; ?&gt;&#xD;
78
+ + &lt;?php else: ?&gt;&#xD;
79
+ + &lt;?php&#xD;
80
+ + $sBlockId = Mage::helper('sitewards_disabledproducts')-&gt;getDisabledProductsBlock();&#xD;
81
+ + echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId($sBlockId)-&gt;toHtml();&#xD;
82
+ + ?&gt;&#xD;
83
+ + &lt;?php endif; ?&gt;&#xD;
84
+ &#xD;
85
+ app\design\frontend\base\default\template\wishlist\item\column\cart.phtml&#xD;
86
+ line 34-47&#xD;
87
+ - &lt;div class="add-to-cart-alt"&gt;&#xD;
88
+ - &lt;?php if ($item-&gt;canHaveQty() &amp;&amp; $item-&gt;getProduct()-&gt;isVisibleInSiteVisibility()): ?&gt;&#xD;
89
+ - &lt;input type="text" class="input-text qty validate-not-negative-number" name="qty[&lt;?php echo $item-&gt;getId() ?&gt;]" value="&lt;?php echo $this-&gt;getAddToCartQty($item) * 1 ?&gt;" /&gt;&#xD;
90
+ - &lt;?php endif; ?&gt;&#xD;
91
+ - &lt;?php if ($product-&gt;isSaleable()): ?&gt;&#xD;
92
+ - &lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" onclick="addWItemToCart(&lt;?php echo $item-&gt;getId()?&gt;);" class="button btn-cart"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&#xD;
93
+ - &lt;?php else: ?&gt;&#xD;
94
+ - &lt;?php if ($product-&gt;getIsSalable()): ?&gt;&#xD;
95
+ - &lt;p class="availability in-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('In stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
96
+ - &lt;?php else: ?&gt;&#xD;
97
+ - &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
98
+ - &lt;?php endif; ?&gt;&#xD;
99
+ - &lt;?php endif; ?&gt;&#xD;
100
+ - &lt;/div&gt;&#xD;
101
+ + &lt;?php if (!Mage::helper('sitewards_disabledproducts')-&gt;isProductDisabled($product)): ?&gt;&#xD;
102
+ + &lt;div class="add-to-cart-alt"&gt;&#xD;
103
+ + &lt;?php if ($item-&gt;canHaveQty() &amp;&amp; $item-&gt;getProduct()-&gt;isVisibleInSiteVisibility()): ?&gt;&#xD;
104
+ + &lt;input type="text" class="input-text qty validate-not-negative-number" name="qty[&lt;?php echo $item-&gt;getId() ?&gt;]" value="&lt;?php echo $this-&gt;getAddToCartQty($item) * 1 ?&gt;" /&gt;&#xD;
105
+ + &lt;?php endif; ?&gt;&#xD;
106
+ + &lt;?php if ($product-&gt;isSaleable()): ?&gt;&#xD;
107
+ + &lt;button type="button" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" onclick="addWItemToCart(&lt;?php echo $item-&gt;getId()?&gt;);" class="button btn-cart"&gt;&lt;span&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&#xD;
108
+ + &lt;?php else: ?&gt;&#xD;
109
+ + &lt;?php if ($product-&gt;getIsSalable()): ?&gt;&#xD;
110
+ + &lt;p class="availability in-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('In stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
111
+ + &lt;?php else: ?&gt;&#xD;
112
+ + &lt;p class="availability out-of-stock"&gt;&lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&lt;/span&gt;&lt;/p&gt;&#xD;
113
+ + &lt;?php endif; ?&gt;&#xD;
114
+ + &lt;?php endif; ?&gt;&#xD;
115
+ + &lt;/div&gt;&#xD;
116
+ + &lt;?php else: ?&gt;&#xD;
117
+ + &lt;div class="add-to-cart-alt"&gt;&#xD;
118
+ + &lt;?php&#xD;
119
+ + $sBlockId = Mage::helper('sitewards_disabledproducts')-&gt;getDisabledProductsBlock();&#xD;
120
+ + echo $this-&gt;getLayout()-&gt;createBlock('cms/block')-&gt;setBlockId($sBlockId)-&gt;toHtml();&#xD;
121
+ + ?&gt;&#xD;
122
+ + &lt;/div&gt;&#xD;
123
+ + &lt;?php endif; ?&gt;&#xD;
124
+ &#xD;
125
+ contact: http://www.sitewards.com</description>
126
+ <notes>FIrst release of the extension.</notes>
127
+ <authors><author><name>Sitewards Magento Team</name><user>sitewards</user><email>magento@sitewards.com</email></author></authors>
128
+ <date>2013-02-06</date>
129
+ <time>10:22:10</time>
130
+ <contents><target name="magecommunity"><dir name="Sitewards"><dir name="DisabledProducts"><dir name="Helper"><file name="Data.php" hash="302491d171637f882ac9f5126a1a95d1"/></dir><dir name="Model"><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="0fe90fe89e042e56f8fe60972d6409e8"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Cms"><file name="Block.php" hash="af40acf0688f4471be2a0cb1878cc7a4"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d98117511961c714288ded79e3f19769"/><file name="config.xml" hash="201c724b1c4a3242b42ba4b42a531653"/><file name="system.xml" hash="c1379df86a31ee9d570772062f8c81f4"/></dir><dir name="sql"><dir name="sitewards_disabledproducts_setup"><file name="mysql4-install-0.1.0.php" hash="2df441a6f1f7a7be6734c0e9105fda17"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sitewards_DisabledProducts.xml" hash="700a3b6a5d74b3b66531ca90bfab874c"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Sitewards_DisabledProducts.csv" hash="6190d8e2ad571e8bdeacde9c0aae9efd"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="sitewards"><file name="disabledproducts.xml" hash="b47a1dfc4b1bb9b3f2ff1ef4be472eea"/></dir></dir><dir name="template"><dir name="sitewards"><dir name="disabledproducts"><dir name="catalog"><dir name="product"><file name="addtocart.phtml" hash="ff2aa2106d8eff05ae0fb87244eb657d"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
131
+ <compatible/>
132
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
133
+ </package>