MageWorkshop_DPI - Version 1.0.0

Version Notes

Initial release

Download this release

Release Info

Developer Magento Core Team
Extension MageWorkshop_DPI
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (39) hide show
  1. app/code/local/DV/DPI/Block/Adminhtml/AttributeSets.php +12 -0
  2. app/code/local/DV/DPI/Block/Adminhtml/AttributeSets/Grid.php +57 -0
  3. app/code/local/DV/DPI/Block/Adminhtml/Attributes.php +12 -0
  4. app/code/local/DV/DPI/Block/Adminhtml/Attributes/Grid.php +146 -0
  5. app/code/local/DV/DPI/Block/Adminhtml/Massaction.php +19 -0
  6. app/code/local/DV/DPI/Block/Adminhtml/Render/Checkbox.php +15 -0
  7. app/code/local/DV/DPI/Block/ProductInfo.php +67 -0
  8. app/code/local/DV/DPI/Helper/Data.php +13 -0
  9. app/code/local/DV/DPI/Model/Adminhtml/SaveConfig.php +10 -0
  10. app/code/local/DV/DPI/Model/AttributeList.php +8 -0
  11. app/code/local/DV/DPI/Model/Resource/AttributeList.php +8 -0
  12. app/code/local/DV/DPI/Model/Resource/AttributeList/Collection.php +13 -0
  13. app/code/local/DV/DPI/controllers/Adminhtml/SettingsController.php +72 -0
  14. app/code/local/DV/DPI/controllers/AttributeController.php +9 -0
  15. app/code/local/DV/DPI/etc/adminhtml.xml +50 -0
  16. app/code/local/DV/DPI/etc/config.xml +98 -0
  17. app/code/local/DV/DPI/etc/system.xml +90 -0
  18. app/code/local/DV/DPI/sql/dpi_setup/mysql4-install-1.0.0.php +16 -0
  19. app/design/adminhtml/default/default/layout/dpi.xml +39 -0
  20. app/design/adminhtml/default/default/template/dpi/additional.phtml +12 -0
  21. app/design/adminhtml/default/default/template/dpi/massaction.phtml +13 -0
  22. app/design/frontend/base/default/layout/dpi.xml +132 -0
  23. app/design/frontend/base/default/template/dpi/catalog/product/list.phtml +144 -0
  24. app/design/frontend/base/default/template/dpi/data.phtml +19 -0
  25. app/design/frontend/base/default/template/dpi/list.phtml +27 -0
  26. app/design/frontend/base/default/template/dpi/page.phtml +20 -0
  27. app/etc/modules/DV_DPI.xml +10 -0
  28. app/locale/en_US/DV_DPI.csv +27 -0
  29. js/dpi/list.js +83 -0
  30. js/dpi/page.js +31 -0
  31. package.xml +19 -0
  32. skin/frontend/base/default/css/dpi/style.css +33 -0
  33. skin/frontend/base/default/images/dpi/ajax-loader-tr.gif +0 -0
  34. skin/frontend/base/default/images/dpi/blank.gif +0 -0
  35. skin/frontend/base/default/lib/prototype/windows/themes/magento.css +64 -0
  36. skin/frontend/base/default/lib/prototype/windows/themes/magento/btn_bg.gif +0 -0
  37. skin/frontend/base/default/lib/prototype/windows/themes/magento/content_bg.gif +0 -0
  38. skin/frontend/base/default/lib/prototype/windows/themes/magento/top_bg.gif +0 -0
  39. skin/frontend/base/default/lib/prototype/windows/themes/magento/window_close.png +0 -0
app/code/local/DV/DPI/Block/Adminhtml/AttributeSets.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Block_Adminhtml_AttributeSets extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_blockGroup = 'dpi';
7
+ $this->_controller = 'adminhtml_attributeSets';
8
+ $this->_headerText = $this->__('DPI Attribute Sets');
9
+ parent::__construct();
10
+ $this->_removeButton('add');
11
+ }
12
+ }
app/code/local/DV/DPI/Block/Adminhtml/AttributeSets/Grid.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Block_Adminhtml_AttributeSets_Grid extends Mage_Adminhtml_Block_Widget_Grid
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->setId('attributeSetsGrid');
7
+ $this->setSaveParametersInSession(true);
8
+ $this->setUseAjax(true);
9
+ }
10
+
11
+ public function _prepareCollection()
12
+ {
13
+ $model = Mage::getModel('eav/entity_type');
14
+ $model->getResource()
15
+ ->loadByCode($model, Mage_Catalog_Model_Product::ENTITY);
16
+
17
+ $collection = Mage::getModel('eav/entity_attribute_set')->getCollection();
18
+ $collection->setEntityTypeFilter($model->getId());
19
+ $this->setCollection($collection);
20
+
21
+ return parent::_prepareCollection();
22
+ }
23
+
24
+ public function _prepareColumns()
25
+ {
26
+ $this->addColumn('attribute_set_id', array(
27
+ 'header' => Mage::helper('dpi')->__('ID'),
28
+ 'type' => 'number',
29
+ 'align' => 'left',
30
+ 'filter_index' => 'attribute_set_id',
31
+ 'index' => 'attribute_set_id'
32
+ ));
33
+
34
+ $this->addColumn('attribute_set_name', array(
35
+ 'header' => Mage::helper('dpi')->__('Attribute set'),
36
+ 'align' => 'left',
37
+ 'filter_index' => 'attribute_set_name',
38
+ 'index' => 'attribute_set_name'
39
+ ));
40
+
41
+ return parent::_prepareColumns();
42
+ }
43
+
44
+ public function getRowUrl($attributeSet)
45
+ {
46
+ //return $this->getUrl('*/*/loadAttribute', array(
47
+ return $this->getUrl('*/*/loadAttribute', array(
48
+ 'id' => $attributeSet->getId(),
49
+ ));
50
+ }
51
+
52
+ public function getGridUrl()
53
+ {
54
+ return $this->getUrl('*/*/loadAttributeSetGrid', array('_current'=>true));
55
+ }
56
+
57
+ }
app/code/local/DV/DPI/Block/Adminhtml/Attributes.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Block_Adminhtml_Attributes extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ $this->_blockGroup = 'dpi';
7
+ $this->_controller = 'adminhtml_attributes';
8
+ $this->_headerText = $this->__('DPI Attributes');
9
+ parent::__construct();
10
+ $this->_removeButton('add');
11
+ }
12
+ }
app/code/local/DV/DPI/Block/Adminhtml/Attributes/Grid.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Block_Adminhtml_Attributes_Grid extends Mage_Adminhtml_Block_Widget_Grid
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->setId('attributesGrid');
7
+ $this->setSaveParametersInSession(true);
8
+ $this->setUseAjax(true);
9
+ $this->setDefaultSort('frontend_label');
10
+ $this->setDefaultDir('asc');
11
+ }
12
+
13
+ protected function _prepareCollection()
14
+ {
15
+ $attributeSetId = $this->getRequest()->getParam('id');
16
+ $storeId = $this->getRequest()->getParam('store') ? $this->getRequest()->getParam('store') : 0;
17
+
18
+ $additionalJs = "
19
+ var jsObject = {$this->getJsObjectName()};
20
+ if(jsObject.reloadParams){
21
+ jsObject.reloadParams.id = {$attributeSetId};
22
+ } else
23
+ {
24
+ jsObject.reloadParams = {id: {$attributeSetId}};
25
+ }
26
+ ";
27
+ $this->setAdditionalJavaScript($additionalJs);
28
+
29
+ $collection = Mage::getModel('eav/entity_attribute')->getCollection();
30
+ $collection->setAttributeSetFilter(array($attributeSetId));
31
+ $collection->getSelect()->reset(Zend_Db_Select::GROUP);
32
+
33
+ $collection->getSelect()
34
+ ->joinLeft(array('dal' => $collection->getTable('dpi/attributeList')),
35
+ "main_table.attribute_id=dal.attribute_id AND dal.store_id=$storeId AND dal.attribute_set_id=$attributeSetId",
36
+ array('IFNULL(dal.attribute_id, 0) as attr_enabled'))
37
+ ->where('main_table.frontend_label IS NOT NULL AND main_table.frontend_label!=""');
38
+
39
+
40
+ $this->setCollection($collection);
41
+
42
+ return parent::_prepareCollection();
43
+ }
44
+
45
+ protected function _prepareColumns()
46
+ {
47
+ $this->addColumn('chk_attribute', array(
48
+ 'header' => Mage::helper('dpi')->__('Yes/No'),
49
+ 'align' => 'center',
50
+ 'filter' => false,
51
+ 'width' => '30px',
52
+ 'index' => 'attr_enabled',
53
+ 'inline_css' => 'class="selected-values"',
54
+ 'renderer' => 'dpi/adminhtml_render_checkbox'
55
+ ));
56
+
57
+ $this->addColumn('attribute_id', array(
58
+ 'header' => Mage::helper('dpi')->__('ID'),
59
+ 'type' =>'number',
60
+ 'align' => 'center',
61
+ 'filter_index' => 'main_table.attribute_id',
62
+ 'index' => 'attribute_id'
63
+ ));
64
+
65
+ $this->addColumn('frontend_label', array(
66
+ 'header' => Mage::helper('dpi')->__('Attribute'),
67
+ 'align' => 'left',
68
+ 'sortable' => true,
69
+ 'filter_index' => 'frontend_label',
70
+ 'index' => 'frontend_label'
71
+ ));
72
+
73
+ return parent::_prepareColumns();
74
+ }
75
+
76
+ protected function _prepareMassactionBlock()
77
+ {
78
+ $this->setChild('massaction', $this->getLayout()->createBlock('dpi/adminhtml_massaction'));
79
+ return $this;
80
+ }
81
+
82
+
83
+ protected function _prepareLayout()
84
+ {
85
+ $url = (string) $this->getUrl('dpi/settings/saveSettings', array('_current'=>true));
86
+ $onClick = "
87
+ if(!confirm('{$this->__('Save attributes settings?')}')){
88
+ return;
89
+ }
90
+ var chk = [];
91
+ var unchk = [];
92
+ $$('.selected-values').each(function(item) {
93
+ if (item.checked){
94
+ chk.push(item.value);
95
+ } else
96
+ {
97
+ unchk.push(item.value);
98
+ }
99
+ });
100
+ var jsObject = {$this->getJsObjectName()};
101
+ if(chk.length || unchk.length) {
102
+ if(jsObject.reloadParams) {
103
+ jsObject.reloadParams.checked = chk.join();
104
+ jsObject.reloadParams.unchecked = unchk.join();
105
+ } else {
106
+ jsObject.reloadParams = { checked: chk.join(), unchecked: unchk.join() };
107
+ }
108
+ }
109
+ jsObject.reload('{$url}');
110
+ ";
111
+
112
+ $this->setChild('submit_button',
113
+ $this->getLayout()->createBlock('adminhtml/widget_button')
114
+ ->setData(array(
115
+ 'label' => Mage::helper('adminhtml')->__('Save Changes'),
116
+ 'onclick' => $onClick,
117
+ 'class' => 'task'
118
+ ))
119
+ );
120
+
121
+ return parent::_prepareLayout();
122
+ }
123
+
124
+ public function getSubmitButtonHtml()
125
+ {
126
+ return $this->getChildHtml('submit_button');
127
+ }
128
+
129
+ public function getMainButtonsHtml()
130
+ {
131
+ $html = parent::getMainButtonsHtml();
132
+ $html .= $this->getSubmitButtonHtml();
133
+ return $html;
134
+ }
135
+
136
+ public function getGridUrl()
137
+ {
138
+ return $this->getUrl('*/*/loadAttributeGrid', array('_current'=>true));
139
+ }
140
+
141
+ protected function _toHtml()
142
+ {
143
+ return parent::_toHtml() . $this->getChildHtml('additional_js');
144
+ }
145
+
146
+ }
app/code/local/DV/DPI/Block/Adminhtml/Massaction.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Block_Adminhtml_Massaction extends Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract
3
+ {
4
+
5
+ public function __construct()
6
+ {
7
+ return $this->setTemplate('dpi/massaction.phtml');
8
+ }
9
+
10
+ public function isAvailable()
11
+ {
12
+ return true;
13
+ }
14
+
15
+ public function getJavaScript()
16
+ {
17
+ return false;
18
+ }
19
+ }
app/code/local/DV/DPI/Block/Adminhtml/Render/Checkbox.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Block_Adminhtml_Render_Checkbox extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $checked = $row->getData('attr_enabled') ? ' checked="checked"' : '';
7
+ $html = sprintf('<input type="checkbox" name="%s" value="%s" %s%s />',
8
+ $this->getColumn()->getFieldName(),
9
+ $this->escapeHtml($row->getId()),
10
+ $this->getColumn()->getInlineCss(),
11
+ $checked
12
+ );
13
+ return $html;
14
+ }
15
+ }
app/code/local/DV/DPI/Block/ProductInfo.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Block_ProductInfo extends Mage_Core_Block_Template
3
+ {
4
+
5
+ // protected $_attributeSetSettings = array() ;
6
+
7
+ public function getAttributesList($productId = false, $store = false)
8
+ {
9
+ if(!$productId) {
10
+ $productId = $this->getRequest()->getParam('id');
11
+ }
12
+ $product = Mage::getModel('catalog/product')->load($productId);
13
+ $data = array();
14
+ if ($product->getId()) {
15
+ $attributeSetId = $product->getAttributeSetId();
16
+ // if(array_key_exists($attributeSetId, $this->_attributeSetSettings)) {
17
+ // return $this->_attributeSetSettings[$attributeSetId];
18
+ // }
19
+ $checkedAttributes = $this->getCheckedAttributes($attributeSetId, $store);
20
+ foreach ($product->getAttributes() as $attribute){
21
+ if (in_array($attribute->getAttributeId(), $checkedAttributes) && $html = $this->getAttributeHtml($product, $attribute)) {
22
+ $data[$attribute->getStoreLabel()] = $html;
23
+ }
24
+ }
25
+ // $this->_attributeSetSettings[$attributeSetId] = $data;
26
+ }
27
+ return $data;
28
+ }
29
+
30
+ public function getCheckedAttributes($attributeSetId, $store = false)
31
+ {
32
+ $collection = Mage::getModel('dpi/attributeList')->getCollection();
33
+
34
+ $collection->addFieldToFilter('store_id',$store? $store: Mage::app()->getStore()->getId())
35
+ ->addFieldToFilter('attribute_set_id', $attributeSetId);
36
+ if (!$collection->getSize()) {
37
+ $collection->reset()
38
+ ->addFieldToFilter('store_id', 0)
39
+ ->addFieldToFilter('attribute_set_id', $attributeSetId);
40
+ }
41
+ $ids = array();
42
+ foreach ($collection as $attribute) {
43
+ $ids[] = $attribute->getAttributeId();
44
+ }
45
+ return $ids;
46
+ }
47
+
48
+ public function getAttributeHtml($product, $attribute)
49
+ {
50
+ $attrValue = $attribute->getFrontend()->getValue($product);
51
+ if($attribute->getFrontendInput() != 'media_image') {
52
+ if ($attribute->getFrontendInput() == 'price') {
53
+ $attributeHtml = Mage::helper('core')->currency($attrValue);
54
+ } elseif ($attribute->getFrontendInput() == 'textarea') {
55
+ $attributeHtml = $attrValue;
56
+ } else {
57
+ $attributeHtml = $this->escapeHtml($attrValue);
58
+ }
59
+ } else {
60
+ $label = $product->getName();
61
+ $attributeHtml =
62
+ '<img id="image" src="'.Mage::helper('catalog/image')->init($product, $attribute->getAttributeCode()).'" width="125" alt="'.strip_tags($label).'" title="'.strip_tags($label).'" />';
63
+ }
64
+ return $attributeHtml;
65
+ }
66
+
67
+ }
app/code/local/DV/DPI/Helper/Data.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ const XML_PATH_ENABLED = 'enabled';
5
+ const XML_PATH_PRODUCT_PAGE = 'product_page';
6
+ const XML_PATH_USE_MODAL = 'use_modal';
7
+ const XML_PATH_USE_AJAX = 'use_ajax';
8
+
9
+ public function getStoreConfig($config)
10
+ {
11
+ return Mage::getStoreConfig('dpi/general/' . $config);
12
+ }
13
+ }
app/code/local/DV/DPI/Model/Adminhtml/SaveConfig.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Model_Adminhtml_SaveConfig extends Mage_Core_Model_Config_Data
3
+ {
4
+ public function _beforeSave()
5
+ {
6
+ if(!$this->getValue()) {
7
+ Mage::getModel("core/config")->saveConfig('dpi/general/template_override', '0');
8
+ }
9
+ }
10
+ }
app/code/local/DV/DPI/Model/AttributeList.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Model_AttributeList extends Mage_Core_Model_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init('dpi/attributeList');
7
+ }
8
+ }
app/code/local/DV/DPI/Model/Resource/AttributeList.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Model_Resource_AttributeList extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init('dpi/attributeList','list_id');
7
+ }
8
+ }
app/code/local/DV/DPI/Model/Resource/AttributeList/Collection.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Model_Resource_AttributeList_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
+ {
4
+ protected function _construct()
5
+ {
6
+ $this->_init('dpi/attributeList');
7
+ }
8
+
9
+ public function reset()
10
+ {
11
+ return $this->_reset();
12
+ }
13
+ }
app/code/local/DV/DPI/controllers/Adminhtml/SettingsController.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_Adminhtml_SettingsController extends Mage_Adminhtml_Controller_Action
3
+ {
4
+ protected $_activeMenu = false;
5
+
6
+ public function indexAction()
7
+ {
8
+ $this->_title($this->__('Attribute Sets List'));
9
+ $this->_activeMenu = 'catalog';
10
+ }
11
+
12
+ public function loadAttributeSetGridAction() {}
13
+
14
+ public function containerAction() {}
15
+
16
+ public function loadAttributeAction()
17
+ {
18
+ $this->_title($this->__('Attributes List'));
19
+ $this->_activeMenu = 'catalog';
20
+ }
21
+
22
+ public function loadAttributeGridAction() {}
23
+
24
+ public function saveSettingsAction()
25
+ {
26
+ $session = Mage::getSingleton('adminhtml/session');
27
+ $attributeSetId = $this->getRequest()->getParam('id');
28
+ $storeId = $this->getRequest()->getParam('store')? $this->getRequest()->getParam('store') : 0;
29
+
30
+ $checked = $this->getRequest()->getParam('checked')? explode(',', $this->getRequest()->getParam('checked')) : array();
31
+ $unchecked = $this->getRequest()->getParam('unchecked')? explode(',', $this->getRequest()->getParam('unchecked')) : array();
32
+
33
+ //get object for delete
34
+ $modelAttrList = Mage::getModel('dpi/attributeList');
35
+ $attrDeleteCollection = $modelAttrList->getCollection();
36
+ $attrDeleteCollection
37
+ ->addFieldToFilter('attribute_id', array('in' => array_merge($checked, $unchecked)))
38
+ ->addFieldToFilter('store_id', array('eq' => $storeId))
39
+ ->addFieldToFilter('attribute_set_id', array('eq' => $attributeSetId));
40
+ try
41
+ {
42
+ foreach ($attrDeleteCollection as $object) {
43
+ $object->delete();
44
+ }
45
+
46
+ //insert
47
+ $model = Mage::getModel('dpi/attributeList');
48
+ foreach ($checked as $attributeId) {
49
+ $model->setData(array(
50
+ 'attribute_id' => $attributeId,
51
+ 'store_id' => $storeId,
52
+ 'attribute_set_id' => $attributeSetId
53
+ ));
54
+ $model->save();
55
+ }
56
+ $session->addSuccess(Mage::helper('dpi')->__('The attribute settings has been saved.'));
57
+ } catch (Exception $e) {
58
+ $session->addError($e->getMessage());
59
+ }
60
+ }
61
+
62
+ public function postDispatch()
63
+ {
64
+ $this->loadLayout();
65
+ if($this->_activeMenu) {
66
+ $this->_setActiveMenu($this->_activeMenu);
67
+ }
68
+ $this->renderLayout();
69
+ parent::postDispatch();
70
+ }
71
+
72
+ }
app/code/local/DV/DPI/controllers/AttributeController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class DV_DPI_AttributeController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+ }
app/code/local/DV/DPI/etc/adminhtml.xml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <catalog>
5
+ <children>
6
+ <attributes>
7
+ <children>
8
+ <dpi translate="title" module="dpi">
9
+ <title>Detailed Product Info</title>
10
+ <sort_order>107</sort_order>
11
+ <action>dpi/settings</action>
12
+ </dpi>
13
+ </children>
14
+ </attributes>
15
+ </children>
16
+ </catalog>
17
+ </menu>
18
+ <acl>
19
+ <resources>
20
+ <admin>
21
+ <children>
22
+ <catalog>
23
+ <children>
24
+ <attributes>
25
+ <children>
26
+ <dpi translate="title" module="dpi">
27
+ <title>DPI</title>
28
+ </dpi>
29
+ </children>
30
+ </attributes>
31
+ </children>
32
+ </catalog>
33
+ <system>
34
+ <children>
35
+ <config>
36
+ <children>
37
+ <dpi translate="title" module="dpi">
38
+ <title>Detailed Product Info</title>
39
+ <sort_order>100</sort_order>
40
+ </dpi>
41
+ </children>
42
+ </config>
43
+ </children>
44
+ </system>
45
+
46
+ </children>
47
+ </admin>
48
+ </resources>
49
+ </acl>
50
+ </config>
app/code/local/DV/DPI/etc/config.xml ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <DV_DPI>
5
+ <version>1.0.0</version>
6
+ </DV_DPI>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <dpi>
11
+ <class>DV_DPI_Model</class>
12
+ <resourceModel>dpi_resource</resourceModel>
13
+ </dpi>
14
+ <dpi_resource>
15
+ <class>DV_DPI_Model_Resource</class>
16
+ <entities>
17
+ <attributeList>
18
+ <table>dpi_attribute_list</table>
19
+ </attributeList>
20
+ </entities>
21
+ </dpi_resource>
22
+ </models>
23
+ <blocks>
24
+ <dpi>
25
+ <class>DV_DPI_Block</class>
26
+ </dpi>
27
+ </blocks>
28
+ <helpers>
29
+ <dpi>
30
+ <class>DV_DPI_Helper</class>
31
+ </dpi>
32
+ </helpers>
33
+ <resources>
34
+ <dpi_setup>
35
+ <setup>
36
+ <module>DV_DPI</module>
37
+ <class>Mage_Core_Model_Resource_Setup</class>
38
+ </setup>
39
+ </dpi_setup>
40
+ </resources>
41
+ </global>
42
+ <frontend>
43
+ <routers>
44
+ <dpi>
45
+ <use>standard</use>
46
+ <args>
47
+ <module>DV_DPI</module>
48
+ <frontName>dpi</frontName>
49
+ </args>
50
+ </dpi>
51
+ </routers>
52
+ <layout>
53
+ <updates>
54
+ <dpi>
55
+ <file>dpi.xml</file>
56
+ </dpi>
57
+ </updates>
58
+ </layout>
59
+ <translate>
60
+ <modules>
61
+ <DV_DPI>
62
+ <files>
63
+ <default>DV_DPI.csv</default>
64
+ </files>
65
+ </DV_DPI>
66
+ </modules>
67
+ </translate>
68
+ </frontend>
69
+ <adminhtml>
70
+ <layout>
71
+ <updates>
72
+ <dpi>
73
+ <file>dpi.xml</file>
74
+ </dpi>
75
+ </updates>
76
+ </layout>
77
+ <translate>
78
+ <modules>
79
+ <DV_DPI>
80
+ <files>
81
+ <default>DV_DPI.csv</default>
82
+ </files>
83
+ </DV_DPI>
84
+ </modules>
85
+ </translate>
86
+ </adminhtml>
87
+ <admin>
88
+ <routers>
89
+ <dpi>
90
+ <use>admin</use>
91
+ <args>
92
+ <module>DV_DPI_Adminhtml</module>
93
+ <frontName>dpi</frontName>
94
+ </args>
95
+ </dpi>
96
+ </routers>
97
+ </admin>
98
+ </config>
app/code/local/DV/DPI/etc/system.xml ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <dv module="dpi" translate="label">
5
+ <label>Mage Workshop</label>
6
+ <sort_order>200</sort_order>
7
+ </dv>
8
+ </tabs>
9
+ <sections>
10
+ <dpi module="dpi" translate="label">
11
+ <label>Detailed Product Info</label>
12
+ <sort_order>300</sort_order>
13
+ <show_in_default>1</show_in_default>
14
+ <show_in_website>1</show_in_website>
15
+ <show_in_store>1</show_in_store>
16
+ <tab>dv</tab>
17
+ <groups>
18
+ <general translate="label">
19
+ <label>Settings</label>
20
+ <sort_order>300</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <fields>
25
+ <enabled translate="label">
26
+ <label>Enabled</label>
27
+ <sort_order>10</sort_order>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>1</show_in_store>
31
+ <frontend_type>select</frontend_type>
32
+ <source_model>adminhtml/system_config_source_yesno</source_model>
33
+ </enabled>
34
+ <product_page translate="label comment">
35
+ <label>Display on Product Page</label>
36
+ <comment>Display selected attributes on Product Page</comment>
37
+ <sort_order>20</sort_order>
38
+ <show_in_default>1</show_in_default>
39
+ <show_in_website>1</show_in_website>
40
+ <show_in_store>1</show_in_store>
41
+ <frontend_type>select</frontend_type>
42
+ <source_model>adminhtml/system_config_source_yesno</source_model>
43
+ </product_page>
44
+ <use_modal translate="label comment">
45
+ <label>Use Modal Window</label>
46
+ <comment>If "Yes" - modal dialog is used to display attributes, otherwise attributes will be displayed as plain HTML</comment>
47
+ <sort_order>30</sort_order>
48
+ <show_in_default>1</show_in_default>
49
+ <show_in_website>1</show_in_website>
50
+ <show_in_store>1</show_in_store>
51
+ <frontend_type>select</frontend_type>
52
+ <source_model>adminhtml/system_config_source_yesno</source_model>
53
+ </use_modal>
54
+ <product_list translate="label comment">
55
+ <label>Display in Product Lists</label>
56
+ <comment>Display selected attributes in product lists (category, search, tagged products)</comment>
57
+ <sort_order>40</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>1</show_in_store>
61
+ <frontend_type>select</frontend_type>
62
+ <backend_model>DV_DPI_Model_Adminhtml_SaveConfig</backend_model>
63
+ <source_model>adminhtml/system_config_source_yesno</source_model>
64
+ </product_list>
65
+ <template_override translate="label">
66
+ <label>Allow Product List Template Override</label>
67
+ <depends><product_list>1</product_list></depends>
68
+ <sort_order>50</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ <frontend_type>select</frontend_type>
73
+ <source_model>adminhtml/system_config_source_yesno</source_model>
74
+ </template_override>
75
+ <use_ajax translate="label">
76
+ <label>Use AJAX on Product List</label>
77
+ <depends><product_list>1</product_list></depends>
78
+ <sort_order>60</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>1</show_in_store>
82
+ <frontend_type>select</frontend_type>
83
+ <source_model>adminhtml/system_config_source_yesno</source_model>
84
+ </use_ajax>
85
+ </fields>
86
+ </general>
87
+ </groups>
88
+ </dpi>
89
+ </sections>
90
+ </config>
app/code/local/DV/DPI/sql/dpi_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->run("
5
+ CREATE TABLE IF NOT EXISTS `{$installer->getTable('dpi/attributeList')}` (
6
+ `list_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
7
+ `attribute_id` smallint(5) unsigned NOT NULL,
8
+ `attribute_set_id` smallint(5) unsigned NOT NULL,
9
+ `store_id` smallint(5) unsigned NOT NULL,
10
+ PRIMARY KEY (`list_id`),
11
+ CONSTRAINT `FK_DPI_CORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
12
+ CONSTRAINT `FK_DPI_EAV_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
13
+ CONSTRAINT `FK_DPI_EAV_ATTRIBUTE_SET` FOREIGN KEY (`attribute_set_id`) REFERENCES `eav_attribute_set` (`attribute_set_id`) ON DELETE CASCADE ON UPDATE CASCADE
14
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
15
+ ");
16
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/dpi.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <dpi_settings_index>
4
+ <reference name="content">
5
+ <block type="dpi/adminhtml_attributeSets" name="dpi.loadAttributeSets"/>
6
+ </reference>
7
+ </dpi_settings_index>
8
+
9
+ <dpi_settings_loadattributesetgrid>
10
+ <block type="adminhtml/text_list" name="root" output="toHtml">
11
+ <block type="dpi/adminhtml_attributeSets_grid" name="dpi.attributeSetsGrid"/>
12
+ </block>
13
+ </dpi_settings_loadattributesetgrid>
14
+
15
+ <dpi_settings_loadattribute>
16
+ <reference name="content">
17
+ <block type="adminhtml/store_switcher" name="store_switcher" as="store_switcher">
18
+ <action method="setUseConfirm">
19
+ <params>0</params>
20
+ </action>
21
+ </block>
22
+ <block type="dpi/adminhtml_attributes" name="dpi.loadAttribute"/>
23
+ <block type="adminhtml/template" name="additional_js" template="dpi/additional.phtml"/>
24
+ </reference>
25
+ </dpi_settings_loadattribute>
26
+
27
+ <dpi_settings_loadattributegrid>
28
+ <block type="adminhtml/text_list" name="root" output="toHtml">
29
+ <block type="dpi/adminhtml_attributes_grid" name="dpi.attributeGrid">
30
+ <block type="adminhtml/template" name="additional_js" template="dpi/additional.phtml"/>
31
+ </block>
32
+ </block>
33
+ </dpi_settings_loadattributegrid>
34
+
35
+ <dpi_settings_savesettings>
36
+ <update handle="dpi_settings_loadattributegrid"/>
37
+ </dpi_settings_savesettings>
38
+
39
+ </layout>
app/design/adminhtml/default/default/template/dpi/additional.phtml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript">
2
+ $$('.attr-select').invoke("observe","click",function(){
3
+ $$('.selected-values').each(function(item){
4
+ item.checked = "checked";
5
+ });
6
+ });
7
+ $$('.attr-unselect').invoke("observe","click",function(){
8
+ $$('.selected-values').each(function(item){
9
+ item.checked = "";
10
+ });
11
+ });
12
+ </script>
app/design/adminhtml/default/default/template/dpi/massaction.phtml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="<?php echo $this->getHtmlId() ?>">
2
+ <table cellspacing="0" cellpadding="0" class="massaction">
3
+ <tr>
4
+ <td>
5
+ <a href="#" class="attr-select" onclick="return false; "><?php echo $this->__('Select Visible') ?></a>
6
+ <span class="separator">|</span>
7
+ <a href="#" class="attr-unselect" onclick="return false "><?php echo $this->__('Unselect Visible') ?></a>
8
+ <span class="separator">|</span>
9
+ </td>
10
+ </tr>
11
+ </table>
12
+ </div>
13
+
app/design/frontend/base/default/layout/dpi.xml ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+
4
+ <dpi_attribute_index>
5
+ <block type="dpi/productInfo" name="root" template="dpi/data.phtml"/>
6
+ </dpi_attribute_index>
7
+
8
+ <catalog_product_view>
9
+ <reference name="head">
10
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>prototype/window.js</script></action>
11
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>dpi/page.js</script></action>
12
+ <action method="addItem" ifconfig="dpi/general/enabled"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
13
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>lib/prototype/windows/themes/magento.css</name></action>
14
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>css/dpi/style.css</name></action>
15
+ </reference>
16
+ <reference name="product.info.additional">
17
+ <block type="dpi/productInfo" name="dpi.productInfo" before="product_tag_list">
18
+ <action method="setTemplate" ifconfig="dpi/general/product_page">
19
+ <template>dpi/page.phtml</template>
20
+ </action>
21
+ </block>
22
+ </reference>
23
+ </catalog_product_view>
24
+
25
+ <catalog_category_default>
26
+ <reference name="head">
27
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>prototype/window.js</script></action>
28
+ <action method="addItem" ifconfig="dpi/general/enabled"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
29
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>lib/prototype/windows/themes/magento.css</name></action>
30
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>dpi/list.js</script></action>
31
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>css/dpi/style.css</name></action>
32
+ </reference>
33
+ <reference name="product_list">
34
+ <action method="setTemplate" ifconfig="dpi/general/template_override">
35
+ <template>dpi/catalog/product/list.phtml</template>
36
+ </action>
37
+ <block type="dpi/productInfo" name="dpi.productInfo">
38
+ <action method="setTemplate" ifconfig="dpi/general/product_list">
39
+ <template>dpi/list.phtml</template>
40
+ </action>
41
+ </block>
42
+ </reference>
43
+ </catalog_category_default>
44
+
45
+ <catalog_category_layered>
46
+ <reference name="head">
47
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>prototype/window.js</script></action>
48
+ <action method="addItem" ifconfig="dpi/general/enabled"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
49
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>lib/prototype/windows/themes/magento.css</name></action>
50
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>dpi/list.js</script></action>
51
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>css/dpi/style.css</name></action>
52
+ </reference>
53
+ <reference name="product_list">
54
+ <action method="setTemplate" ifconfig="dpi/general/template_override">
55
+ <template>dpi/catalog/product/list.phtml</template>
56
+ </action>
57
+ <block type="dpi/productInfo" name="dpi.productInfo">
58
+ <action method="setTemplate" ifconfig="dpi/general/product_list">
59
+ <template>dpi/list.phtml</template>
60
+ </action>
61
+ </block>
62
+ </reference>
63
+ </catalog_category_layered>
64
+
65
+ <catalogsearch_advanced_index>
66
+ <reference name="head">
67
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>prototype/window.js</script></action>
68
+ <action method="addItem" ifconfig="dpi/general/enabled"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
69
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>lib/prototype/windows/themes/magento.css</name></action>
70
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>dpi/list.js</script></action>
71
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>css/dpi/style.css</name></action>
72
+ </reference>
73
+ <reference name="search_result_list">
74
+ <action method="setTemplate" ifconfig="dpi/general/template_override">
75
+ <template>dpi/catalog/product/list.phtml</template>
76
+ </action>
77
+ <block type="dpi/productInfo" name="dpi.productInfo">
78
+ <action method="setTemplate" ifconfig="dpi/general/product_list">
79
+ <template>dpi/list.phtml</template>
80
+ </action>
81
+ </block>
82
+ </reference>
83
+ </catalogsearch_advanced_index>
84
+
85
+ <catalogsearch_result_index>
86
+ <reference name="head">
87
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>prototype/window.js</script></action>
88
+ <action method="addItem" ifconfig="dpi/general/enabled"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
89
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>lib/prototype/windows/themes/magento.css</name></action>
90
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>dpi/list.js</script></action>
91
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>css/dpi/style.css</name></action>
92
+ </reference>
93
+ <reference name="search_result_list">
94
+ <action method="setTemplate" ifconfig="dpi/general/template_override"><template>dpi/catalog/product/list.phtml</template></action>
95
+ <block type="dpi/productInfo" name="dpi.productInfo">
96
+ <action method="setTemplate" ifconfig="dpi/general/product_list"><template>dpi/list.phtml</template></action>
97
+ </block>
98
+ </reference>
99
+ </catalogsearch_result_index>
100
+
101
+ <catalogsearch_advanced_result>
102
+ <reference name="head">
103
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>prototype/window.js</script></action>
104
+ <action method="addItem" ifconfig="dpi/general/enabled"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
105
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>lib/prototype/windows/themes/magento.css</name></action>
106
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>dpi/list.js</script></action>
107
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>css/dpi/style.css</name></action>
108
+ </reference>
109
+ <reference name="search_result_list">
110
+ <action method="setTemplate" ifconfig="dpi/general/template_override"><template>dpi/catalog/product/list.phtml</template></action>
111
+ <block type="dpi/productInfo" name="dpi.productInfo">
112
+ <action method="setTemplate" ifconfig="dpi/general/product_list"><template>dpi/list.phtml</template></action>
113
+ </block>
114
+ </reference>
115
+ </catalogsearch_advanced_result>
116
+
117
+ <tag_product_list>
118
+ <reference name="head">
119
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>prototype/window.js</script></action>
120
+ <action method="addItem" ifconfig="dpi/general/enabled"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
121
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>lib/prototype/windows/themes/magento.css</name></action>
122
+ <action method="addJs" ifconfig="dpi/general/enabled"><script>dpi/list.js</script></action>
123
+ <action method="addCss" ifconfig="dpi/general/enabled"><name>css/dpi/style.css</name> </action>
124
+ </reference>
125
+ <reference name="search_result_list">
126
+ <action method="setTemplate" ifconfig="dpi/general/template_override"><template>dpi/catalog/product/list.phtml</template></action>
127
+ <block type="dpi/productInfo" name="dpi.productInfo">
128
+ <action method="setTemplate" ifconfig="dpi/general/product_list"><template>dpi/list.phtml</template></action>
129
+ </block>
130
+ </reference>
131
+ </tag_product_list>
132
+ </layout>
app/design/frontend/base/default/template/dpi/catalog/product/list.phtml ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Product list template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+ $_productCollection=$this->getLoadedProductCollection();
36
+ $_helper = $this->helper('catalog/output');
37
+ ?>
38
+ <?php if(!$_productCollection->count()): ?>
39
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
40
+ <?php else: ?>
41
+ <div class="category-products">
42
+ <?php echo $this->getToolbarHtml() ?>
43
+ <?php // List mode ?>
44
+ <?php if($this->getMode()!='grid'): ?>
45
+ <?php $_iterator = 0; ?>
46
+ <ol class="products-list" id="products-list">
47
+ <?php foreach ($_productCollection as $_product): ?>
48
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
49
+ <?php // Product Image ?>
50
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->getImageLabel($_product, 'small_image') ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->getImageLabel($_product, 'small_image') ?>" /></a>
51
+ <?php // Product description ?>
52
+ <div class="product-shop">
53
+ <div class="f-fix">
54
+ <?php $_productNameStripped = $_product->getName(); ?>
55
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
56
+ <?php if($_product->getRatingSummary()): ?>
57
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
58
+ <?php endif; ?>
59
+ <?php echo $this->getPriceHtml($_product, true) ?>
60
+ <?php if($_product->isSaleable()): ?>
61
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
62
+ <?php else: ?>
63
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
64
+ <?php endif; ?>
65
+ <div class="desc std">
66
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
67
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
68
+ </div>
69
+ <ul class="add-to-links">
70
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
71
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
72
+ <?php endif; ?>
73
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
74
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
75
+ <?php endif; ?>
76
+ <?php echo ($child = $this->getChild('dpi.productInfo')) ? $child->setProduct($_product)->toHtml() : ''; ?>
77
+ </ul>
78
+ </div>
79
+ </div>
80
+ </li>
81
+ <?php endforeach; ?>
82
+ </ol>
83
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
84
+
85
+ <?php else: ?>
86
+
87
+ <?php // Grid Mode ?>
88
+
89
+ <?php $_collectionSize = $_productCollection->count() ?>
90
+ <?php $_columnCount = $this->getColumnCount(); ?>
91
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
92
+ <?php if ($i++%$_columnCount==0): ?>
93
+ <ul class="products-grid">
94
+ <?php endif ?>
95
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
96
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->getImageLabel($_product, 'small_image') ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->getImageLabel($_product, 'small_image') ?>" /></a>
97
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_product->getName(); ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
98
+ <?php if($_product->getRatingSummary()): ?>
99
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
100
+ <?php endif; ?>
101
+ <?php echo $this->getPriceHtml($_product, true) ?>
102
+ <div class="actions">
103
+ <?php if($_product->isSaleable()): ?>
104
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
105
+ <?php else: ?>
106
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
107
+ <?php endif; ?>
108
+ <ul class="add-to-links">
109
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
110
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
111
+ <?php endif; ?>
112
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
113
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
114
+ <?php endif; ?>
115
+ <?php echo ($child = $this->getChild('dpi.productInfo')) ? $child->setProduct($_product)->toHtml() : ''; ?>
116
+ </ul>
117
+ </div>
118
+ </li>
119
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
120
+ </ul>
121
+ <?php endif ?>
122
+ <?php endforeach ?>
123
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
124
+ <?php endif; ?>
125
+
126
+ <div class="toolbar-bottom">
127
+ <?php echo $this->getToolbarHtml() ?>
128
+ </div>
129
+ </div>
130
+ <?php if($this->helper('dpi')->getStoreConfig(DV_DPI_Helper_Data::XML_PATH_USE_AJAX)): ?>
131
+ <div id="loading-mask" style="display:none">
132
+ <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('images/dpi/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('adminhtml')->__('Loading...') ?>"/><br/><?php echo Mage::helper('adminhtml')->__('Please wait...') ?></p>
133
+ </div>
134
+ <?php endif; ?>
135
+ <!--[if lte IE 7]>
136
+ <script type="text/javascript">
137
+ var zIndexNumber = 1000;
138
+ $$(".products-grid").each(function(e) {
139
+ e.setStyle({ zIndex: zIndexNumber });
140
+ zIndexNumber -= 10;
141
+ });
142
+ </script>
143
+ <![endif]-->
144
+ <?php endif; ?>
app/design/frontend/base/default/template/dpi/data.phtml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $productId = str_replace('/', '', $this->getRequest()->getParam('id')); ?>
2
+ <?php $storeId = str_replace('/', '', $this->getRequest()->getParam('store')); ?>
3
+ <?php if(($attributes = $this->getAttributesList($productId, $storeId)) && $this->helper('dpi')->getStoreConfig(DV_DPI_Helper_Data::XML_PATH_ENABLED)):?>
4
+ <ul class="attr-wrapper">
5
+ <li id="product-attr-<?php echo $productId; ?>" class="attr-table" style="display: none; ">
6
+ <table class="data-table">
7
+ <?php $iterator = 0; ?>
8
+ <?php foreach ($attributes as $label => $html): ?>
9
+ <?php if(!is_array($html)): ?>
10
+ <tr <?php if($iterator % 2 == 0): echo 'class="odd"'; else: echo 'class="even"'; endif; $iterator++;?>>
11
+ <th class="label"><?php echo $label; ?></th>
12
+ <td class="data"><?php echo nl2br($html, true); ?></td>
13
+ </tr>
14
+ <?php endif;?>
15
+ <?php endforeach; ?>
16
+ </table>
17
+ </li>
18
+ </ul>
19
+ <?php endif;?>
app/design/frontend/base/default/template/dpi/list.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $productId = $this->getProduct()->getId(); ?>
2
+ <?php $useAjax = $this->helper('dpi')->getStoreConfig(DV_DPI_Helper_Data::XML_PATH_USE_AJAX); ?>
3
+ <?php $useModal = $this->helper('dpi')->getStoreConfig(DV_DPI_Helper_Data::XML_PATH_USE_MODAL); ?>
4
+ <?php $storeId = Mage::app()->getStore()->getId(); ?>
5
+ <?php if(($attributes = $this->getAttributesList($productId)) && $this->helper('dpi')->getStoreConfig(DV_DPI_Helper_Data::XML_PATH_ENABLED)):?>
6
+ <li>
7
+ <span class="separator">|</span>
8
+ <a id="<?php echo 'attr-'.$productId; ?>" class="show-attribute link-compare <?php if($useModal): echo 'dpi-modal" '; else: echo 'dpi-toggle" '; endif; ?> onclick="return false;" href="<?php echo $this->getUrl('dpi/attribute/index?id='.$productId.'&ajax='.$useAjax.'&modal='.$useModal.'&store='.$storeId); ?>" title="<?php echo $this->__("Detailed Info");?>"><?php echo $this->__("Detailed Info");?></a>
9
+ </li>
10
+ <?php if(!$useAjax):?>
11
+ <ul class="attr-wrapper">
12
+ <li id="product-attr-<?php echo $productId; ?>" class="attr-table" style="display: none; ">
13
+ <table class="data-table">
14
+ <?php $iterator = 0; ?>
15
+ <?php foreach ($attributes as $label => $html): ?>
16
+ <?php if(!is_array($html)): ?>
17
+ <tr <?php if($iterator % 2 == 0): echo 'class="odd"'; else: echo 'class="even"'; endif; $iterator++;?>>
18
+ <th class="label"><?php echo $label; ?></th>
19
+ <td class="data"><?php echo nl2br($html, true); ?></td>
20
+ </tr>
21
+ <?php endif;?>
22
+ <?php endforeach; ?>
23
+ </table>
24
+ </li>
25
+ </ul>
26
+ <?php endif; ?>
27
+ <?php endif; ?>
app/design/frontend/base/default/template/dpi/page.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (($attributes = $this->getAttributesList()) && $this->helper('dpi')->getStoreConfig(DV_DPI_Helper_Data::XML_PATH_ENABLED)):?>
2
+ <div class="box-collateral box-attribute">
3
+ <button id='page' class="button <?php if($this->helper('dpi')->getStoreConfig(DV_DPI_Helper_Data::XML_PATH_USE_MODAL)): echo 'dpi-modal'; else: echo 'dpi-toggle'; endif; ?>" title="<?php echo $this->__("Detailed Info"); ?>">
4
+ <span><span><?php echo $this->__("Detailed Info"); ?></span></span>
5
+ </button>
6
+ </div>
7
+ <div id="product-page" class="dpi-attributes" style="display:none;">
8
+ <table class="data-table">
9
+ <?php $iterator = 0; ?>
10
+ <?php foreach ($attributes as $label => $html): ?>
11
+ <?php if(!is_array($html)): ?>
12
+ <tr <?php if($iterator % 2 == 0): echo 'class="odd"'; else: echo 'class="even"'; endif; $iterator++;?>>
13
+ <th class="label"><?php echo $label; ?></th>
14
+ <td class="data"><?php echo nl2br($html); ?></td>
15
+ </tr>
16
+ <?php endif;?>
17
+ <?php endforeach; ?>
18
+ </table>
19
+ </div>
20
+ <?php endif; ?>
app/etc/modules/DV_DPI.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <DV_DPI>
5
+ <version>1.0.0</version>
6
+ <active>true</active>
7
+ <codePool>local</codePool>
8
+ </DV_DPI>
9
+ </modules>
10
+ </config>
app/locale/en_US/DV_DPI.csv ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Allow Product List Template Override", "Allow Product List Template Override"
2
+ "Attribute", "Attribute"
3
+ "Attributes list", "Attributes list"
4
+ "Attribute set", "Attribute set"
5
+ "Attribute Sets list", "Attribute Sets list"
6
+ "Detailed Info", "Detailed Info"
7
+ "Detailed Product Info", "Detailed Product Info"
8
+ "Display on Product Page", "Display on Product Page"
9
+ "Display in Product Lists", "Display in Product Lists"
10
+ "Display selected attributes on Product Page", "Display selected attributes on Product Page"
11
+ "Display selected attributes in product lists (category, search, tagged products)", "Display selected attributes in product lists (category, search, tagged products)"
12
+ "DPI Attributes", "DPI Attributes"
13
+ "DPI Attribute Sets", "DPI Attribute Sets"
14
+ "Enabled", "Enabled"
15
+ "ID", "ID"
16
+ "If 'Yes' - modal dialog is used to display attributes, otherwise attributes will be displayed as plain HTML", "If 'Yes' - modal dialog is used to display attributes, otherwise attributes will be displayed as plain HTML"
17
+ "Mage Workshop", "Mage Workshop"
18
+ "Save attributes settings?", "Save attributes settings?"
19
+ "Save Changes", "Save Changes"
20
+ "Settings", "Settings"
21
+ "The attribute settings has been saved.", "The attribute settings has been saved."
22
+ "Use Modal Window", "Use Modal Window"
23
+ "Use AJAX on Product List", "Use AJAX on Product List"
24
+ "Yes/No", "Yes/No"
25
+
26
+
27
+
js/dpi/list.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AttributesList = {
2
+ init: function() {
3
+ $$(".dpi-modal").invoke("observe", "click", function() {
4
+ if($('browser_window' + this.id) && typeof(Windows) != 'undefined') {
5
+ Windows.focus('browser_window' + this.id);
6
+ return;
7
+ }
8
+ if(this.href.toQueryParams().ajax.replace('/','') && !$('product-' + this.id)) {
9
+ AttributesList.getAjaxData(this.href, this);
10
+ } else {
11
+ AttributesList.displayModal(this);
12
+ }
13
+ });
14
+
15
+ $$(".dpi-toggle").invoke("observe", "click", function(event) {
16
+ if(this.href.toQueryParams().ajax.replace('/','') && !$('product-' + this.id)) {
17
+ AttributesList.getAjaxData(this.href, this);
18
+ } else {
19
+ Element.toggle('product-' + this.id);
20
+ }
21
+ event.stop();
22
+ AttributesList.hideAttributes('product-' + this.id);
23
+ });
24
+
25
+ Event.observe(document, 'click', function() {
26
+ AttributesList.hideAttributes(this.id);
27
+ });
28
+ },
29
+
30
+ hideAttributes: function(id) {
31
+ $$('.attr-table').each(function(item){
32
+ if(id == null) {
33
+ Element.hide(item);
34
+ } else if(id != item.id) {
35
+ Element.hide(item);
36
+ }
37
+ });
38
+ },
39
+
40
+ getAjaxData: function(url, obj) {
41
+ var params = url.toQueryParams();
42
+ new Ajax.Request(url, {
43
+ parameters: { id: params.id, store: params.store},
44
+ onLoading: Element.toggle($('loading-mask')),
45
+ onComplete: function(response){
46
+ Element.toggle($('loading-mask'));
47
+ obj.up(0).insert(response.responseText);
48
+ var modal = parseInt(params.modal.replace('/', ''));
49
+ if(modal) {
50
+ AttributesList.displayModal(obj);
51
+ } else {
52
+ Element.toggle('product-' + obj.id);
53
+ }
54
+ }
55
+ });
56
+ },
57
+
58
+ displayModal: function(obj) {
59
+ Dialog.info($('product-' + obj.id).innerHTML, {
60
+ closable:true,
61
+ resizable:false,
62
+ draggable:true,
63
+ className:'magento',
64
+ windowClassName:'popup-window',
65
+ title: obj.title,
66
+ top: 100,
67
+ width: 600,
68
+ height: 500,
69
+ zIndex: 1000,
70
+ recenterAuto: true,
71
+ hideEffect: Element.hide,
72
+ showEffect: Element.show,
73
+ id: 'browser_window' + obj.id,
74
+ onClose: function(param, el) {
75
+ param.destroy.bind(param);
76
+ }
77
+ });
78
+ }
79
+ }
80
+
81
+ document.observe("dom:loaded", function() {
82
+ AttributesList.init();
83
+ });
js/dpi/page.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.observe("dom:loaded", function() {
2
+ $$(".dpi-modal").invoke("observe", "click", function(event) {
3
+ if ($('browser_window') && typeof(Windows) != 'undefined') {
4
+ Windows.focus('browser_window');
5
+ return;
6
+ }
7
+ Dialog.info($('product-page').innerHTML, {
8
+ closable:true,
9
+ resizable:false,
10
+ draggable:true,
11
+ className:'magento',
12
+ windowClassName:'popup-window',
13
+ title: this.title,
14
+ top: 100,
15
+ width: 600,
16
+ height: 500,
17
+ zIndex: 1000,
18
+ recenterAuto: true,
19
+ hideEffect: Element.hide,
20
+ showEffect: Element.show,
21
+ id: 'browser_window',
22
+ onClose:function (param, el) {
23
+ param.destroy.bind(param);
24
+ }
25
+ });
26
+ });
27
+
28
+ $$(".dpi-toggle").invoke("observe", "click", function() {
29
+ Element.toggle('product-page');
30
+ });
31
+ });
package.xml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>MageWorkshop_DPI</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>This extension displays attribute values of the product on Product Page and various product lists (Category Page, Tagged Products, Search and Advanced search).</summary>
10
+ <description>Detailed Product Info extension was created to provide customers with additional information about product. A crucial step for the customer purchases may be additional information about the product, but usually short description is not enough to cover this. Customers who have not enough time to spend in choosing products have an opportunity to estimate product in Product List and compare values of attributes without adding to comparation list. This extension will help to make your store more interactive and attractive for people. &#xD;
11
+ This extention was tested to be compatible with all main browsers (Internet Explorer 7, 8, 9, 10 Google Chrome, Mozilla Firefox, Safari). No validation problems on frontend, no errors in server's log files. Compatible with Magento 1.4+.</description>
12
+ <notes>Initial release</notes>
13
+ <authors><author><name>Mage_Workshop</name><user>auto-converted</user><email>mageworkshophq@gmail.com</email></author></authors>
14
+ <date>2013-07-05</date>
15
+ <time>12:54:44</time>
16
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="dpi.xml" hash="bb45acef90a1f5ede23ba85566817d6e"/></dir><dir name="template"><dir name="dpi"><file name="additional.phtml" hash="0170c736f658f5214bafe8f180b21d45"/><file name="massaction.phtml" hash="f10d6309762ca39d8ce99f17cb73ce91"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="dpi.xml" hash="6d4893b59541a014b480f3e1ddecb2bb"/></dir><dir name="template"><dir name="dpi"><dir name="catalog"><dir name="product"><file name="list.phtml" hash="fc6c0e30b051509ee08868df38377455"/></dir></dir><file name="data.phtml" hash="31c24c3c3c75a908929ca93b56c437d5"/><file name="list.phtml" hash="7fa0a5ddb7e30adc565febbd793e96bf"/><file name="page.phtml" hash="71beb3f0c4fa9e0e96911c36974edf41"/></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="DV"><dir name="DPI"><dir name="Block"><dir name="Adminhtml"><dir name="AttributeSets"><file name="Grid.php" hash="d8821154ae8be976e099005173ccdc35"/></dir><dir name="Attributes"><file name="Grid.php" hash="d18fee337bcc98d691b2eee0f30733f4"/></dir><dir name="Render"><file name="Checkbox.php" hash="aeb963bf306704880fc3c9ac94be2074"/></dir><file name="AttributeSets.php" hash="3baa54555bffaab718ec7cf6abd8fb5c"/><file name="Attributes.php" hash="4e645a6cf812c7392412cc24191f5854"/><file name="Massaction.php" hash="6bc3a1369dd55fe2f360b3173e4bed88"/></dir><file name="ProductInfo.php" hash="e051381172a529ce25912f5aec70b4a1"/></dir><dir name="Helper"><file name="Data.php" hash="e55299de6859714a2ea0baf4fe9723b8"/></dir><dir name="Model"><dir name="Adminhtml"><file name="SaveConfig.php" hash="f1a57199d68bcbdbd820f2339d2a211d"/></dir><dir name="Resource"><dir name="AttributeList"><file name="Collection.php" hash="a805e5e655ba5d3df1aea6877aa50935"/></dir><file name="AttributeList.php" hash="da22b9df640ffec874d42683fc7b2057"/></dir><file name="AttributeList.php" hash="9a123f19d1e1f9ff2375428002b6dfe2"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SettingsController.php" hash="f19979cd84f2403c8c818a65e4632b38"/></dir><file name="AttributeController.php" hash="96469b56bb9a8cbb5854bd7b8422aa68"/></dir><dir name="etc"><file name="adminhtml.xml" hash="51d4be38ee9141e5f333309881a809c4"/><file name="config.xml" hash="200621e77d3294ed22220165e16974e7"/><file name="system.xml" hash="bae48c18cd637c24f35e7c9253ee691d"/></dir><dir name="sql"><dir name="dpi_setup"><file name="mysql4-install-1.0.0.php" hash="8e4eeb8cf5eee8cc7c5f853f734c0ff8"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DV_DPI.xml" hash="55750323c271dadfe4bd8682f7c3ed8b"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="dpi"><file name="style.css" hash="82524f656beaff4b0a4be1ad396d4c1e"/></dir></dir><dir name="lib"><dir name="prototype"><dir name="windows"><dir name="themes"><dir name="magento"><file name="btn_bg.gif" hash="37c51a4d48a92da9648dcd3ca011039f"/><file name="content_bg.gif" hash="21278ea0da2d4256f4ced96b6080ba2e"/><file name="top_bg.gif" hash="26f28090de87d64f9b01bf624f89bfe2"/><file name="window_close.png" hash="3af14f053f360bf31f8ba2df73ec7f1e"/></dir><file name="magento.css" hash="b69d765373769ce7e64b7f220bb2629c"/></dir></dir></dir></dir><dir name="images"><dir name="dpi"><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="blank.gif" hash="5722d7bd0f1e1379d0a2005a0a9ea401"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="dpi"><file name="list.js" hash="01589bac01e9214908d8f3340444f7ad"/><file name="page.js" hash="36397edbb3377f96766d008dcc8e7213"/></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="DV_DPI.csv" hash="024b1000ef40568a9d71361a8e725eca"/></dir></target></contents>
17
+ <compatible/>
18
+ <dependencies/>
19
+ </package>
skin/frontend/base/default/css/dpi/style.css ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .attr-table {position: absolute; width: 500px; z-index: 30;}
2
+ .attr-wrapper {position: relative; z-index: 50;}
3
+ .data-table th {padding: 3px 8px !important;}
4
+ .data-table td {padding: 3px 8px !important;}
5
+ .dpi-attributes {padding-bottom: 10px;}
6
+ .products-grid .actions {bottom: 5px;}
7
+ #loading-mask {
8
+ background:background:url(../images/dpi/blank.gif) repeat;
9
+ position:absolute;
10
+ color:#d85909;
11
+ font-size:1.1em;
12
+ font-weight:bold;
13
+ text-align:center;
14
+ opacity:0.80;
15
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; /* IE8 */
16
+ filter: alpha(opacity=80); /* ie lt 7 */
17
+ z-index:1000;
18
+ }
19
+ #loading-mask .loader {
20
+ position:fixed;
21
+ top:45%;
22
+ left:50%;
23
+ width:150px;
24
+ margin-left:-105px;
25
+ padding:15px 30px;
26
+ background:#fff4e9;
27
+ border:2px solid #f1af73;
28
+ color:#d85909;
29
+ font-weight:bold;
30
+ text-align:center;
31
+ z-index:1000;
32
+ }
33
+
skin/frontend/base/default/images/dpi/ajax-loader-tr.gif ADDED
Binary file
skin/frontend/base/default/images/dpi/blank.gif ADDED
Binary file
skin/frontend/base/default/lib/prototype/windows/themes/magento.css ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Magento
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is subject to the Academic Free License (AFL 3.0)
7
+ * that is bundled with this package in the file LICENSE_AFL.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/afl-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
+ * DISCLAIMER
15
+ *
16
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
17
+ * versions in the future. If you wish to customize Magento for your
18
+ * needs please refer to http://www.magentocommerce.com for more information.
19
+ *
20
+ * @category design
21
+ * @package base_default
22
+ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
23
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
24
+ */
25
+ .dialog { border:1px solid #555; }
26
+ .dialog .bot { display:none !important; }
27
+ .overlay_magento { background-color:#000; filter:alpha(opacity=60); -moz-opacity:.6; opacity:.6; -webkit-opacity:.6; }
28
+ .top.table_window { border-bottom:1px solid #e6e6e6; background:#6a838b url(magento/top_bg.gif) 0 100% repeat-x; }
29
+
30
+ .magento_nw { width:6px; height:28px; }
31
+ .magento_n { height:28px; }
32
+ .magento_ne { width:6px; height:28px; }
33
+
34
+ .magento_w { width:6px; }
35
+ .magento_e { width:6px; }
36
+ .magento_w,
37
+ .magento_e,
38
+ .magento_content { background: #fafafa url(magento/content_bg.gif) 0 0 repeat-x; }
39
+
40
+ .magento_sw { background:#deebf0; width:5px; height:3px; }
41
+ .magento_s { background:#deebf0; height:3px; }
42
+ .magento_se,
43
+
44
+ .magento_sizer { background:#deebf0; width:5px; height:3px; }
45
+ .magento_sizer { cursor:se-resize; }
46
+
47
+ .magento_close { width:16px; height:16px; background:url(magento/window_close.png) no-repeat 0 0; position:absolute; top:5px; right:7px; cursor:pointer; z-index:1000; }
48
+ .magento_minimize { width:16px; height:16px; background:url(magento/window_minimize.png) 0 0 no-repeat; position:absolute; top:5px; right:28px; cursor:pointer; z-index:1000; }
49
+ .magento_maximize { width:16px; height:16px; background:url(magento/window_maximize.png)0 0 no-repeat; position:absolute; top:5px; right:49px; cursor:pointer; z-index:1000; }
50
+
51
+ .magento_title { float:left; width:100%; font:bold 12px/28px Arial, Helvetica, sans-serif; color:#fff; text-align:left; }
52
+
53
+ .magento_content { overflow:auto; font-size:12px; }
54
+ .magento_content,
55
+ .magento_content label { color:#333; font-family:Arial, sans-serif; }
56
+
57
+ .magento_buttons { padding:10px; text-align:right; }
58
+ .magento_buttons input.button { border-width:1px; border-style:solid; border-color:#ed6502 #a04300 #a04300 #ed6502; background:#ffac47 url(magento/btn_bg.gif) 0 100% repeat-x; padding:0 7px 1px 7px; font:bold 12px/18px Arial, Helvetica, sans-serif; color:#fff; cursor:pointer; text-align:center; white-space:nowrap; }
59
+ .magento_buttons button.button span span span { display:inline; background:none; padding:0; height:auto; }
60
+
61
+ /* FOR IE */
62
+ * html .magento_close { background-image:none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/magento/window_maximize.png", sizingMethod="crop"); }
63
+ * html .magento_minimize { background-image:none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/magento/window_close.png", sizingMethod="crop");}
64
+ * html .magento_maximize { background-image:none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/magento/window_minimize.png", sizingMethod="crop"); }
skin/frontend/base/default/lib/prototype/windows/themes/magento/btn_bg.gif ADDED
Binary file
skin/frontend/base/default/lib/prototype/windows/themes/magento/content_bg.gif ADDED
Binary file
skin/frontend/base/default/lib/prototype/windows/themes/magento/top_bg.gif ADDED
Binary file
skin/frontend/base/default/lib/prototype/windows/themes/magento/window_close.png ADDED
Binary file