Intellimage_Attachs - Version 1.0.0

Version Notes

version created at 06/01/2012 by Hugo Mauricio Prado Macat.

Download this release

Release Info

Developer Hugo Mauricio Prado Macat
Extension Intellimage_Attachs
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Intellimage/Attachs/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@magentocommerce.com so we can send you a copy immediately.
12
+ *
13
+ *
14
+ * @package Intellimage_Attachs
15
+ * @email mauricioprado00@gmail.com
16
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Intellimage_Attachs_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable
21
+ extends Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable
22
+ {
23
+ /**
24
+ * Get tab label
25
+ *
26
+ * @return string
27
+ */
28
+ public function getTabLabel()
29
+ {
30
+ return Mage::helper('downloadable')->__('File Attachments');
31
+ }
32
+
33
+ /**
34
+ * Get tab title
35
+ *
36
+ * @return string
37
+ */
38
+ public function getTabTitle()
39
+ {
40
+ return Mage::helper('downloadable')->__('File Attachments');
41
+ }
42
+ /**
43
+ * Render block HTML
44
+ *
45
+ * @return string
46
+ */
47
+ protected function _toHtml()
48
+ {
49
+ $accordion = $this->getLayout()->createBlock('adminhtml/widget_accordion')
50
+ ->setId('downloadableInfo');
51
+
52
+ $accordion->addItem('samples', array(
53
+ 'title' => Mage::helper('adminhtml')->__('Attachs'),
54
+ 'content' => $this->getLayout()
55
+ ->createBlock('downloadable/adminhtml_catalog_product_edit_tab_downloadable_samples')->toHtml(),
56
+ 'open' => true,
57
+ ));
58
+
59
+ // $accordion->addItem('links', array(
60
+ // 'title' => Mage::helper('adminhtml')->__('Links'),
61
+ // 'content' => $this->getLayout()->createBlock(
62
+ // 'downloadable/adminhtml_catalog_product_edit_tab_downloadable_links',
63
+ // 'catalog.product.edit.tab.downloadable.links')->toHtml(),
64
+ // 'open' => true,
65
+ // ));
66
+
67
+ $this->setChild('accordion', $accordion);
68
+ return Mage_Adminhtml_Block_Widget::_toHtml();
69
+ // parent::_toHtml();
70
+ }
71
+
72
+ }
app/code/community/Intellimage/Attachs/Model/Observer.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Intellimage_Attachs_Model_Observer
3
+ {
4
+ /**
5
+ * Prepare product to allow samples
6
+ *
7
+ * @param Varien_Object $observer
8
+ * @return Mage_Downloadable_Model_Observer
9
+ */
10
+ public function prepareProduct($observer)
11
+ {
12
+ $request = $observer->getEvent()->getRequest();
13
+ $product = $observer->getEvent()->getProduct();
14
+ $typeInstance = $product->getTypeInstance(true);
15
+ $product->setTypeInstance(Mage::getModel('attachs/product_type', $typeInstance), true);
16
+ return $this;
17
+ }
18
+
19
+ /**
20
+ * Prepare product to save
21
+ *
22
+ * @param Varien_Object $observer
23
+ * @return Mage_Downloadable_Model_Observer
24
+ */
25
+ public function prepareProductSave($observer)
26
+ {
27
+ $this->prepareProduct($observer);
28
+ // $request = $observer->getEvent()->getRequest();
29
+ // $product = $observer->getEvent()->getProduct();
30
+ //
31
+ // if ($downloadable = $request->getPost('configurable')) {
32
+ // $product->setDownloadableData($downloadable);
33
+ // }
34
+ return $this;
35
+ }
36
+ }
app/code/community/Intellimage/Attachs/Model/Product/Type.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@magentocommerce.com so we can send you a copy immediately.
12
+ *
13
+ *
14
+ * @package Intellimage_Attachs
15
+ * @email mauricioprado00@gmail.com
16
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Intellimage_Attachs_Model_Product_Type{
21
+ private $_downloadable_type = null;
22
+ private $_typeInstance;
23
+ public function __construct($_typeInstance){
24
+ //$args = func_get_args();
25
+ //var_dump(count($args),get_class($args[0]), $args[0] instanceof Mage_Catalog_Model_Product_Type);
26
+ //die(__FILE__.__LINE__);
27
+
28
+ $this->_typeInstance = $_typeInstance;
29
+ }
30
+ private function castToDownloadable($product = null){
31
+ if(!isset($this->_downloadable_type)){
32
+ $this->_downloadable_type = Mage::getModel('downloadable/product_type');
33
+ $this->_downloadable_type->setProduct($product);
34
+ }
35
+ return $this->_downloadable_type;
36
+ }
37
+ public function save($product = null)
38
+ {
39
+ //parent::save($product);
40
+ $this->_typeInstance->save($product);
41
+ $downloadable = $this->castToDownloadable($product);
42
+ $downloadable->save($product);
43
+ }
44
+ public function getSamples($product = null){
45
+ $downloadable = $this->castToDownloadable($product);
46
+ return call_user_func_array(array($downloadable, 'getSamples'), array($product));
47
+ }
48
+ public function hasSamples($product = null){
49
+ $downloadable = $this->castToDownloadable($product);
50
+ return call_user_func_array(array($downloadable, 'hasSamples'), array($product));
51
+ }
52
+
53
+ // /**
54
+ // * Set/Get attribute wrapper
55
+ // *
56
+ // * @param string $method
57
+ // * @param array $args
58
+ // * @return mixed
59
+ // */
60
+ public function __call($method, $args)
61
+ {
62
+ return call_user_func_array(array($this->_typeInstance, $method), $args);
63
+ // $first = isset($args[0])?$args[0]:null;
64
+ // $product = isset($first)&&is_a($first, 'Mage_Catalog_Model_Product')?$first:null;
65
+ //
66
+ // if(isset($product)&&method_exists($this->castToDownloadable($product), $method)){
67
+ // $downloadable = $this->castToDownloadable($product);
68
+ // return call_user_func_array(array($downloadable, $method), $args);
69
+ // }
70
+ // throw new Varien_Exception("M�todo inexistente ".get_class($this)."::".$method."(".print_r($args,1).")");
71
+ }
72
+ }
73
+ ?>
app/code/community/Intellimage/Attachs/etc/config.xml ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to license@magentocommerce.com so we can send you a copy immediately.
13
+ *
14
+ *
15
+ * @package Intellimage_Attachs
16
+ * @email mauricioprado00@gmail.com
17
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ -->
21
+ <config>
22
+ <modules>
23
+ <Intellimage_Attachs>
24
+ <version>1.0</version>
25
+ </Intellimage_Attachs>
26
+ </modules>
27
+ <admin>
28
+
29
+ </admin>
30
+ <global>
31
+ <models>
32
+ <attachs>
33
+ <class>Intellimage_Attachs_Model</class>
34
+ </attachs>
35
+ <catalog>
36
+ <!--
37
+ <rewrite>
38
+ <product_type_configurable>Intellimage_Attachs_Model_Product_Type_Configurable</product_type_configurable>
39
+ <product_type_simple>Intellimage_Attachs_Model_Product_Type_Simple</product_type_simple>
40
+ <product_type_virtual>Intellimage_Attachs_Model_Product_Type_Virtual</product_type_virtual>
41
+ <product_type_grouped>Intellimage_Attachs_Model_Product_Type_Grouped</product_type_grouped>
42
+ </rewrite>
43
+ -->
44
+ </catalog>
45
+ <bundle>
46
+ <!--
47
+ <rewrite>
48
+ <product_type>Intellimage_Attachs_Model_Product_Type_Bundle</product_type>
49
+ </rewrite>
50
+ -->
51
+ </bundle>
52
+ </models>
53
+ <blocks>
54
+ <attachs>
55
+ <class>Intellimage_Attachs_Block</class>
56
+ </attachs>
57
+ </blocks>
58
+ <resources>
59
+ <attachs_setup>
60
+ <setup>
61
+ <module>Intellimage_Attachs</module>
62
+ <class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
63
+ </setup>
64
+ </attachs_setup>
65
+ </resources>
66
+ </global>
67
+ <frontend>
68
+ <events>
69
+ <catalog_controller_product_view>
70
+ <observers>
71
+ <catalog_prepare_product_view>
72
+ <class>attachs/observer</class>
73
+ <method>prepareProduct</method>
74
+ </catalog_prepare_product_view>
75
+ </observers>
76
+ </catalog_controller_product_view>
77
+ </events>
78
+ </frontend>
79
+ <adminhtml>
80
+ <events>
81
+ <catalog_product_edit_action>
82
+ <observers>
83
+ <catalog_prepare_product_edit>
84
+ <class>attachs/observer</class>
85
+ <method>prepareProduct</method>
86
+ </catalog_prepare_product_edit>
87
+ </observers>
88
+ </catalog_product_edit_action>
89
+ <catalog_product_new_action>
90
+ <observers>
91
+ <catalog_prepare_product_edit>
92
+ <class>attachs/observer</class>
93
+ <method>prepareProduct</method>
94
+ </catalog_prepare_product_edit>
95
+ </observers>
96
+ </catalog_product_new_action>
97
+ <catalog_product_prepare_save>
98
+ <observers>
99
+ <intellimage_attachs>
100
+ <class>attachs/observer</class>
101
+ <method>prepareProductSave</method>
102
+ </intellimage_attachs>
103
+ </observers>
104
+ </catalog_product_prepare_save>
105
+ </events>
106
+ <layout>
107
+ <updates>
108
+ <intellimage_attachs>
109
+ <file>intellimage_attachs.xml</file>
110
+ </intellimage_attachs>
111
+ </updates>
112
+ </layout>
113
+ </adminhtml>
114
+ <frontend>
115
+ <translate>
116
+ <!--
117
+ <modules>
118
+ <Mage_Catalog>
119
+ <files>
120
+ <default>Mage_Catalog.csv</default>
121
+ </files>
122
+ </Mage_Catalog>
123
+ </modules>
124
+ -->
125
+ </translate>
126
+ <layout>
127
+ <updates>
128
+ <intellimage_attachs>
129
+ <file>intellimage_attachs.xml</file>
130
+ </intellimage_attachs>
131
+ </updates>
132
+ </layout>
133
+ </frontend>
134
+ <default>
135
+ <!--
136
+ <catalog>
137
+ <configurable>
138
+ <samples_title>Attachs</samples_title>
139
+ </configurable>
140
+ <simple>
141
+ <samples_title>Attachs</samples_title>
142
+ </simple>
143
+ </catalog>
144
+ -->
145
+ </default>
146
+ </config>
app/code/community/Intellimage/Attachs/sql/attachs_setup/install-1.6.0.0.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@magentocommerce.com so we can send you a copy immediately.
12
+ *
13
+ *
14
+ * @package Intellimage_Attachs
15
+ * @email mauricioprado00@gmail.com
16
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+ /** @var $installer Mage_Catalog_Model_Resource_Setup */
20
+ $installer = $this;
21
+
22
+ $installer->startSetup();
23
+
24
+ $installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'samples_title', array(
25
+ 'type' => 'varchar',
26
+ 'backend' => '',
27
+ 'frontend' => '',
28
+ 'label' => 'Samples title',
29
+ 'input' => '',
30
+ 'class' => '',
31
+ 'source' => '',
32
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
33
+ 'visible' => false,
34
+ 'required' => true,
35
+ 'user_defined' => false,
36
+ 'default' => '',
37
+ 'searchable' => false,
38
+ 'filterable' => false,
39
+ 'comparable' => false,
40
+ 'visible_on_front' => false,
41
+ 'unique' => false,
42
+ 'apply_to' => 'simple,configurable,virtual,bundle,downloadable',
43
+ 'is_configurable' => false
44
+ ));
45
+
46
+ $installer->endSetup();
app/code/community/Intellimage/Attachs/sql/attachs_setup/mysql4-install-1.4.0.0.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@magentocommerce.com so we can send you a copy immediately.
12
+ *
13
+ *
14
+ * @package Intellimage_Attachs
15
+ * @email mauricioprado00@gmail.com
16
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+ /* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */
20
+ $installer = $this;
21
+
22
+ $installer->startSetup();
23
+
24
+ $installer->addAttribute('catalog_product', 'samples_title', array(
25
+ 'type' => 'varchar',
26
+ 'backend' => '',
27
+ 'frontend' => '',
28
+ 'label' => 'Samples title',
29
+ 'input' => '',
30
+ 'class' => '',
31
+ 'source' => '',
32
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
33
+ 'visible' => false,
34
+ 'required' => true,
35
+ 'user_defined' => false,
36
+ 'default' => '',
37
+ 'searchable' => false,
38
+ 'filterable' => false,
39
+ 'comparable' => false,
40
+ 'visible_on_front' => false,
41
+ 'unique' => false,
42
+ 'apply_to' => 'simple,configurable,virtual,bundle,downloadable',
43
+ 'is_configurable' => false
44
+ ));
45
+
46
+ $installer->endSetup();
app/code/community/Intellimage/Attachs/sql/attachs_setup/mysql4-upgrade-0.1.9-0.1.10.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * NOTICE OF LICENSE
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available through the world-wide-web at this URL:
8
+ * http://opensource.org/licenses/osl-3.0.php
9
+ * If you did not receive a copy of the license and are unable to
10
+ * obtain it through the world-wide-web, please send an email
11
+ * to license@magentocommerce.com so we can send you a copy immediately.
12
+ *
13
+ *
14
+ * @package Intellimage_Attachs
15
+ * @email mauricioprado00@gmail.com
16
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ $installer = $this;
21
+ /* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */
22
+
23
+ $installer->startSetup();
24
+
25
+ $installer->addAttribute('catalog_product', 'samples_title', array(
26
+ 'type' => 'varchar',
27
+ 'backend' => '',
28
+ 'frontend' => '',
29
+ 'label' => 'Samples title',
30
+ 'input' => '',
31
+ 'class' => '',
32
+ 'source' => '',
33
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
34
+ 'visible' => false,
35
+ 'required' => true,
36
+ 'user_defined' => false,
37
+ 'default' => '',
38
+ 'searchable' => false,
39
+ 'filterable' => false,
40
+ 'comparable' => false,
41
+ 'visible_on_front' => false,
42
+ 'unique' => false,
43
+ 'apply_to' => 'simple,configurable,virtual,bundle,downloadable',
44
+ 'is_configurable' => false
45
+ ));
46
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/intellimage_attachs.xml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to license@magentocommerce.com so we can send you a copy immediately.
13
+ *
14
+ *
15
+ * @package Intellimage_Attachs
16
+ * @email mauricioprado00@gmail.com
17
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ -->
21
+ <layout>
22
+
23
+ <adminhtml_catalog_product_configurable>
24
+ <reference name="product_tabs">
25
+ <action method="addTab"><name>downloadable_items</name><block>attachs/adminhtml_catalog_product_edit_tab_downloadable</block></action>
26
+ </reference>
27
+ </adminhtml_catalog_product_configurable>
28
+ <adminhtml_catalog_product_simple>
29
+ <reference name="product_tabs">
30
+ <action method="addTab"><name>downloadable_items</name><block>attachs/adminhtml_catalog_product_edit_tab_downloadable</block></action>
31
+ </reference>
32
+ </adminhtml_catalog_product_simple>
33
+ <adminhtml_catalog_product_virtual>
34
+ <reference name="product_tabs">
35
+ <action method="addTab"><name>downloadable_items</name><block>attachs/adminhtml_catalog_product_edit_tab_downloadable</block></action>
36
+ </reference>
37
+ </adminhtml_catalog_product_virtual>
38
+ <adminhtml_catalog_product_bundle>
39
+ <reference name="product_tabs">
40
+ <action method="addTab"><name>downloadable_items</name><block>attachs/adminhtml_catalog_product_edit_tab_downloadable</block></action>
41
+ </reference>
42
+ </adminhtml_catalog_product_bundle>
43
+ <adminhtml_catalog_product_grouped>
44
+ <reference name="product_tabs">
45
+ <action method="addTab"><name>downloadable_items</name><block>attachs/adminhtml_catalog_product_edit_tab_downloadable</block></action>
46
+ </reference>
47
+ </adminhtml_catalog_product_grouped>
48
+ <!--
49
+ <PRODUCT_TYPE_configurable>
50
+ <reference name="product.composite.fieldset">
51
+ <block type="downloadable/adminhtml_catalog_product_composite_fieldset_downloadable" name="product.composite.fieldset.downloadable" before="product.composite.fieldset.options" template="downloadable/product/composite/fieldset/downloadable.phtml" />
52
+ </reference>
53
+ </PRODUCT_TYPE_configurable>
54
+ -->
55
+ </layout>
app/design/frontend/base/default/layout/intellimage_attachs.xml ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to license@magentocommerce.com so we can send you a copy immediately.
13
+ *
14
+ *
15
+ * @package Intellimage_Attachs
16
+ * @email mauricioprado00@gmail.com
17
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ -->
21
+ <layout version="0.1.0">
22
+ <PRODUCT_TYPE_configurable translate="label" module="downloadable">
23
+ <label>Catalog Product View (Downloadable)</label>
24
+ <reference name="product.info">
25
+ <block type="downloadable/catalog_product_samples" name="other" as="other" template="downloadable/catalog/product/samples.phtml"/>
26
+ <!--
27
+ <block type="downloadable/catalog_product_view_type" name="other" as="other" template="downloadable/catalog/product/type.phtml">
28
+ <block type="downloadable/catalog_product_samples" name="product.info.downloadable.samples" as="samples" template="downloadable/catalog/product/samples.phtml"/>
29
+ </block>
30
+ -->
31
+ </reference>
32
+ <!--
33
+ <reference name="product.info.options.wrapper">
34
+ <block type="downloadable/catalog_product_links" name="product.info.downloadable.options" as="type_downloadable_options" before="-" template="downloadable/catalog/product/links.phtml"/>
35
+ <action method="insert"><block>product.info.downloadable.options</block></action>
36
+ </reference>
37
+ -->
38
+ </PRODUCT_TYPE_configurable>
39
+ <PRODUCT_TYPE_simple translate="label" module="downloadable">
40
+ <label>Catalog Product View (Downloadable)</label>
41
+ <reference name="product.info">
42
+ <block type="downloadable/catalog_product_samples" name="other" as="other" template="downloadable/catalog/product/samples.phtml"/>
43
+ <!--
44
+ <block type="downloadable/catalog_product_view_type" name="other" as="other" template="downloadable/catalog/product/type.phtml">
45
+ <block type="downloadable/catalog_product_samples" name="product.info.downloadable.samples" as="samples" template="downloadable/catalog/product/samples.phtml"/>
46
+ </block>
47
+ -->
48
+ </reference>
49
+ </PRODUCT_TYPE_simple>
50
+ <PRODUCT_TYPE_virtual translate="label" module="downloadable">
51
+ <label>Catalog Product View (Downloadable)</label>
52
+ <reference name="product.info">
53
+ <block type="downloadable/catalog_product_samples" name="other" as="other" template="downloadable/catalog/product/samples.phtml"/>
54
+ <!--
55
+ <block type="downloadable/catalog_product_view_type" name="other" as="other" template="downloadable/catalog/product/type.phtml">
56
+ <block type="downloadable/catalog_product_samples" name="product.info.downloadable.samples" as="samples" template="downloadable/catalog/product/samples.phtml"/>
57
+ </block>
58
+ -->
59
+ </reference>
60
+ </PRODUCT_TYPE_virtual>
61
+ <PRODUCT_TYPE_bundle translate="label" module="downloadable">
62
+ <label>Catalog Product View (Downloadable)</label>
63
+ <reference name="product.info">
64
+ <block type="downloadable/catalog_product_samples" name="other" as="other" template="downloadable/catalog/product/samples.phtml"/>
65
+ <!--
66
+ <block type="downloadable/catalog_product_view_type" name="other" as="other" template="downloadable/catalog/product/type.phtml">
67
+ <block type="downloadable/catalog_product_samples" name="product.info.downloadable.samples" as="samples" template="downloadable/catalog/product/samples.phtml"/>
68
+ </block>
69
+ -->
70
+ </reference>
71
+ </PRODUCT_TYPE_bundle>
72
+ <PRODUCT_TYPE_grouped translate="label" module="downloadable">
73
+ <label>Catalog Product View (Downloadable)</label>
74
+ <reference name="product.info">
75
+ <block type="downloadable/catalog_product_samples" name="other" as="other" template="downloadable/catalog/product/samples.phtml"/>
76
+ <!--
77
+ <block type="downloadable/catalog_product_view_type" name="other" as="other" template="downloadable/catalog/product/type.phtml">
78
+ <block type="downloadable/catalog_product_samples" name="product.info.downloadable.samples" as="samples" template="downloadable/catalog/product/samples.phtml"/>
79
+ </block>
80
+ -->
81
+ </reference>
82
+ </PRODUCT_TYPE_grouped>
83
+ </layout>
app/etc/modules/Intellimage_Attachs.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to license@magentocommerce.com so we can send you a copy immediately.
13
+ *
14
+ *
15
+ * @package Intellimage_Attachs
16
+ * @email mauricioprado00@gmail.com
17
+ * @copyright Copyright (c) 2011 Hugo Mauricio Prado Macat.
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ -->
21
+ <config>
22
+ <modules>
23
+ <Intellimage_Attachs>
24
+ <active>true</active>
25
+ <codePool>community</codePool>
26
+ </Intellimage_Attachs>
27
+ </modules>
28
+ </config>
package.xml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Intellimage_Attachs</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends />
9
+ <summary>Allows to attach files to any kind of products.</summary>
10
+ <description>Allows to attach files to any kind of products, as well it show the file list in the product view.</description>
11
+ <notes>version created at 06/01/2012 by Hugo Mauricio Prado Macat.</notes>
12
+ <authors>
13
+ <author>
14
+ <name>Hugo Mauricio Prado Macat</name>
15
+ <user>mauricioprado00</user>
16
+ <email>mauricioprado00@gmail.com</email>
17
+ </author>
18
+ </authors>
19
+ <date>2012-01-06</date>
20
+ <time>18:05:16</time>
21
+ <contents>
22
+ <target name="mageetc">
23
+ <dir name="modules">
24
+ <file name="Intellimage_Attachs.xml" hash="717cdd6b02930a19d444664426900677" />
25
+ </dir>
26
+ </target>
27
+ <target name="magecommunity">
28
+ <dir name="Intellimage">
29
+ <dir name="Attachs">
30
+ <dir name="Block">
31
+ <dir name="Adminhtml">
32
+ <dir name="Catalog">
33
+ <dir name="Product">
34
+ <dir name="Edit">
35
+ <dir name="Tab">
36
+ <file name="Downloadable.php" hash="cf4c58e3f1a899075ffaa7e09af01490" />
37
+ </dir>
38
+ </dir>
39
+ </dir>
40
+ </dir>
41
+ </dir>
42
+ </dir>
43
+ <dir name="Model">
44
+ <file name="Observer.php" hash="b705dc1ab2f18432e485dcbd8aa9c0c7" />
45
+ <dir name="Product">
46
+ <file name="Type.php" hash="952d415ea75ac025d23d4d9c309e9327" />
47
+ </dir>
48
+ </dir>
49
+ <dir name="etc">
50
+ <file name="config.xml" hash="9942b7fbef67546464e6e41443f3b807" />
51
+ </dir>
52
+ <dir name="sql">
53
+ <dir name="attachs_setup">
54
+ <file name="install-1.6.0.0.php" hash="26ded6d0355fbdc5835cde1d27955ef8" />
55
+ <file name="mysql4-install-1.4.0.0.php" hash="2a0814482de095a16467a75886645202" />
56
+ <file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="3cddaf60cbb59f3a2adbe48e94edf057" />
57
+ </dir>
58
+ </dir>
59
+ </dir>
60
+ </dir>
61
+ </target>
62
+ <target name="magedesign">
63
+ <dir name="frontend">
64
+ <dir name="base">
65
+ <dir name="default">
66
+ <dir name="layout">
67
+ <file name="intellimage_attachs.xml" hash="1cbe5cfc30719af8a2d2de139814eab7" />
68
+ </dir>
69
+ </dir>
70
+ </dir>
71
+ </dir>
72
+ <dir name="adminhtml">
73
+ <dir name="default">
74
+ <dir name="default">
75
+ <dir name="layout">
76
+ <file name="intellimage_attachs.xml" hash="0f18b5a6134b7a41d5b1ad43f104dd37" />
77
+ </dir>
78
+ </dir>
79
+ </dir>
80
+ </dir>
81
+ </target>
82
+ </contents>
83
+ <compatible />
84
+ <dependencies>
85
+ <required>
86
+ <php>
87
+ <min>4.0.0</min>
88
+ </php>
89
+ </required>
90
+ </dependencies>
91
+ </package>