Ma2_Manufacturers_Free - Version 1.0.0

Version Notes

Version number: 1.0.0
Stability: Stable
Compatibility: 1.7, 1.8, 1.8.1

Download this release

Release Info

Developer Magenmarket.com
Extension Ma2_Manufacturers_Free
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (103) hide show
  1. app/code/community/Ma2/Manufacturers/Block/Adminhtml/Default.php +64 -0
  2. app/code/community/Ma2/Manufacturers/Block/Adminhtml/Default/Form.php +53 -0
  3. app/code/community/Ma2/Manufacturers/Block/List.php +93 -0
  4. app/code/community/Ma2/Manufacturers/Helper/Data.php +27 -0
  5. app/code/community/Ma2/Manufacturers/Model/System/Config/Source/Manuid.php +41 -0
  6. app/code/community/Ma2/Manufacturers/controllers/Adminhtml/DefaultController.php +104 -0
  7. app/code/community/Ma2/Manufacturers/controllers/IndexController.php +30 -0
  8. app/code/community/Ma2/Manufacturers/etc/adminhtml.xml +69 -0
  9. app/code/community/Ma2/Manufacturers/etc/config.xml +70 -0
  10. app/code/community/Ma2/Manufacturers/etc/system.xml +95 -0
  11. app/code/local/Ma2/All/Helper/Data.php +4 -0
  12. app/code/local/Ma2/All/etc/adminhtml.xml +43 -0
  13. app/code/local/Ma2/All/etc/config.xml +56 -0
  14. app/code/local/Ma2/All/etc/system.xml +9 -0
  15. app/design/adminhtml/default/default/layout/ma2_all.xml +7 -0
  16. app/design/adminhtml/default/default/layout/ma2_manufacturers.xml +14 -0
  17. app/design/adminhtml/default/default/template/ma2_manufacturers/default.phtml +43 -0
  18. app/design/frontend/default/default/layout/ma2_all.xml +9 -0
  19. app/design/frontend/default/default/layout/ma2_manufacturers.xml +8 -0
  20. app/design/frontend/default/default/template/ma2_manufacturers/default.phtml +60 -0
  21. app/design/frontend/default/default/template/ma2_manufacturers/grid.phtml +75 -0
  22. app/design/frontend/default/default/template/ma2_manufacturers/slider.phtml +128 -0
  23. app/etc/modules/Ma2_All.xml +9 -0
  24. app/etc/modules/Ma2_Manufacturers.xml +10 -0
  25. js/ma2_all/ma2all.css +30 -0
  26. js/ma2_all/ma2all.js +41 -0
  27. media/manufacturers/KennethCole.jpg +0 -0
  28. media/manufacturers/LG.jpg +0 -0
  29. media/manufacturers/acco.jpg +0 -0
  30. media/manufacturers/acer.jpg +0 -0
  31. media/manufacturers/aiwa.png +0 -0
  32. media/manufacturers/amd.jpg +0 -0
  33. media/manufacturers/apple.jpg +0 -0
  34. media/manufacturers/argus-logo.png +0 -0
  35. media/manufacturers/asics.jpg +0 -0
  36. media/manufacturers/at_t.png +0 -0
  37. media/manufacturers/blackberry.jpg +0 -0
  38. media/manufacturers/canon.jpg +0 -0
  39. media/manufacturers/crucial.jpg +0 -0
  40. media/manufacturers/dell.jpg +0 -0
  41. media/manufacturers/ecco.jpg +0 -0
  42. media/manufacturers/gateway.png +0 -0
  43. media/manufacturers/hp.jpg +0 -0
  44. media/manufacturers/htc.png +0 -0
  45. media/manufacturers/image.jpg +0 -0
  46. media/manufacturers/intel.jpg +0 -0
  47. media/manufacturers/jvc.jpg +0 -0
  48. media/manufacturers/kodakextColor.jpg +0 -0
  49. media/manufacturers/logitech.png +0 -0
  50. media/manufacturers/microsoft.jpg +0 -0
  51. media/manufacturers/ninewest.png +0 -0
  52. media/manufacturers/noimage.jpg +0 -0
  53. media/manufacturers/nokia.jpg +0 -0
  54. media/manufacturers/olympus.jpg +0 -0
  55. media/manufacturers/panasonic.gif +0 -0
  56. media/manufacturers/philips.jpg +0 -0
  57. media/manufacturers/resized/KennethCole.jpg +0 -0
  58. media/manufacturers/resized/LG.jpg +0 -0
  59. media/manufacturers/resized/acco.jpg +0 -0
  60. media/manufacturers/resized/acer.jpg +0 -0
  61. media/manufacturers/resized/aiwa.png +0 -0
  62. media/manufacturers/resized/amd.jpg +0 -0
  63. media/manufacturers/resized/apple.jpg +0 -0
  64. media/manufacturers/resized/argus-logo.png +0 -0
  65. media/manufacturers/resized/asics.jpg +0 -0
  66. media/manufacturers/resized/at_t.png +0 -0
  67. media/manufacturers/resized/blackberry.jpg +0 -0
  68. media/manufacturers/resized/canon.jpg +0 -0
  69. media/manufacturers/resized/crucial.jpg +0 -0
  70. media/manufacturers/resized/dell.jpg +0 -0
  71. media/manufacturers/resized/ecco.jpg +0 -0
  72. media/manufacturers/resized/gateway.png +0 -0
  73. media/manufacturers/resized/hp.jpg +0 -0
  74. media/manufacturers/resized/htc.png +0 -0
  75. media/manufacturers/resized/image.jpg +0 -0
  76. media/manufacturers/resized/intel.jpg +0 -0
  77. media/manufacturers/resized/jvc.jpg +0 -0
  78. media/manufacturers/resized/kodakextColor.jpg +0 -0
  79. media/manufacturers/resized/logitech.png +0 -0
  80. media/manufacturers/resized/microsoft.jpg +0 -0
  81. media/manufacturers/resized/ninewest.png +0 -0
  82. media/manufacturers/resized/noimage.jpg +0 -0
  83. media/manufacturers/resized/nokia.jpg +0 -0
  84. media/manufacturers/resized/olympus.jpg +0 -0
  85. media/manufacturers/resized/panasonic.gif +0 -0
  86. media/manufacturers/resized/philips.jpg +0 -0
  87. media/manufacturers/resized/samsung.jpg +0 -0
  88. media/manufacturers/resized/seagate.gif +0 -0
  89. media/manufacturers/resized/sony.jpg +0 -0
  90. media/manufacturers/resized/stevemadden.logo.jpg +0 -0
  91. media/manufacturers/resized/toshiba.jpg +0 -0
  92. media/manufacturers/resized/westerndigital.jpg +0 -0
  93. media/manufacturers/resized/yamaha.jpg +0 -0
  94. media/manufacturers/samsung.jpg +0 -0
  95. media/manufacturers/seagate.gif +0 -0
  96. media/manufacturers/sony.jpg +0 -0
  97. media/manufacturers/stevemadden.logo.jpg +0 -0
  98. media/manufacturers/toshiba.jpg +0 -0
  99. media/manufacturers/westerndigital.jpg +0 -0
  100. media/manufacturers/yamaha.jpg +0 -0
  101. package.xml +20 -0
  102. skin/frontend/default/default/ma2_manufacturers/css/frontend.css +67 -0
  103. skin/frontend/default/default/ma2_manufacturers/js/carousel-min.js +25 -0
app/code/community/Ma2/Manufacturers/Block/Adminhtml/Default.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: Default.php 2 2014-01-13 07:35:22Z linhnt $ */
22
+
23
+ class Ma2_Manufacturers_Block_Adminhtml_Default extends Mage_Adminhtml_Block_Widget
24
+ {
25
+ public function __construct()
26
+ {
27
+ parent::__construct();
28
+ $this->setTemplate('ma2_manufacturers/default.phtml');
29
+ $this->setTitle('Manufacturers');
30
+ $this->setHeaderCss('manufacturers_manager');
31
+ }
32
+
33
+ protected function _prepareLayout()
34
+ {
35
+ $this->setChild('save_button',
36
+ $this->getLayout()->createBlock('adminhtml/widget_button')
37
+ ->setData(array(
38
+ 'label' => Mage::helper('adminhtml')->__('Save'),
39
+ 'onclick' => 'editForm.submit()',
40
+ 'class' => 'save',
41
+ ))
42
+ );
43
+ $this->setChild('form',
44
+ $this->getLayout()->createBlock('manufacturers/adminhtml_default_form')
45
+ );
46
+ return parent::_prepareLayout();
47
+ }
48
+
49
+ public function getSaveButtonHtml()
50
+ {
51
+ return $this->getChildHtml('save_button');
52
+ }
53
+
54
+ public function getSaveUrl()
55
+ {
56
+ return $this->getUrl('*/*/save', array('_current'=>true));
57
+ }
58
+
59
+
60
+
61
+
62
+
63
+
64
+ }
app/code/community/Ma2/Manufacturers/Block/Adminhtml/Default/Form.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: Form.php 2 2014-01-13 07:35:22Z linhnt $ */
22
+
23
+ class Ma2_Manufacturers_Block_Adminhtml_Default_Form extends Mage_Adminhtml_Block_Widget_Form
24
+ {
25
+ protected function _prepareLayout()
26
+ {
27
+ parent::_prepareLayout();
28
+ }
29
+
30
+ protected function _prepareForm()
31
+ {
32
+ $form = new Varien_Data_Form();
33
+ $form->setHtmlIdPrefix('manufacturers_');
34
+ $this->setForm($form);
35
+ $fieldset = $form->addFieldset('upload_image', array('legend'=>Mage::helper('manufacturers')->__('Manufacturers and images'), 'class' => 'grid'));
36
+
37
+ $manuOptions = Mage::getModel("manufacturers/system_config_source_manuid")->toOptionArray();
38
+ if ($manuOptions){
39
+ foreach ($manuOptions as $manuOption){
40
+ $imgUrl = Mage::getStoreConfig('manufacturers/image/'. $manuOption['value']) ? Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . Mage::getStoreConfig('manufacturers/image/'. $manuOption['value']) : '';
41
+
42
+ $fieldset->addField('image_'.$manuOption['value'], 'image', array(
43
+ 'label' => $manuOption['label'] . ' (ID: ' . $manuOption['value'] . ')',
44
+ 'name' => $manuOption['value'],
45
+ 'required' => false,
46
+ 'value' => $imgUrl
47
+ ));
48
+ }
49
+ }
50
+
51
+ return parent::_prepareForm();
52
+ }
53
+ }
app/code/community/Ma2/Manufacturers/Block/List.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: List.php 2 2014-01-13 07:35:22Z linhnt $ */
22
+
23
+ class Ma2_Manufacturers_Block_List extends Mage_Catalog_Block_Product_Abstract {
24
+
25
+ public function __construct()
26
+ {
27
+ parent::__construct();
28
+ if (!$this->getTemplate()) {
29
+ $this->setTemplate('ma2_manufacturers/default.phtml');
30
+ }
31
+ }
32
+
33
+ public function getManufacturers()
34
+ {
35
+ if (is_null($this->_allManufacturers)){
36
+ $manufacturers = Mage::getModel("manufacturers/system_config_source_manuid")->toOptionArray();
37
+ if (!count($manufacturers)) return array();
38
+
39
+ // included or excluded?
40
+ if ($this->getIncluded() && trim($this->getIncluded()) != ''){
41
+ $included = explode(',', str_replace(' ', '', $this->getIncluded()));
42
+ $tmpManu = array();
43
+ foreach($manufacturers as $manufacturer){
44
+ if (in_array($manufacturer['value'], $included)) $tmpManu[] = $manufacturer;
45
+ }
46
+
47
+ unset($manufacturers);
48
+ $manufacturers = $tmpManu;
49
+
50
+ } else if ($this->getExcluded() && trim($this->getExcluded()) != ''){
51
+ $excluded = explode(',', str_replace(' ', '', $this->getExcluded()));
52
+ $tmpManu = array();
53
+ foreach($manufacturers as $manufacturer){
54
+ if (!in_array($manufacturer['value'], $included)) $tmpManu[] = $manufacturer;
55
+ }
56
+
57
+ unset($manufacturers);
58
+ $manufacturers = $tmpManu;
59
+ }
60
+
61
+
62
+ $manu_code = Mage::getStoreConfig('manufacturers/general/attr_code');
63
+
64
+ for($i = 0; $i < count($manufacturers); $i++){
65
+ // logo
66
+ $manufacturers[$i]['image'] = Mage::getStoreConfig('manufacturers/image/'.$manufacturers[$i]['value']);
67
+
68
+ // product count
69
+ $collection = Mage::getModel('catalog/product')->getCollection()
70
+ ->addAttributeToFilter($manu_code, array('eq' => (int)$manufacturers[$i]['value']))
71
+ ->load();
72
+
73
+ // count as same as Magento.
74
+ $allBundles = array();
75
+ foreach ($collection as $pr){
76
+ $bundles = Mage::getResourceModel('bundle/selection')->getParentIdsByChild($pr->getId());
77
+ $allBundles = array_unique(array_merge($allBundles, $bundles));
78
+ }
79
+ $manufacturers[$i]['product_count'] = $collection->count() + count($allBundles);
80
+ }
81
+
82
+ $this->_allManufacturers = $manufacturers;
83
+
84
+ }
85
+ return $this->_allManufacturers;
86
+ }
87
+
88
+ protected function _beforeToHtml()
89
+ {
90
+ return parent::_beforeToHtml();
91
+ }
92
+ }
93
+ ?>
app/code/community/Ma2/Manufacturers/Helper/Data.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: Data.php 2 2014-01-13 07:35:22Z linhnt $ */
22
+
23
+ class Ma2_Manufacturers_Helper_Data extends Mage_Core_Helper_Abstract
24
+ {
25
+
26
+ }
27
+ ?>
app/code/community/Ma2/Manufacturers/Model/System/Config/Source/Manuid.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: Manuid.php 2 2014-01-13 07:35:22Z linhnt $ */
22
+
23
+ class Ma2_Manufacturers_Model_System_Config_Source_Manuid
24
+ {
25
+ public function toOptionArray()
26
+ {
27
+
28
+ $manu_code = Mage::getStoreConfig('manufacturers/general/attr_code');
29
+ if (empty($manu_code)) return array();
30
+
31
+ $attribute = Mage::getModel('catalog/product')->getResource()->getAttribute($manu_code);
32
+ if (!$attribute) return array();
33
+
34
+ $manufacturers = $attribute->getSource()->getAllOptions(false);
35
+ if (!$manufacturers) return array();
36
+
37
+ return $manufacturers;
38
+ }
39
+ }
40
+
41
+ ?>
app/code/community/Ma2/Manufacturers/controllers/Adminhtml/DefaultController.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: DefaultController.php 2 2014-01-13 07:35:22Z linhnt $ */
22
+
23
+ class Ma2_Manufacturers_Adminhtml_DefaultController extends Mage_Adminhtml_Controller_Action
24
+ {
25
+
26
+ protected function _initAction() {
27
+ $this->loadLayout()
28
+ ->_setActiveMenu('ma2/manufacturers/manufacturers_manager')
29
+ ->_addBreadcrumb(Mage::helper('manufacturers')->__('Manufacturers Manager'), Mage::helper('manufacturers')->__('Manufacturers Manager'));
30
+
31
+ return $this;
32
+ }
33
+
34
+ public function indexAction() {
35
+ $this->_initAction();
36
+ $this->renderLayout();
37
+ }
38
+
39
+ public function saveAction()
40
+ {
41
+ if ($data = $this->getRequest()->getPost())
42
+ {
43
+
44
+ if(isset($_FILES) && count((array)$_FILES)){
45
+ foreach((array)$_FILES as $manid => $image){
46
+ if (!empty($image['name']) && file_exists($image['tmp_name'])){
47
+ try {
48
+ $uploader = new Varien_File_Uploader($manid);
49
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
50
+ $uploader->setAllowRenameFiles(false);
51
+
52
+ $uploader->setFilesDispersion(false);
53
+
54
+ $path = Mage::getBaseDir('media') . DS . 'manufacturers' . DS;
55
+
56
+ $imageFullName = $uploader->getCorrectFileName($image['name']);
57
+
58
+ $uploader->save($path, $imageFullName);
59
+
60
+ $imagePath = Mage::getBaseDir('media') . DS . 'manufacturers' . DS . $imageFullName;
61
+
62
+ // if resize
63
+ if (Mage::getStoreConfig('manufacturers/general/thumb_upload_resize') == 1 && file_exists($imagePath))
64
+ {
65
+ $thumbW = intval(Mage::getStoreConfig('manufacturers/general/thumb_w')) > 0 ? intval(Mage::getStoreConfig('manufacturers/general/thumb_w')) : 120;
66
+ $thumbH = intval(Mage::getStoreConfig('manufacturers/general/thumb_h')) > 0 ? intval(Mage::getStoreConfig('manufacturers/general/thumb_h')) : 60;
67
+
68
+ $imageThumbPath = Mage::getBaseDir('media') . DS . 'manufacturers' . DS . 'resized'. DS . $imageFullName;
69
+
70
+ if (file_exists($imageThumbPath)) @unlink($imageThumbPath);
71
+
72
+ $imageObj = new Varien_Image($imagePath);
73
+ $imageObj->constrainOnly(TRUE);
74
+ $imageObj->keepAspectRatio(TRUE);
75
+ $imageObj->keepTransparency(TRUE);
76
+ $imageObj->keepFrame(FALSE);
77
+ $imageObj->resize($thumbW, $thumbH);
78
+ $imageObj->save($imageThumbPath);
79
+
80
+ Mage::getModel('core/config')->saveConfig('manufacturers/image/'.$manid, 'manufacturers/resized/' . $imageFullName);
81
+ }
82
+ else {
83
+ Mage::getModel('core/config')->saveConfig('manufacturers/image/'.$manid, 'manufacturers/'.$imageFullName);
84
+ }
85
+
86
+ }catch(Exception $e) {
87
+
88
+ }
89
+ }
90
+ }
91
+ }
92
+
93
+ // if some is checked as delete
94
+ foreach ($data as $k => $v){
95
+ if (isset($v['delete']) && $v['delete'] == 1) Mage::getModel('core/config')->saveConfig('manufacturers/image/'.$k, null);
96
+ }
97
+
98
+ }
99
+ $this->_redirect('*/*/index');
100
+ return;
101
+ }
102
+
103
+
104
+ }
app/code/community/Ma2/Manufacturers/controllers/IndexController.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: IndexController.php 2 2014-01-13 07:35:22Z linhnt $ */
22
+
23
+ class Ma2_Manufacturers_IndexController extends Mage_Core_Controller_Front_Action
24
+ {
25
+ public function indexAction()
26
+ {
27
+ $this->loadLayout();
28
+ $this->renderLayout();
29
+ }
30
+ }
app/code/community/Ma2/Manufacturers/etc/adminhtml.xml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <ma2 translate="title" module="ma2all">
5
+ <title>MA2</title>
6
+ <sort_order>89</sort_order>
7
+ <children>
8
+ <manufacturers translate="title" module="manufacturers">
9
+ <title>Ma2 Manufacturers</title>
10
+ <sort_order>20</sort_order>
11
+ <children>
12
+ <manufacturers_manager translate="title" module="manufacturers">
13
+ <title>Manufacturers Images</title>
14
+ <sort_order>1</sort_order>
15
+ <action>manufacturers/adminhtml_default</action>
16
+ </manufacturers_manager>
17
+ <manufacturers_options translate="title" module="manufacturers">
18
+ <title>Configurations</title>
19
+ <sort_order>2</sort_order>
20
+ <action>adminhtml/system_config/edit/section/manufacturers</action>
21
+ </manufacturers_options>
22
+ </children>
23
+ </manufacturers>
24
+ </children>
25
+ </ma2>
26
+ </menu>
27
+
28
+ <acl>
29
+ <resources>
30
+ <admin>
31
+ <children>
32
+ <ma2>
33
+ <title>MA2</title>
34
+ <sort_order>89</sort_order>
35
+ <children>
36
+ <manufacturers>
37
+ <title>Ma2 Manufacturers</title>
38
+ <sort_order>20</sort_order>
39
+ <children>
40
+ <manufacturers_manager translate="title" module="manufacturers">
41
+ <title>Manufacturers Images</title>
42
+ <sort_order>1</sort_order>
43
+ </manufacturers_manager>
44
+ <manufacturers_options translate="title" module="manufacturers">
45
+ <title>Configurations</title>
46
+ <sort_order>2</sort_order>
47
+ </manufacturers_options>
48
+ </children>
49
+ </manufacturers>
50
+ </children>
51
+ </ma2>
52
+
53
+ <system>
54
+ <children>
55
+ <config>
56
+ <children>
57
+ <manufacturers translate="title" module="manufacturers">
58
+ <title>Manufacturers Section</title>
59
+ <sort_order>1</sort_order>
60
+ </manufacturers>
61
+ </children>
62
+ </config>
63
+ </children>
64
+ </system>
65
+ </children>
66
+ </admin>
67
+ </resources>
68
+ </acl>
69
+ </config>
app/code/community/Ma2/Manufacturers/etc/config.xml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ma2_Manufacturers>
5
+ <version>1.0.0</version>
6
+ </Ma2_Manufacturers>
7
+ </modules>
8
+
9
+ <admin>
10
+ <routers>
11
+ <manufacturers>
12
+ <use>admin</use>
13
+ <args>
14
+ <module>Ma2_Manufacturers</module>
15
+ <frontName>manufacturers</frontName>
16
+ </args>
17
+ </manufacturers>
18
+ </routers>
19
+ </admin>
20
+
21
+ <adminhtml>
22
+ <layout>
23
+ <updates>
24
+ <manufacturers>
25
+ <file>ma2_manufacturers.xml</file>
26
+ </manufacturers>
27
+ </updates>
28
+ </layout>
29
+ </adminhtml>
30
+
31
+ <frontend>
32
+ <layout>
33
+ <updates>
34
+ <manufacturers>
35
+ <file>ma2_manufacturers.xml</file>
36
+ </manufacturers>
37
+ </updates>
38
+ </layout>
39
+ </frontend>
40
+
41
+ <global>
42
+ <blocks>
43
+ <manufacturers>
44
+ <class>Ma2_Manufacturers_Block</class>
45
+ </manufacturers>
46
+ </blocks>
47
+ <models>
48
+ <manufacturers>
49
+ <class>Ma2_Manufacturers_Model</class>
50
+ </manufacturers>
51
+ </models>
52
+ <helpers>
53
+ <manufacturers>
54
+ <class>Ma2_Manufacturers_Helper</class>
55
+ </manufacturers>
56
+ </helpers>
57
+ </global>
58
+
59
+ <default>
60
+ <manufacturers>
61
+ <general>
62
+ <attr_code>manufacturer</attr_code>
63
+ <thumb_w>120</thumb_w>
64
+ <thumb_h>60</thumb_h>
65
+ <dimension_spec>1</dimension_spec>
66
+ <thumb_upload_resize>0</thumb_upload_resize>
67
+ </general>
68
+ </manufacturers>
69
+ </default>
70
+ </config>
app/code/community/Ma2/Manufacturers/etc/system.xml ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <ma2 translate="label" module="ma2all">
5
+ <label>MagenMarket Extensions</label>
6
+ <sort_order>168</sort_order>
7
+ </ma2>
8
+ </tabs>
9
+
10
+ <sections>
11
+ <manufacturers translate="label" module="manufacturers">
12
+ <label>Manufacturers</label>
13
+ <tab>ma2</tab>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>1</sort_order>
16
+ <show_in_default>1</show_in_default>
17
+ <show_in_website>1</show_in_website>
18
+ <show_in_store>1</show_in_store>
19
+ <groups>
20
+ <general translate="label">
21
+ <label>General</label>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>1</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <fields>
28
+ <attr_code translate="label">
29
+ <label>Manufacturers attribute code</label>
30
+ <frontend_type>text</frontend_type>
31
+ <sort_order>2</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ <comment><![CDATA[
36
+ Attribute code for Manufacturer. <br /> Please fill the attribute code and save the configuration first!
37
+ ]]>
38
+ </comment>
39
+ </attr_code>
40
+ <thumb_w translate="label">
41
+ <label>Thumbnail width</label>
42
+ <frontend_type>text</frontend_type>
43
+ <sort_order>4</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ <comment><![CDATA[
48
+ Type a number for thummnail width (px). Example: 120
49
+ ]]>
50
+ </comment>
51
+ </thumb_w>
52
+ <thumb_h translate="label">
53
+ <label>Thumbnail height</label>
54
+ <frontend_type>text</frontend_type>
55
+ <sort_order>6</sort_order>
56
+ <show_in_default>1</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
+ <show_in_store>1</show_in_store>
59
+ <comment><![CDATA[
60
+ Type a number for thummnail height (px). Example: 60
61
+ ]]>
62
+ </comment>
63
+ </thumb_h>
64
+ <dimension_spec translate="label">
65
+ <label>Specify dimension for image tag</label>
66
+ <frontend_type>select</frontend_type>
67
+ <sort_order>8</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>1</show_in_store>
71
+ <source_model>adminhtml/system_config_source_yesno</source_model>
72
+ <comment><![CDATA[
73
+ Choose YES to put 'width="Wpx" height="Hpx"' in img tag. Where Wpx and Hpx is defined above.
74
+ ]]>
75
+ </comment>
76
+ </dimension_spec>
77
+ <thumb_upload_resize translate="label">
78
+ <label>Resize images when upload</label>
79
+ <frontend_type>select</frontend_type>
80
+ <sort_order>10</sort_order>
81
+ <show_in_default>1</show_in_default>
82
+ <show_in_website>1</show_in_website>
83
+ <show_in_store>1</show_in_store>
84
+ <source_model>adminhtml/system_config_source_yesno</source_model>
85
+ <comment><![CDATA[
86
+ Choose YES to enable resizing image when upload in backend. The resized dimension is defined above.
87
+ ]]>
88
+ </comment>
89
+ </thumb_upload_resize>
90
+ </fields>
91
+ </general>
92
+ </groups>
93
+ </manufacturers>
94
+ </sections>
95
+ </config>
app/code/local/Ma2/All/Helper/Data.php ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?php
2
+ class Ma2_All_Helper_Data extends Mage_Core_Helper_Abstract {
3
+
4
+ }
app/code/local/Ma2/All/etc/adminhtml.xml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <layout>
4
+ <updates>
5
+ <ma2all module="Ma2_All">
6
+ <file>ma2_all.xml</file>
7
+ </ma2all>
8
+ </updates>
9
+ </layout>
10
+ <menu>
11
+ <ma2 translate="title" module="ma2all">
12
+ <title>MA2</title>
13
+ <sort_order>89</sort_order>
14
+ </ma2>
15
+ </menu>
16
+
17
+ <acl>
18
+ <resources>
19
+ <all>
20
+ <title>Allow Everything</title>
21
+ </all>
22
+ <admin>
23
+ <children>
24
+ <ma2>
25
+ <title>MA2</title>
26
+ <sort_order>89</sort_order>
27
+ </ma2>
28
+ <system>
29
+ <children>
30
+ <config>
31
+ <children>
32
+ <ma2all>
33
+ <title>MagenMarket Extensions</title>
34
+ </ma2all>
35
+ </children>
36
+ </config>
37
+ </children>
38
+ </system>
39
+ </children>
40
+ </admin>
41
+ </resources>
42
+ </acl>
43
+ </config>
app/code/local/Ma2/All/etc/config.xml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ma2_All>
5
+ <version>0.1.0</version>
6
+ </Ma2_All>
7
+ </modules>
8
+
9
+ <frontend>
10
+ <layout>
11
+ <updates>
12
+ <ma2all>
13
+ <file>ma2_all.xml</file>
14
+ </ma2all>
15
+ </updates>
16
+ </layout>
17
+ </frontend>
18
+
19
+ <global>
20
+ <blocks>
21
+ <ma2all>
22
+ <class>Ma2_All_Block</class>
23
+ </ma2all>
24
+ </blocks>
25
+ <resources>
26
+ <ma2all_setup>
27
+ <setup>
28
+ <module>Ma2_All</module>
29
+ </setup>
30
+ <connection>
31
+ <use>core_setup</use>
32
+ </connection>
33
+ </ma2all_setup>
34
+ <ma2all_write>
35
+ <connection>
36
+ <use>core_write</use>
37
+ </connection>
38
+ </ma2all_write>
39
+ <ma2all_read>
40
+ <connection>
41
+ <use>core_read</use>
42
+ </connection>
43
+ </ma2all_read>
44
+ </resources>
45
+ <models>
46
+ <ma2all>
47
+ <class>Ma2_All_Model</class>
48
+ </ma2all>
49
+ </models>
50
+ <helpers>
51
+ <ma2all>
52
+ <class>Ma2_All_Helper</class>
53
+ </ma2all>
54
+ </helpers>
55
+ </global>
56
+ </config>
app/code/local/Ma2/All/etc/system.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <ma2 translate="label" module="ma2all">
5
+ <label>MagenMarket Extensions</label>
6
+ <sort_order>168</sort_order>
7
+ </ma2>
8
+ </tabs>
9
+ </config>
app/design/adminhtml/default/default/layout/ma2_all.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ </default>
5
+ <adminhtml_system_config_edit>
6
+ </adminhtml_system_config_edit>
7
+ </layout>
app/design/adminhtml/default/default/layout/ma2_manufacturers.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <manufacturers_adminhtml_default_index>
4
+ <reference name="head">
5
+ </reference>
6
+ <reference name="content">
7
+ <!-- <block type="adminhtml/store_switcher" name="store_switcher" as="store_switcher">
8
+ <action method="setUseConfirm"><params>0</params></action>
9
+ </block> -->
10
+ <block type="manufacturers/adminhtml_default" name="manufacturers" />
11
+ </reference>
12
+ </manufacturers_adminhtml_default_index>
13
+
14
+ </layout>
app/design/adminhtml/default/default/template/ma2_manufacturers/default.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: default.phtml 2 2014-01-13 07:35:22Z linhnt $ */
22
+ ?>
23
+
24
+ <div class="content-header">
25
+ <table cellspacing="0">
26
+ <tr>
27
+ <td>
28
+ <h3<?php if($this->getHeaderCss()): ?> class="<?php echo $this->getHeaderCss()?>"<?php endif; ?>><?php echo Mage::helper('manufacturers')->__($this->getTitle()) ?></h3>
29
+ </td>
30
+ <td class="form-buttons"><?php echo $this->getSaveButtonHtml() ?></td>
31
+ </tr>
32
+ </table>
33
+ </div>
34
+ <form action="<?php echo $this->getSaveUrl() ?>" method="post" id="manufacturers_edit_form" enctype="multipart/form-data">
35
+ <?php echo $this->getBlockHtml('formkey')?>
36
+ <?php echo $this->getChildHtml('form') ?>
37
+ </form>
38
+ <script type="text/javascript">
39
+ //<![CDATA[
40
+ var editForm = new varienForm('manufacturers_edit_form');
41
+ decorateGeneric($$('#manufacturers_edit_form table tr'), ['odd','even']);
42
+ //]]>
43
+ </script>
app/design/frontend/default/default/layout/ma2_all.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addItem"><type>js_css</type><css>ma2_all/ma2all.css</css></action>
6
+ <action method="addJs"><script>ma2_all/ma2all.js</script></action>
7
+ </reference>
8
+ </default>
9
+ </layout>
app/design/frontend/default/default/layout/ma2_manufacturers.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default translate="label">
4
+ <reference name="head">
5
+ <action method="addItem"><type>skin_css</type><name>ma2_manufacturers/css/frontend.css</name></action>
6
+ </reference>
7
+ </default>
8
+ </layout>
app/design/frontend/default/default/template/ma2_manufacturers/default.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: default.phtml 3 2014-01-13 09:15:57Z linhnt $ */
22
+
23
+ $manu_code = Mage::getStoreConfig('manufacturers/general/attr_code');
24
+ $manufacturers = $this->getManufacturers();
25
+ $thumbW = intval(Mage::getStoreConfig('manufacturers/general/thumb_w')) > 0 ? intval(Mage::getStoreConfig('manufacturers/general/thumb_w')) : 120;
26
+ $thumbH = intval(Mage::getStoreConfig('manufacturers/general/thumb_h')) > 0 ? intval(Mage::getStoreConfig('manufacturers/general/thumb_h')) : 60;
27
+ $dimension_spec = intval(Mage::getStoreConfig('manufacturers/general/dimension_spec')) == 1;
28
+ $showLogo = true;
29
+ if ($this->getShowLogo() != null && (int)$this->getShowLogo() == 0) $showLogo = false; // default is show
30
+ $showName = true;
31
+ if ($this->getShowName() != null && (int)$this->getShowName() == 0) $showName = false; // default is show
32
+ $showProductCount = false;
33
+ if ($this->getShowProductCount() != null && (int)$this->getShowProductCount() == 1) $showProductCount = true; // default is not show
34
+
35
+ if(is_array($manufacturers) && count($manufacturers)): ?>
36
+ <div class="ma2-manufacturers block">
37
+ <div class="block-inner">
38
+ <?php if ($this->getTitle()): ?>
39
+ <h3 class="block-title">
40
+ <span class="format-span">
41
+ <span><?php echo $this->getTitle(); ?></span>
42
+ </span>
43
+ </h3>
44
+ <?php endif; ?>
45
+ <ul class="manufacturers list">
46
+ <?php
47
+ foreach($manufacturers as $manufacturer){
48
+ $link = '{{store url="catalogsearch/advanced/result" _query="' . $manu_code . '='.$manufacturer['value'].'"}}';
49
+ $link_text = '';
50
+ if ($showLogo) $link_text .= '<img class="manufacturer-logo" '. ($dimension_spec ? 'width="'.$thumbW.'" height="'.$thumbH.'"' : '') . 'src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . ($manufacturer['image'] != '' ? $manufacturer['image'] : 'manufacturers/noimage.jpg') . '" alt="'. $manufacturer['label'] .'" />';
51
+ if ($showName) $link_text .= '<span class="manufacturer-name">' . $manufacturer['label'];
52
+ $link_text .= $showProductCount ? ' (' . $manufacturer['product_count'] . ')' : '';
53
+ $link_text .= '</span>';
54
+ echo '<li class="manufacturer"><a href="'.Mage::helper('cms')->getPageTemplateProcessor()->filter($link).'" title="'.$this->escapeHtml($manufacturer['label']).'">'. $link_text . '</a></li>';
55
+ }
56
+ ?>
57
+ </ul>
58
+ </div>
59
+ </div>
60
+ <?php endif; ?>
app/design/frontend/default/default/template/ma2_manufacturers/grid.phtml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: grid.phtml 3 2014-01-13 09:15:57Z linhnt $ */
22
+
23
+ $manu_code = Mage::getStoreConfig('manufacturers/general/attr_code');
24
+ $manufacturers = $this->getManufacturers();
25
+ $thumbW = intval(Mage::getStoreConfig('manufacturers/general/thumb_w')) > 0 ? intval(Mage::getStoreConfig('manufacturers/general/thumb_w')) : 120;
26
+ $thumbH = intval(Mage::getStoreConfig('manufacturers/general/thumb_h')) > 0 ? intval(Mage::getStoreConfig('manufacturers/general/thumb_h')) : 60;
27
+ $dimension_spec = intval(Mage::getStoreConfig('manufacturers/general/dimension_spec')) == 1;
28
+
29
+ $showLogo = true;
30
+ if ($this->getShowLogo() != null && (int)$this->getShowLogo() == 0) $showLogo = false; // default is show
31
+ $showName = true;
32
+ if ($this->getShowName() != null && (int)$this->getShowName() == 0) $showName = false; // default is show
33
+ $showProductCount = false;
34
+ if ($this->getShowProductCount() != null && (int)$this->getShowProductCount() == 1) $showProductCount = true; // default is not show
35
+
36
+ // grid
37
+ $gridColumn = 6;
38
+ if ($this->getGridCol() != null && (int)$this->getGridCol() > 0) $gridColumn = (int)$this->getGridCol();
39
+ $itemWidth = (100 / $gridColumn);
40
+
41
+ if(is_array($manufacturers) && count($manufacturers)): ?>
42
+ <div class="ma2-manufacturers block">
43
+ <div class="block-inner">
44
+ <?php if ($this->getTitle()): ?>
45
+ <h3 class="block-title">
46
+ <span class="format-span">
47
+ <span><?php echo $this->getTitle(); ?></span>
48
+ </span>
49
+ </h3>
50
+ <?php endif; ?>
51
+ <div class="manufacturers grid">
52
+ <?php
53
+ foreach($manufacturers as $idx => $manufacturer){
54
+ $link = '{{store url="catalogsearch/advanced/result" _query="' . $manu_code . '='.$manufacturer['value'].'"}}';
55
+ $link_text = '';
56
+ if ($showLogo) $link_text .= '<img class="manufacturer-logo" '. ($dimension_spec ? 'width="'.$thumbW.'" height="'.$thumbH.'"' : '') . 'src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . ($manufacturer['image'] != '' ? $manufacturer['image'] : 'manufacturers/noimage.jpg') . '" alt="'. $manufacturer['label'] .'" />';
57
+ if ($showName) $link_text .= '<span class="manufacturer-name">' . $manufacturer['label'];
58
+ $link_text .= $showProductCount ? ' (' . $manufacturer['product_count'] . ')' : '';
59
+ $link_text .= '</span>';
60
+ if ($idx % $gridColumn == 0) echo '<div class="row-separator clear"></div>';
61
+ echo '<div class="manufacturer" style="width: '.$itemWidth.'%;">
62
+ <div class="manufacturer-inner">
63
+ <a href="'.Mage::helper('cms')->getPageTemplateProcessor()->filter($link).'" title="'.$this->escapeHtml($manufacturer['label']).'">'. $link_text . '</a>
64
+ </div>
65
+ </div>';
66
+ }
67
+ ?>
68
+ </div>
69
+ <div class="clear"></div>
70
+ </div>
71
+ </div>
72
+ <?php endif; ?>
73
+ <?php
74
+ unset($showLogo, $showName, $showProductCount);
75
+ ?>
app/design/frontend/default/default/template/ma2_manufacturers/slider.phtml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagenMarket.com
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Edit or modify this file with yourown risk.
15
+ *
16
+ * @category Extensions
17
+ * @package Ma2_Manufacturers Free
18
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ **/
21
+ /* $Id: slider.phtml 3 2014-01-13 09:15:57Z linhnt $ */
22
+
23
+ $manu_code = Mage::getStoreConfig('manufacturers/general/attr_code');
24
+ $manufacturers = $this->getManufacturers();
25
+ $thumbW = intval(Mage::getStoreConfig('manufacturers/general/thumb_w')) > 0 ? intval(Mage::getStoreConfig('manufacturers/general/thumb_w')) : 120;
26
+ $thumbH = intval(Mage::getStoreConfig('manufacturers/general/thumb_h')) > 0 ? intval(Mage::getStoreConfig('manufacturers/general/thumb_h')) : 60;
27
+ $dimension_spec = intval(Mage::getStoreConfig('manufacturers/general/dimension_spec')) == 1;
28
+
29
+ $showLogo = true;
30
+ if ($this->getShowLogo() != null && (int)$this->getShowLogo() == 0) $showLogo = false; // default is show
31
+ $showName = true;
32
+ if ($this->getShowName() != null && (int)$this->getShowName() == 0) $showName = false; // default is show
33
+ $showProductCount = false;
34
+ if ($this->getShowProductCount() != null && (int)$this->getShowProductCount() == 1) $showProductCount = true; // default is not show
35
+
36
+ // grid
37
+ $gridColumn = 6;
38
+ if ($this->getGridCol() != null && (int)$this->getGridCol() > 0) $gridColumn = (int)$this->getGridCol();
39
+ $itemWidth = (100 / $gridColumn);
40
+
41
+ // uniq Id
42
+ $uniqId = Mage::helper('core')->uniqHash('manufacturers-slider-');
43
+
44
+
45
+ if(is_array($manufacturers) && count($manufacturers)): ?>
46
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl('ma2_manufacturers/js/carousel-min.js') ?>"></script>
47
+ <div class="ma2-manufacturers block" id="<?php echo $uniqId; ?>">
48
+ <div class="block-inner">
49
+ <?php if ($this->getTitle()): ?>
50
+ <h3 class="block-title">
51
+ <span class="format-span">
52
+ <span><?php echo $this->getTitle(); ?></span>
53
+ </span>
54
+ </h3>
55
+ <?php endif; ?>
56
+ <div class="controls">
57
+ <a rel="prev" class="carousel-control ico-prev" href="javascript:">&#8249;</a>
58
+ <a rel="next" class="carousel-control ico-next" href="javascript:">&#8250;</a>
59
+ </div>
60
+ <div class="manufacturers">
61
+ <div class="slider">
62
+ <div class="slider-inner">
63
+ <?php
64
+ foreach($manufacturers as $idx => $manufacturer){
65
+ $link = '{{store url="catalogsearch/advanced/result" _query="' . $manu_code . '='.$manufacturer['value'].'"}}';
66
+ $link_text = '';
67
+ if ($showLogo) $link_text .= '<img class="manufacturer-logo" '. ($dimension_spec ? 'width="'.$thumbW.'" height="'.$thumbH.'"' : '') . 'src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . ($manufacturer['image'] != '' ? $manufacturer['image'] : 'manufacturers/noimage.jpg') . '" alt="'. $manufacturer['label'] .'" />';
68
+ if ($showName) $link_text .= '<span class="manufacturer-name">' . $manufacturer['label'];
69
+ $link_text .= $showProductCount ? ' (' . $manufacturer['product_count'] . ')' : '';
70
+ $link_text .= '</span>';
71
+ if ($idx == 0){ echo '<div class="manufacturer-slide">';}
72
+ else if ($idx % $gridColumn == 0){ echo '</div><div class="manufacturer-slide">';}
73
+
74
+ echo '<div class="manufacturer" style="width: '.$itemWidth.'%;">
75
+ <div class="manufacturer-inner">
76
+ <a href="'.Mage::helper('cms')->getPageTemplateProcessor()->filter($link).'" title="'.$this->escapeHtml($manufacturer['label']).'">'. $link_text . '</a>
77
+ </div>
78
+ </div>';
79
+
80
+ if ($idx == count($manufacturers) - 1) echo '</div>';
81
+ }
82
+ ?>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ <div class="clear"></div>
87
+ </div>
88
+ </div>
89
+ <script type="text/javascript">
90
+ //<![CDATA[
91
+ Event.observe(window, "load", function() {
92
+
93
+ var slideWidth = $('<?php echo $uniqId; ?>').down('.block-inner').getWidth();
94
+ $$('#<?php echo $uniqId; ?> .slider').each(function(element){
95
+ element.setStyle({
96
+ width : slideWidth + 'px'
97
+ });
98
+ });
99
+
100
+ $$('#<?php echo $uniqId; ?> .manufacturer').each(function(element){
101
+ element.setStyle({
102
+ width : (slideWidth * <?php echo $itemWidth ?> / 100) + 'px'
103
+ });
104
+ });
105
+
106
+ new Carousel(
107
+ $('<?php echo $uniqId; ?>').down('.slider'),
108
+ $('<?php echo $uniqId; ?>').select('.manufacturer-slide'),
109
+ $('<?php echo $uniqId; ?>').select('.controls a'),
110
+ {
111
+ duration: 0.4,
112
+ auto: false,
113
+ frequency: 3,
114
+ circular: false,
115
+ wheel: false,
116
+ visibleSlides: 1,
117
+ effect: "scroll",
118
+ transition: "sinoidal"
119
+ }
120
+ );
121
+ });
122
+
123
+ //]]>
124
+ </script>
125
+ <?php endif; ?>
126
+ <?php
127
+ unset($showLogo, $showName, $showProductCount);
128
+ ?>
app/etc/modules/Ma2_All.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ma2_All>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Ma2_All>
8
+ </modules>
9
+ </config>
app/etc/modules/Ma2_Manufacturers.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ma2_Manufacturers>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.0</version>
8
+ </Ma2_Manufacturers>
9
+ </modules>
10
+ </config>
js/ma2_all/ma2all.css ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /*# TABS - Default pure style #######################################*/
3
+ .tab-list { position:relative; }
4
+ .tab-list .tab { float:left; cursor:pointer; }
5
+ .tab-list .last {}
6
+ .tab-list .active { cursor:default }
7
+ .tab-list .tab-container { position:absolute; left:0; width:100%; }
8
+ .tab-list .tab-content {overflow: hidden;}
9
+
10
+ .tab-list { padding-bottom:15px; margin:0 0 15px; }
11
+ .tab-list .tab { position:relative; z-index:2; margin-right:3px; background:#EEE; border: 1px solid #C4C4C4; color:#888; padding:0 0 0 10px; font-size:14px; }
12
+ .tab-list .tab span { padding:0 10px 0 0; line-height:24px; float:left; font-weight: bold;}
13
+ .tab-list .last {}
14
+ .tab-list .active { color:#000; font-weight:bold; z-index:3; border-bottom:0; background:#fff;
15
+ background-image: -moz-linear-gradient(top, #CDCDCD, #FFFFFF);
16
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#CDCDCD), to(#FFFFFF));
17
+ background-image: -webkit-linear-gradient(top, #CDCDCD, #FFFFFF);
18
+ background-image: -o-linear-gradient(top, #CDCDCD, #FFFFFF);
19
+ background-image: linear-gradient(to bottom, #CDCDCD, #FFFFFF);
20
+
21
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFCDCDCD', endColorstr='#FFFFFFFF', GradientType=0);
22
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
23
+ }
24
+ .tab-list .active span { background-position:100% 0; padding-bottom:1px; }
25
+ .tab-list .tab-container { z-index:1; top:25px; background:#fff; }
26
+ .tab-list .tab-content { padding: 1.2em 1em; background:#fff; border:1px solid #c4c4c4; font-size:12px; }
27
+ .tab-list .tab-content object,
28
+ .tab-list .tab-content embed { width:100% !important; height:auto !important; }
29
+
30
+ /*# #######################################*/
js/ma2_all/ma2all.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if (!window.Ma2All) {
2
+ window.Ma2All = {};
3
+ }
4
+ Ma2All.templatesPattern = /(^|.|\r|\n)(\{\{(.*?)\}\})/;
5
+
6
+ /* Tabs */
7
+ Ma2All.Tabs = Class.create();
8
+ Object.extend(Ma2All.Tabs.prototype, {
9
+ initialize: function (container) {
10
+ this.container = $(container);
11
+ this.container.addClassName('tab-list');
12
+ this.tabs = this.container.select('dt.tab');
13
+ this.activeTab = this.tabs.first();
14
+ this.tabs.first().addClassName('first');
15
+ this.tabs.last().addClassName('last');
16
+ this.onTabClick = this.handleTabClick.bindAsEventListener(this);
17
+ for (var i = 0, l = this.tabs.length; i < l; i ++) {
18
+ this.tabs[i].observe('click', this.onTabClick);
19
+ }
20
+ this.select();
21
+ },
22
+ handleTabClick: function (evt) {
23
+ this.activeTab = Event.findElement(evt, 'dt');
24
+ this.select();
25
+ },
26
+ select: function () {
27
+ for (var i = 0, l = this.tabs.length; i < l; i ++) {
28
+ if (this.tabs[i] == this.activeTab) {
29
+ this.tabs[i].addClassName('active');
30
+ this.tabs[i].style.zIndex = this.tabs.length + 2;
31
+ /*this.tabs[i].next('dd').show();*/
32
+ new Effect.Appear (this.tabs[i].next('dd'), { duration:0.5 });
33
+ this.tabs[i].parentNode.style.height=this.tabs[i].next('dd').getHeight() + 15 + 'px';
34
+ } else {
35
+ this.tabs[i].removeClassName('active');
36
+ this.tabs[i].style.zIndex = this.tabs.length + 1 - i;
37
+ this.tabs[i].next('dd').hide();
38
+ }
39
+ }
40
+ }
41
+ });
media/manufacturers/KennethCole.jpg ADDED
Binary file
media/manufacturers/LG.jpg ADDED
Binary file
media/manufacturers/acco.jpg ADDED
Binary file
media/manufacturers/acer.jpg ADDED
Binary file
media/manufacturers/aiwa.png ADDED
Binary file
media/manufacturers/amd.jpg ADDED
Binary file
media/manufacturers/apple.jpg ADDED
Binary file
media/manufacturers/argus-logo.png ADDED
Binary file
media/manufacturers/asics.jpg ADDED
Binary file
media/manufacturers/at_t.png ADDED
Binary file
media/manufacturers/blackberry.jpg ADDED
Binary file
media/manufacturers/canon.jpg ADDED
Binary file
media/manufacturers/crucial.jpg ADDED
Binary file
media/manufacturers/dell.jpg ADDED
Binary file
media/manufacturers/ecco.jpg ADDED
Binary file
media/manufacturers/gateway.png ADDED
Binary file
media/manufacturers/hp.jpg ADDED
Binary file
media/manufacturers/htc.png ADDED
Binary file
media/manufacturers/image.jpg ADDED
Binary file
media/manufacturers/intel.jpg ADDED
Binary file
media/manufacturers/jvc.jpg ADDED
Binary file
media/manufacturers/kodakextColor.jpg ADDED
Binary file
media/manufacturers/logitech.png ADDED
Binary file
media/manufacturers/microsoft.jpg ADDED
Binary file
media/manufacturers/ninewest.png ADDED
Binary file
media/manufacturers/noimage.jpg ADDED
Binary file
media/manufacturers/nokia.jpg ADDED
Binary file
media/manufacturers/olympus.jpg ADDED
Binary file
media/manufacturers/panasonic.gif ADDED
Binary file
media/manufacturers/philips.jpg ADDED
Binary file
media/manufacturers/resized/KennethCole.jpg ADDED
Binary file
media/manufacturers/resized/LG.jpg ADDED
Binary file
media/manufacturers/resized/acco.jpg ADDED
Binary file
media/manufacturers/resized/acer.jpg ADDED
Binary file
media/manufacturers/resized/aiwa.png ADDED
Binary file
media/manufacturers/resized/amd.jpg ADDED
Binary file
media/manufacturers/resized/apple.jpg ADDED
Binary file
media/manufacturers/resized/argus-logo.png ADDED
Binary file
media/manufacturers/resized/asics.jpg ADDED
Binary file
media/manufacturers/resized/at_t.png ADDED
Binary file
media/manufacturers/resized/blackberry.jpg ADDED
Binary file
media/manufacturers/resized/canon.jpg ADDED
Binary file
media/manufacturers/resized/crucial.jpg ADDED
Binary file
media/manufacturers/resized/dell.jpg ADDED
Binary file
media/manufacturers/resized/ecco.jpg ADDED
Binary file
media/manufacturers/resized/gateway.png ADDED
Binary file
media/manufacturers/resized/hp.jpg ADDED
Binary file
media/manufacturers/resized/htc.png ADDED
Binary file
media/manufacturers/resized/image.jpg ADDED
Binary file
media/manufacturers/resized/intel.jpg ADDED
Binary file
media/manufacturers/resized/jvc.jpg ADDED
Binary file
media/manufacturers/resized/kodakextColor.jpg ADDED
Binary file
media/manufacturers/resized/logitech.png ADDED
Binary file
media/manufacturers/resized/microsoft.jpg ADDED
Binary file
media/manufacturers/resized/ninewest.png ADDED
Binary file
media/manufacturers/resized/noimage.jpg ADDED
Binary file
media/manufacturers/resized/nokia.jpg ADDED
Binary file
media/manufacturers/resized/olympus.jpg ADDED
Binary file
media/manufacturers/resized/panasonic.gif ADDED
Binary file
media/manufacturers/resized/philips.jpg ADDED
Binary file
media/manufacturers/resized/samsung.jpg ADDED
Binary file
media/manufacturers/resized/seagate.gif ADDED
Binary file
media/manufacturers/resized/sony.jpg ADDED
Binary file
media/manufacturers/resized/stevemadden.logo.jpg ADDED
Binary file
media/manufacturers/resized/toshiba.jpg ADDED
Binary file
media/manufacturers/resized/westerndigital.jpg ADDED
Binary file
media/manufacturers/resized/yamaha.jpg ADDED
Binary file
media/manufacturers/samsung.jpg ADDED
Binary file
media/manufacturers/seagate.gif ADDED
Binary file
media/manufacturers/sony.jpg ADDED
Binary file
media/manufacturers/stevemadden.logo.jpg ADDED
Binary file
media/manufacturers/toshiba.jpg ADDED
Binary file
media/manufacturers/westerndigital.jpg ADDED
Binary file
media/manufacturers/yamaha.jpg ADDED
Binary file
package.xml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Ma2_Manufacturers_Free</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>Ma2 Manufacturers free module for Magento CE helps you introduce to customers your featured or manufacturers / brands</summary>
10
+ <description>Ma2 (Shop by) Manufacturers free module for Magento CE helps you introduce to customers your featured or all manufacturers / brands and help they quickly find the products via manufacturers / brands. This module allows you upload manufacturers' logo and configure many display options.</description>
11
+ <notes>Version number: 1.0.0&#xD;
12
+ Stability: Stable &#xD;
13
+ Compatibility: 1.7, 1.8, 1.8.1</notes>
14
+ <authors><author><name>Magenmarket.com</name><user>Magen_Market</user><email>trungdt@omegatheme.com</email></author></authors>
15
+ <date>2014-01-16</date>
16
+ <time>01:59:25</time>
17
+ <contents><target name="magecommunity"><dir name="Ma2"><dir name="Manufacturers"><dir name="Block"><dir name="Adminhtml"><dir name="Default"><file name="Form.php" hash="259359860587e7637f39f6a80262e6b9"/></dir><file name="Default.php" hash="311649c1c764a39f932fcf10ce027f06"/></dir><file name="List.php" hash="0a5dac565b2568eb5d9d33ac6b76433c"/></dir><dir name="Helper"><file name="Data.php" hash="0fa59568787759b6a1f85a3a09353765"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Manuid.php" hash="d2e704aee5eb328c8b3a89dbed7bf148"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="DefaultController.php" hash="ac2ae143389eda9b914634f237d449ca"/></dir><file name="IndexController.php" hash="fe162badc87a69efd9f97f276e2045af"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b83c1a2662abe5575f1af96634d5d124"/><file name="config.xml" hash="b96f30788388b8b4aee6e6f7f5864cd6"/><file name="system.xml" hash="e488aba114aff4ae24f7ae5b0bc5b003"/></dir></dir></dir></target><target name="magelocal"><dir name="Ma2"><dir name="All"><dir name="Helper"><file name="Data.php" hash="090f4bd5ef8f576332f30e6bfc007c5d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9e1f55ce0e5915b7b22d87e94d4da9ea"/><file name="config.xml" hash="be5bb5343d9525bb292c8e26d2aa68f7"/><file name="system.xml" hash="e687810f26218933731768f75c28e9d6"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ma2_all.xml" hash="f0f2088fe954efa17abc4c138d1c301a"/><file name="ma2_manufacturers.xml" hash="b94fae9c5e6ca3634f85bf56f69720bb"/></dir><dir name="template"><dir name="ma2_manufacturers"><file name="default.phtml" hash="7601d2a952f365fde9ddb4e1fb40d82a"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ma2_all.xml" hash="60da2a96f1c431e35c409190c269af68"/><file name="ma2_manufacturers.xml" hash="8a47d9b1854b0194e149e6bfc3d09c70"/></dir><dir name="template"><dir name="ma2_manufacturers"><file name="default.phtml" hash="6fba3785ffdc2ab0b08d870511229dae"/><file name="grid.phtml" hash="507d937aafcf8f47c89a48084c95307a"/><file name="slider.phtml" hash="ce6cdf9838c674b071bef3a4b29f9ade"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ma2_All.xml" hash="1f6125faeadf108fc81b1a03b4574d59"/><file name="Ma2_Manufacturers.xml" hash="42cda5aa40945db1c09860799f7eb502"/></dir></target><target name="mage"><dir name="js"><dir name="ma2_all"><file name="ma2all.css" hash="9c4db2cea69d0b7e2a03c149dc21749e"/><file name="ma2all.js" hash="a0e4d21d363f5b9cdfc4c6c0731f6b69"/></dir></dir></target><target name="magemedia"><dir name="manufacturers"><file name="KennethCole.jpg" hash="0edf15d5bcad9a84e62423e41d815e2e"/><file name="LG.jpg" hash="46f5103fcf46b66abe3352624e6a9b3e"/><file name="acco.jpg" hash="1a88d394fe01f1c7dc589388d2b5aff0"/><file name="acer.jpg" hash="a61ecc28cb5859dc8886110fe0dc586e"/><file name="aiwa.png" hash="31b90bb05494971d340798b05479e220"/><file name="amd.jpg" hash="b07ab53f93e10749ba042583e49f0754"/><file name="apple.jpg" hash="fc0d01f855fdd84b9f39b6654c996fd4"/><file name="argus-logo.png" hash="01be2a12ce433f5d6b276b46babe6de2"/><file name="asics.jpg" hash="38281ca166d556711066dc004d521591"/><file name="at_t.png" hash="df7748798198f29b8a99a264a25009eb"/><file name="blackberry.jpg" hash="45979740c10842ce25eeed28a6c41ace"/><file name="canon.jpg" hash="048adaeb70402b6a4c8c0791787e11e8"/><file name="crucial.jpg" hash="e1472ac59e75c9b510c0a5e386c3be4d"/><file name="dell.jpg" hash="b03cd73f571b32282c204850a0edddf4"/><file name="ecco.jpg" hash="298ff283349324a228c1d01a8162ea3f"/><file name="gateway.png" hash="c8d229c5397ffbd4e2226703b9d7f468"/><file name="hp.jpg" hash="6b3d22100c97b93ba8fd4f1ad6261753"/><file name="htc.png" hash="ab2c96ac517808ee832eb6588e5684a6"/><file name="image.jpg" hash="097ab8a3051bc037ea3de0e17f440540"/><file name="intel.jpg" hash="d44ffa47daf1a032e24bba541c17b6e8"/><file name="jvc.jpg" hash="6cfc19fa935c243c7d205322fe2aca9f"/><file name="kodakextColor.jpg" hash="e62460dc2eb78e85fbdddad4f0c96d93"/><file name="logitech.png" hash="cb9e42409851d81b8a30f5d89675ed7f"/><file name="microsoft.jpg" hash="c8a797767547c993895495fa41d15ee2"/><file name="ninewest.png" hash="a52e246f76081bd9d4406899cbe211a3"/><file name="noimage.jpg" hash="097ab8a3051bc037ea3de0e17f440540"/><file name="nokia.jpg" hash="0425f7b839056031e6dcdc34cb49aae5"/><file name="olympus.jpg" hash="9a3cef09c81d71646c0d35aa2fdb4e84"/><file name="panasonic.gif" hash="2b3488cfc5f39cc30017194c0f4e3964"/><file name="philips.jpg" hash="66065e19489d35fb93208724def915f7"/><dir name="resized"><file name="KennethCole.jpg" hash="6704bdecbc2acf05e523d2ad06d4b07d"/><file name="LG.jpg" hash="6c7f5db1d4b335dec9e30d5035a4d937"/><file name="acco.jpg" hash="b34acea1c26c3788f1412ad3e6dfb094"/><file name="acer.jpg" hash="976ce64c2b26b34e0c85ffa6968f7fda"/><file name="aiwa.png" hash="b721dca9dc69f29076527ac8a7c58bdd"/><file name="amd.jpg" hash="162f7939523806cc5f7f22f0bb284d87"/><file name="apple.jpg" hash="8e908e254680939788878a60ffdf191d"/><file name="argus-logo.png" hash="c0c67a02e4682b3bdaf31819a3d9ec7f"/><file name="asics.jpg" hash="b486f33edc6180e7ec3b2ee5897e0175"/><file name="at_t.png" hash="275670d170d0c42ef0b7b1b999e2c7c7"/><file name="blackberry.jpg" hash="15d3df1cbdb49f4d86f6ce94eb8b0d89"/><file name="canon.jpg" hash="7de0aa7992ea70885fd9a205bba9794a"/><file name="crucial.jpg" hash="e7b0a7830a04ae8a68051720c51eb86d"/><file name="dell.jpg" hash="3007821b2fc0b83ca9154baa74420539"/><file name="ecco.jpg" hash="14c742593f949ff0c36d9ceb1a173d67"/><file name="gateway.png" hash="38998d2ad6b9de617c19381323f03951"/><file name="hp.jpg" hash="003ac84e1ab845abfef1350ea5736798"/><file name="htc.png" hash="b953db8f6e06a577e83546ea20d023ef"/><file name="image.jpg" hash="93040423df30fc0be299db2263148a26"/><file name="intel.jpg" hash="1f9cb8e36a16bbd2049207fe99ebe073"/><file name="jvc.jpg" hash="75181400c268fdda7a10a1893a998b69"/><file name="kodakextColor.jpg" hash="fb9e96b21468af7ce531f9c4b92ed38a"/><file name="logitech.png" hash="5d61e1b88043e249b5df190f3cd841db"/><file name="microsoft.jpg" hash="1142e5dad5500e0ab20a734294f2dc56"/><file name="ninewest.png" hash="6d95f7f430ef82146bde5da3be9c297b"/><file name="noimage.jpg" hash="93040423df30fc0be299db2263148a26"/><file name="nokia.jpg" hash="e147ece0d04bb772de9458cd77ed7580"/><file name="olympus.jpg" hash="4f9b95cd5e8620462c2749378b28c719"/><file name="panasonic.gif" hash="633ae62d71037f4f5f891c01632e55a3"/><file name="philips.jpg" hash="bb209446c2706518461395c6f3d106c9"/><file name="samsung.jpg" hash="8399f2669fe5da6c579367393e453b64"/><file name="seagate.gif" hash="854f68f35af1d0ae1a3da6fd7ca5a06e"/><file name="sony.jpg" hash="c3817e866150a4a67e9b656b39095b37"/><file name="stevemadden.logo.jpg" hash="50fc18b7302cad3418af931de073867e"/><file name="toshiba.jpg" hash="b377e0ff5fffb59feb115b865600b9dc"/><file name="westerndigital.jpg" hash="7176141f7852fb05d92fcd5b7fa59394"/><file name="yamaha.jpg" hash="4977b81bb6b6f21e5695e05d99e66e52"/></dir><file name="samsung.jpg" hash="fd1944d647680498858df05861d8eb3c"/><file name="seagate.gif" hash="cbb5eb3e9e61e7a19679787358f70c1c"/><file name="sony.jpg" hash="2be9bff582206341440b29930188ffcb"/><file name="stevemadden.logo.jpg" hash="a7df22cec066f939a3708361fb7416da"/><file name="toshiba.jpg" hash="cf940391da66933ae14d25b8e6239e40"/><file name="westerndigital.jpg" hash="ced6f7499b436736b6eefcef84c2a47e"/><file name="yamaha.jpg" hash="380389e94116dd59996b5508f0694ca4"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="ma2_manufacturers"><dir name="css"><file name="frontend.css" hash="aa1d3915909c8f88d5a1ce7ce7ecd4be"/></dir><dir name="js"><file name="carousel-min.js" hash="cfd7a8d08a6dca87e4211a400877716e"/></dir></dir></dir></dir></dir></target></contents>
18
+ <compatible/>
19
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
+ </package>
skin/frontend/default/default/ma2_manufacturers/css/frontend.css ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * MagenMarket.com
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
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Edit or modify this file with yourown risk.
14
+ *
15
+ * @category Extensions
16
+ * @package Ma2_Manufacturers Free
17
+ * @copyright Copyright (c) 2013 MagenMarket. (http://www.magenmarket.com)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ **/
20
+ /* $Id: frontend.css 3 2014-01-13 09:15:57Z linhnt $ */
21
+
22
+ .ma2-manufacturers{}
23
+ .ma2-manufacturers .clear {clear: both;}
24
+ .ma2-manufacturers .manufacturers{}
25
+
26
+ /* LIST */
27
+ .ma2-manufacturers .list{}
28
+ .ma2-manufacturers .list .manufacturer{}
29
+
30
+ /* GRID */
31
+
32
+ .ma2-manufacturers .grid{ padding: 10px; }
33
+
34
+ .ma2-manufacturers .grid .manufacturer{
35
+ float: left;
36
+ }
37
+ .ma2-manufacturers .manufacturer-inner{ padding: 5px;}
38
+ .ma2-manufacturers .grid .manufacturer-name{
39
+ display: block;
40
+ }
41
+
42
+ /* SLIDER */
43
+ .ma2-manufacturers .manufacturers {overflow: hidden;}
44
+ .ma2-manufacturers .slider {overflow: hidden;}
45
+ .ma2-manufacturers .slider .manufacturer{
46
+ float: left;
47
+ }
48
+ .ma2-manufacturers .slider .manufacturer-name{
49
+ display: block;
50
+ }
51
+ .ma2-manufacturers .block-inner {position: relative;}
52
+ .ma2-manufacturers .slider-inner {width: 5000em;}
53
+ .ma2-manufacturers .manufacturer-slide {float: left;}
54
+ .ma2-manufacturers .manufacturer-slide .manufacturer-inner{padding: 5px; text-align: center;}
55
+ .ma2-manufacturers .controls {position: absolute; top: 0; right: 5px; z-index: 1;}
56
+ .ma2-manufacturers .controls a{
57
+ border: 1px solid #DDDDDD;
58
+ display: inline-block;
59
+ font-size: 18px;
60
+ height: 20px;
61
+ line-height: 18px;
62
+ margin: 1px;
63
+ outline: medium none;
64
+ text-align: center;
65
+ text-decoration: none;
66
+ width: 20px;
67
+ }
skin/frontend/default/default/ma2_manufacturers/js/carousel-min.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Copyright (c) 2009 Victor Stanciu - http://www.victorstanciu.ro
3
+
4
+ Permission is hereby granted, free of charge, to any person
5
+ obtaining a copy of this software and associated documentation
6
+ files (the "Software"), to deal in the Software without
7
+ restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
+ OTHER DEALINGS IN THE SOFTWARE.
24
+ */
25
+ eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1C=19.1a(1D,{1b:7(c,d,e,f){4.o=t;4.h=$(c);4.8=d;4.k=e;4.5=F.G({p:1,1c:t,1d:3,q:1,1e:\'H-1E\',1f:\'H-1F\',I:\'H-1G\',J:\'H-1H\',r:t,v:K,w:\'1g\',S:\'T\'},f||{});6(4.5.w==\'L\'){4.5.r=K}4.8.1I(7(a,b){a.M=b});6(4.k){4.k.N(\'U\',\'V\',4.V.z(4))}6(4.5.v){4.h.U(\'1J\',4.v.1h(4)).U(\'1K\',4.v.1h(4))}6(4.5.1c){4.A()}6(4.5.1i){9 g=4.8.1L($(4.5.1i));6(g>(4.5.q-1)&&4.5.q>1){6(g>4.8.i-(4.5.q+1)){g=4.8.i-4.5.q}}4.l(4.8[g])}},V:7(a){4.B();9 b=a.1M(\'a\');6(!b.W(4.5.I)){6(b.W(4.5.1e)){1N("4."+b.1j+"()")}s 6(b.W(4.5.1f)){4.l(b.1j);6(4.5.J){4.k.N(\'1k\',4.5.J);b.1l(4.5.J)}}}4.X();a.B()},l:7(a){6(4.5.Y&&(Z 4.5.Y==\'7\')){4.5.Y()}4.10=4.m?4.m:4.8[0];4.m=$(a);9 b=4.h.1m();9 c=4.m.1m();6(4.o){4.o.1O()}1n(4.5.w){O\'L\':4.o=11 n.1o(4.h,{1p:1.0,1q:0,p:4.5.p,12:(7(){4.h.C=c[0]-b[0];4.h.D=c[1]-b[1];11 n.1o(4.h,{1p:0,1q:1.0,p:4.5.p,12:(7(){6(4.k){4.P()}6(4.5.u&&(Z 4.5.u==\'7\')){4.5.u()}}).z(4)})}).z(4)});Q;O\'1g\':1r:9 d;1n(4.5.S){O\'1s\':d=n.1t.1s;Q;O\'T\':1r:d=n.1t.T;Q}4.o=11 n.13(4.h,{p:4.5.p,x:(c[0]-b[0]),y:(c[1]-b[1]),S:d,12:(7(){6(4.k){4.P()}6(4.5.u&&(Z 4.5.u==\'7\')){4.5.u()}4.o=t}).z(4)});Q}R t},1u:7(){6(4.m){9 a=4.m.M;9 b=(a==0)?(4.5.r?4.8.i-1:0):a-1}s{9 b=(4.5.r?4.8.i-1:0)}6(b==(4.8.i-1)&&4.5.r&&4.5.w!=\'L\'){4.h.C=(4.8.i-1)*4.8.14().1P();4.h.D=(4.8.i-1)*4.8.14().1Q();b=4.8.i-2}4.l(4.8[b])},15:7(){6(4.m){9 a=4.m.M;9 b=(4.8.i-1==a)?(4.5.r?0:a):a+1}s{9 b=1}6(b==0&&4.5.r&&4.5.w!=\'L\'){4.h.C=0;4.h.D=0;b=1}6(b>4.8.i-(4.5.q+1)){b=4.8.i-4.5.q}4.l(4.8[b])},14:7(){4.l(4.8[0])},1R:7(){4.l(4.8[4.8.i-1])},1S:7(){6(4.10){4.l(4.8[4.10.M])}s{R t}},B:7(){6(4.E){1v(4.E)}},A:7(){4.16()},1T:7(){4.B();4.P()},1U:7(b){6(b){9 c=b.1V||b.1W;6(!c||(!4.8.1X(c)&&!4.8.1Y(7(a){R c.1Z(a)}))){4.A()}}s{4.A()}},16:7(){6(4.E!=20){1v(4.E);4.15()}4.E=21(4.16.z(4),4.5.1d*22)},v:7(a){a.23=K;a.B();9 b=0;6(!a){a=24.25}6(a.1w){b=a.1w/26}s 6(a.1x){b=-a.1x/3}6(!4.o){4.X();6(b>0){4.1u()}s{4.15()}}R 27.28(b)},X:7(){4.k.N(\'1l\',4.5.I)},P:7(){4.k.N(\'1k\',4.5.I)}});n.13=19.1a();F.G(F.G(n.13.1y,n.29.1y),{1b:7(a){4.j=$(a);9 b=F.G({x:0,y:0,1z:\'1A\'},2a[1]||{});4.A(b)},2b:7(){6(4.5.2c&&!4.j.1B){4.j.2d();4.j.1B=K;4.j.2e(4.j.2f)}4.17=4.j.C;4.18=4.j.D;6(4.5.1z==\'1A\'){4.5.x-=4.17;4.5.y-=4.18}},2g:7(a){4.j.C=4.5.x*a+4.17;4.j.D=4.5.y*a+4.18}});',62,141,'||||this|options|if|function|slides|var||||||||scroller|length|element|controls|moveTo|current|Effect|scrolling|duration|visibleSlides|circular|else|false|afterMove|wheel|effect|||bind|start|stop|scrollLeft|scrollTop|timer|Object|extend|carousel|disabledClassName|selectedClassName|true|fade|_index|invoke|case|activateControls|break|return|transition|sinoidal|observe|click|hasClassName|deactivateControls|beforeMove|typeof|previous|new|afterFinish|SmoothScroll|first|next|periodicallyUpdate|originalLeft|originalTop|Class|create|initialize|auto|frequency|controlClassName|jumperClassName|scroll|bindAsEventListener|initial|rel|removeClassName|addClassName|cumulativeOffset|switch|Opacity|from|to|default|spring|Transitions|prev|clearTimeout|wheelDelta|detail|prototype|mode|absolute|_ext|Carousel|Abstract|control|jumper|disabled|selected|each|mousewheel|DOMMouseScroll|indexOf|findElement|eval|cancel|getWidth|getHeight|last|toggle|pause|resume|relatedTarget|toElement|include|any|descendantOf|null|setTimeout|1000|cancelBubble|window|event|120|Math|round|Base|arguments|setup|continuous|cleanWhitespace|appendChild|firstChild|update'.split('|'),0,{}))