Product_Back_Image_On_Hover - Version 1.0.0

Version Notes

First Release.

Download this release

Release Info

Developer SetuBridge
Extension Product_Back_Image_On_Hover
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (28) hide show
  1. app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview.php +21 -0
  2. app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Edit.php +54 -0
  3. app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Edit/Form.php +28 -0
  4. app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Edit/Tab/Form.php +67 -0
  5. app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Edit/Tabs.php +33 -0
  6. app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Grid.php +125 -0
  7. app/code/local/Sbridge/Moreview/Block/Moreview.php +26 -0
  8. app/code/local/Sbridge/Moreview/Helper/Data.php +15 -0
  9. app/code/local/Sbridge/Moreview/Model/Moreview.php +19 -0
  10. app/code/local/Sbridge/Moreview/Model/Mysql4/Moreview.php +19 -0
  11. app/code/local/Sbridge/Moreview/Model/Mysql4/Moreview/Collection.php +19 -0
  12. app/code/local/Sbridge/Moreview/Model/Status.php +24 -0
  13. app/code/local/Sbridge/Moreview/controllers/Adminhtml/MoreviewController.php +223 -0
  14. app/code/local/Sbridge/Moreview/controllers/IndexController.php +56 -0
  15. app/code/local/Sbridge/Moreview/etc/adminhtml.xml +31 -0
  16. app/code/local/Sbridge/Moreview/etc/config.xml +91 -0
  17. app/code/local/Sbridge/Moreview/etc/system.xml +74 -0
  18. app/code/local/Sbridge/Moreview/sql/moreview_setup/mysql4-install-0.1.0.php +32 -0
  19. app/design/adminhtml/default/default/layout/moreview.xml +8 -0
  20. app/design/frontend/default/default/layout/moreview.xml +61 -0
  21. app/design/frontend/default/default/template/moreview/crosssell.phtml +60 -0
  22. app/design/frontend/default/default/template/moreview/list.phtml +139 -0
  23. app/design/frontend/default/default/template/moreview/moreview.phtml +74 -0
  24. app/design/frontend/default/default/template/moreview/related.phtml +97 -0
  25. app/design/frontend/default/default/template/moreview/upsell.phtml +55 -0
  26. app/etc/modules/Sbridge_Moreview.xml +17 -0
  27. package.xml +31 -0
  28. skin/frontend/default/default/css/moreview.css +24 -0
app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+ class Sbridge_Moreview_Block_Adminhtml_Moreview extends Mage_Adminhtml_Block_Widget_Grid_Container
12
+ {
13
+ public function __construct()
14
+ {
15
+ $this->_controller = 'adminhtml_moreview';
16
+ $this->_blockGroup = 'moreview';
17
+ $this->_headerText = Mage::helper('moreview')->__('Item Manager');
18
+ $this->_addButtonLabel = Mage::helper('moreview')->__('Add Item');
19
+ parent::__construct();
20
+ }
21
+ }
app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Edit.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Block_Adminhtml_Moreview_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
13
+ {
14
+ public function __construct()
15
+ {
16
+ parent::__construct();
17
+
18
+ $this->_objectId = 'id';
19
+ $this->_blockGroup = 'moreview';
20
+ $this->_controller = 'adminhtml_moreview';
21
+
22
+ $this->_updateButton('save', 'label', Mage::helper('moreview')->__('Save Item'));
23
+ $this->_updateButton('delete', 'label', Mage::helper('moreview')->__('Delete Item'));
24
+
25
+ $this->_addButton('saveandcontinue', array(
26
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
27
+ 'onclick' => 'saveAndContinueEdit()',
28
+ 'class' => 'save',
29
+ ), -100);
30
+
31
+ $this->_formScripts[] = "
32
+ function toggleEditor() {
33
+ if (tinyMCE.getInstanceById('moreview_content') == null) {
34
+ tinyMCE.execCommand('mceAddControl', false, 'moreview_content');
35
+ } else {
36
+ tinyMCE.execCommand('mceRemoveControl', false, 'moreview_content');
37
+ }
38
+ }
39
+
40
+ function saveAndContinueEdit(){
41
+ editForm.submit($('edit_form').action+'back/edit/');
42
+ }
43
+ ";
44
+ }
45
+
46
+ public function getHeaderText()
47
+ {
48
+ if( Mage::registry('moreview_data') && Mage::registry('moreview_data')->getId() ) {
49
+ return Mage::helper('moreview')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('moreview_data')->getTitle()));
50
+ } else {
51
+ return Mage::helper('moreview')->__('Add Item');
52
+ }
53
+ }
54
+ }
app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Edit/Form.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Block_Adminhtml_Moreview_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
13
+ {
14
+ protected function _prepareForm()
15
+ {
16
+ $form = new Varien_Data_Form(array(
17
+ 'id' => 'edit_form',
18
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
19
+ 'method' => 'post',
20
+ 'enctype' => 'multipart/form-data'
21
+ )
22
+ );
23
+
24
+ $form->setUseContainer(true);
25
+ $this->setForm($form);
26
+ return parent::_prepareForm();
27
+ }
28
+ }
app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Edit/Tab/Form.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Block_Adminhtml_Moreview_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
13
+ {
14
+ protected function _prepareForm()
15
+ {
16
+ $form = new Varien_Data_Form();
17
+ $this->setForm($form);
18
+ $fieldset = $form->addFieldset('moreview_form', array('legend'=>Mage::helper('moreview')->__('Item information')));
19
+
20
+ $fieldset->addField('title', 'text', array(
21
+ 'label' => Mage::helper('moreview')->__('Title'),
22
+ 'class' => 'required-entry',
23
+ 'required' => true,
24
+ 'name' => 'title',
25
+ ));
26
+
27
+ $fieldset->addField('filename', 'file', array(
28
+ 'label' => Mage::helper('moreview')->__('File'),
29
+ 'required' => false,
30
+ 'name' => 'filename',
31
+ ));
32
+
33
+ $fieldset->addField('status', 'select', array(
34
+ 'label' => Mage::helper('moreview')->__('Status'),
35
+ 'name' => 'status',
36
+ 'values' => array(
37
+ array(
38
+ 'value' => 1,
39
+ 'label' => Mage::helper('moreview')->__('Enabled'),
40
+ ),
41
+
42
+ array(
43
+ 'value' => 2,
44
+ 'label' => Mage::helper('moreview')->__('Disabled'),
45
+ ),
46
+ ),
47
+ ));
48
+
49
+ $fieldset->addField('content', 'editor', array(
50
+ 'name' => 'content',
51
+ 'label' => Mage::helper('moreview')->__('Content'),
52
+ 'title' => Mage::helper('moreview')->__('Content'),
53
+ 'style' => 'width:700px; height:500px;',
54
+ 'wysiwyg' => false,
55
+ 'required' => true,
56
+ ));
57
+
58
+ if ( Mage::getSingleton('adminhtml/session')->getMoreviewData() )
59
+ {
60
+ $form->setValues(Mage::getSingleton('adminhtml/session')->getMoreviewData());
61
+ Mage::getSingleton('adminhtml/session')->setMoreviewData(null);
62
+ } elseif ( Mage::registry('moreview_data') ) {
63
+ $form->setValues(Mage::registry('moreview_data')->getData());
64
+ }
65
+ return parent::_prepareForm();
66
+ }
67
+ }
app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Edit/Tabs.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Block_Adminhtml_Moreview_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
13
+ {
14
+
15
+ public function __construct()
16
+ {
17
+ parent::__construct();
18
+ $this->setId('moreview_tabs');
19
+ $this->setDestElementId('edit_form');
20
+ $this->setTitle(Mage::helper('moreview')->__('Item Information'));
21
+ }
22
+
23
+ protected function _beforeToHtml()
24
+ {
25
+ $this->addTab('form_section', array(
26
+ 'label' => Mage::helper('moreview')->__('Item Information'),
27
+ 'title' => Mage::helper('moreview')->__('Item Information'),
28
+ 'content' => $this->getLayout()->createBlock('moreview/adminhtml_moreview_edit_tab_form')->toHtml(),
29
+ ));
30
+
31
+ return parent::_beforeToHtml();
32
+ }
33
+ }
app/code/local/Sbridge/Moreview/Block/Adminhtml/Moreview/Grid.php ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Block_Adminhtml_Moreview_Grid extends Mage_Adminhtml_Block_Widget_Grid
13
+ {
14
+ public function __construct()
15
+ {
16
+ parent::__construct();
17
+ $this->setId('moreviewGrid');
18
+ $this->setDefaultSort('moreview_id');
19
+ $this->setDefaultDir('ASC');
20
+ $this->setSaveParametersInSession(true);
21
+ }
22
+
23
+ protected function _prepareCollection()
24
+ {
25
+ $collection = Mage::getModel('moreview/moreview')->getCollection();
26
+ $this->setCollection($collection);
27
+ return parent::_prepareCollection();
28
+ }
29
+
30
+ protected function _prepareColumns()
31
+ {
32
+ $this->addColumn('moreview_id', array(
33
+ 'header' => Mage::helper('moreview')->__('ID'),
34
+ 'align' =>'right',
35
+ 'width' => '50px',
36
+ 'index' => 'moreview_id',
37
+ ));
38
+
39
+ $this->addColumn('title', array(
40
+ 'header' => Mage::helper('moreview')->__('Title'),
41
+ 'align' =>'left',
42
+ 'index' => 'title',
43
+ ));
44
+
45
+ /*
46
+ $this->addColumn('content', array(
47
+ 'header' => Mage::helper('moreview')->__('Item Content'),
48
+ 'width' => '150px',
49
+ 'index' => 'content',
50
+ ));
51
+ */
52
+
53
+ $this->addColumn('status', array(
54
+ 'header' => Mage::helper('moreview')->__('Status'),
55
+ 'align' => 'left',
56
+ 'width' => '80px',
57
+ 'index' => 'status',
58
+ 'type' => 'options',
59
+ 'options' => array(
60
+ 1 => 'Enabled',
61
+ 2 => 'Disabled',
62
+ ),
63
+ ));
64
+
65
+ $this->addColumn('action',
66
+ array(
67
+ 'header' => Mage::helper('moreview')->__('Action'),
68
+ 'width' => '100',
69
+ 'type' => 'action',
70
+ 'getter' => 'getId',
71
+ 'actions' => array(
72
+ array(
73
+ 'caption' => Mage::helper('moreview')->__('Edit'),
74
+ 'url' => array('base'=> '*/*/edit'),
75
+ 'field' => 'id'
76
+ )
77
+ ),
78
+ 'filter' => false,
79
+ 'sortable' => false,
80
+ 'index' => 'stores',
81
+ 'is_system' => true,
82
+ ));
83
+
84
+ $this->addExportType('*/*/exportCsv', Mage::helper('moreview')->__('CSV'));
85
+ $this->addExportType('*/*/exportXml', Mage::helper('moreview')->__('XML'));
86
+
87
+ return parent::_prepareColumns();
88
+ }
89
+
90
+ protected function _prepareMassaction()
91
+ {
92
+ $this->setMassactionIdField('moreview_id');
93
+ $this->getMassactionBlock()->setFormFieldName('moreview');
94
+
95
+ $this->getMassactionBlock()->addItem('delete', array(
96
+ 'label' => Mage::helper('moreview')->__('Delete'),
97
+ 'url' => $this->getUrl('*/*/massDelete'),
98
+ 'confirm' => Mage::helper('moreview')->__('Are you sure?')
99
+ ));
100
+
101
+ $statuses = Mage::getSingleton('moreview/status')->getOptionArray();
102
+
103
+ array_unshift($statuses, array('label'=>'', 'value'=>''));
104
+ $this->getMassactionBlock()->addItem('status', array(
105
+ 'label'=> Mage::helper('moreview')->__('Change status'),
106
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
107
+ 'additional' => array(
108
+ 'visibility' => array(
109
+ 'name' => 'status',
110
+ 'type' => 'select',
111
+ 'class' => 'required-entry',
112
+ 'label' => Mage::helper('moreview')->__('Status'),
113
+ 'values' => $statuses
114
+ )
115
+ )
116
+ ));
117
+ return $this;
118
+ }
119
+
120
+ public function getRowUrl($row)
121
+ {
122
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
123
+ }
124
+
125
+ }
app/code/local/Sbridge/Moreview/Block/Moreview.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+ class Sbridge_Moreview_Block_Moreview extends Mage_Core_Block_Template
12
+ {
13
+ public function _prepareLayout()
14
+ {
15
+ return parent::_prepareLayout();
16
+ }
17
+
18
+ public function getMoreview()
19
+ {
20
+ if (!$this->hasData('moreview')) {
21
+ $this->setData('moreview', Mage::registry('moreview'));
22
+ }
23
+ return $this->getData('moreview');
24
+
25
+ }
26
+ }
app/code/local/Sbridge/Moreview/Helper/Data.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Helper_Data extends Mage_Core_Helper_Abstract
13
+ {
14
+
15
+ }
app/code/local/Sbridge/Moreview/Model/Moreview.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Model_Moreview extends Mage_Core_Model_Abstract
13
+ {
14
+ public function _construct()
15
+ {
16
+ parent::_construct();
17
+ $this->_init('moreview/moreview');
18
+ }
19
+ }
app/code/local/Sbridge/Moreview/Model/Mysql4/Moreview.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Model_Mysql4_Moreview extends Mage_Core_Model_Mysql4_Abstract
13
+ {
14
+ public function _construct()
15
+ {
16
+ // Note that the moreview_id refers to the key field in your database table.
17
+ $this->_init('moreview/moreview', 'moreview_id');
18
+ }
19
+ }
app/code/local/Sbridge/Moreview/Model/Mysql4/Moreview/Collection.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Model_Mysql4_Moreview_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
13
+ {
14
+ public function _construct()
15
+ {
16
+ parent::_construct();
17
+ $this->_init('moreview/moreview');
18
+ }
19
+ }
app/code/local/Sbridge/Moreview/Model/Status.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Model_Status extends Varien_Object
13
+ {
14
+ const STATUS_ENABLED = 1;
15
+ const STATUS_DISABLED = 2;
16
+
17
+ static public function getOptionArray()
18
+ {
19
+ return array(
20
+ self::STATUS_ENABLED => Mage::helper('moreview')->__('Enabled'),
21
+ self::STATUS_DISABLED => Mage::helper('moreview')->__('Disabled')
22
+ );
23
+ }
24
+ }
app/code/local/Sbridge/Moreview/controllers/Adminhtml/MoreviewController.php ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ class Sbridge_Moreview_Adminhtml_MoreviewController extends Mage_Adminhtml_Controller_action
13
+ {
14
+
15
+ protected function _initAction() {
16
+ $this->loadLayout()
17
+ ->_setActiveMenu('moreview/items')
18
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
19
+
20
+ return $this;
21
+ }
22
+
23
+ public function indexAction() {
24
+ $this->_initAction()
25
+ ->renderLayout();
26
+ }
27
+
28
+ public function editAction() {
29
+ $id = $this->getRequest()->getParam('id');
30
+ $model = Mage::getModel('moreview/moreview')->load($id);
31
+
32
+ if ($model->getId() || $id == 0) {
33
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
34
+ if (!empty($data)) {
35
+ $model->setData($data);
36
+ }
37
+
38
+ Mage::register('moreview_data', $model);
39
+
40
+ $this->loadLayout();
41
+ $this->_setActiveMenu('moreview/items');
42
+
43
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
44
+ $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
45
+
46
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
47
+
48
+ $this->_addContent($this->getLayout()->createBlock('moreview/adminhtml_moreview_edit'))
49
+ ->_addLeft($this->getLayout()->createBlock('moreview/adminhtml_moreview_edit_tabs'));
50
+
51
+ $this->renderLayout();
52
+ } else {
53
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('moreview')->__('Item does not exist'));
54
+ $this->_redirect('*/*/');
55
+ }
56
+ }
57
+
58
+ public function newAction() {
59
+ $this->_forward('edit');
60
+ }
61
+
62
+ public function saveAction() {
63
+ if ($data = $this->getRequest()->getPost()) {
64
+
65
+ if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
66
+ try {
67
+ /* Starting upload */
68
+ $uploader = new Varien_File_Uploader('filename');
69
+
70
+ // Any extention would work
71
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
72
+ $uploader->setAllowRenameFiles(false);
73
+
74
+ // Set the file upload mode
75
+ // false -> get the file directly in the specified folder
76
+ // true -> get the file in the product like folders
77
+ // (file.jpg will go in something like /media/f/i/file.jpg)
78
+ $uploader->setFilesDispersion(false);
79
+
80
+ // We set media as the upload dir
81
+ $path = Mage::getBaseDir('media') . DS ;
82
+ $uploader->save($path, $_FILES['filename']['name'] );
83
+
84
+ } catch (Exception $e) {
85
+
86
+ }
87
+
88
+ //this way the name is saved in DB
89
+ $data['filename'] = $_FILES['filename']['name'];
90
+ }
91
+
92
+
93
+ $model = Mage::getModel('moreview/moreview');
94
+ $model->setData($data)
95
+ ->setId($this->getRequest()->getParam('id'));
96
+
97
+ try {
98
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
99
+ $model->setCreatedTime(now())
100
+ ->setUpdateTime(now());
101
+ } else {
102
+ $model->setUpdateTime(now());
103
+ }
104
+
105
+ $model->save();
106
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('moreview')->__('Item was successfully saved'));
107
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
108
+
109
+ if ($this->getRequest()->getParam('back')) {
110
+ $this->_redirect('*/*/edit', array('id' => $model->getId()));
111
+ return;
112
+ }
113
+ $this->_redirect('*/*/');
114
+ return;
115
+ } catch (Exception $e) {
116
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
117
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
118
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
119
+ return;
120
+ }
121
+ }
122
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('moreview')->__('Unable to find item to save'));
123
+ $this->_redirect('*/*/');
124
+ }
125
+
126
+ public function deleteAction() {
127
+ if( $this->getRequest()->getParam('id') > 0 ) {
128
+ try {
129
+ $model = Mage::getModel('moreview/moreview');
130
+
131
+ $model->setId($this->getRequest()->getParam('id'))
132
+ ->delete();
133
+
134
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
135
+ $this->_redirect('*/*/');
136
+ } catch (Exception $e) {
137
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
138
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
139
+ }
140
+ }
141
+ $this->_redirect('*/*/');
142
+ }
143
+
144
+ public function massDeleteAction() {
145
+ $moreviewIds = $this->getRequest()->getParam('moreview');
146
+ if(!is_array($moreviewIds)) {
147
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
148
+ } else {
149
+ try {
150
+ foreach ($moreviewIds as $moreviewId) {
151
+ $moreview = Mage::getModel('moreview/moreview')->load($moreviewId);
152
+ $moreview->delete();
153
+ }
154
+ Mage::getSingleton('adminhtml/session')->addSuccess(
155
+ Mage::helper('adminhtml')->__(
156
+ 'Total of %d record(s) were successfully deleted', count($moreviewIds)
157
+ )
158
+ );
159
+ } catch (Exception $e) {
160
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
161
+ }
162
+ }
163
+ $this->_redirect('*/*/index');
164
+ }
165
+
166
+ public function massStatusAction()
167
+ {
168
+ $moreviewIds = $this->getRequest()->getParam('moreview');
169
+ if(!is_array($moreviewIds)) {
170
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
171
+ } else {
172
+ try {
173
+ foreach ($moreviewIds as $moreviewId) {
174
+ $moreview = Mage::getSingleton('moreview/moreview')
175
+ ->load($moreviewId)
176
+ ->setStatus($this->getRequest()->getParam('status'))
177
+ ->setIsMassupdate(true)
178
+ ->save();
179
+ }
180
+ $this->_getSession()->addSuccess(
181
+ $this->__('Total of %d record(s) were successfully updated', count($moreviewIds))
182
+ );
183
+ } catch (Exception $e) {
184
+ $this->_getSession()->addError($e->getMessage());
185
+ }
186
+ }
187
+ $this->_redirect('*/*/index');
188
+ }
189
+
190
+ public function exportCsvAction()
191
+ {
192
+ $fileName = 'moreview.csv';
193
+ $content = $this->getLayout()->createBlock('moreview/adminhtml_moreview_grid')
194
+ ->getCsv();
195
+
196
+ $this->_sendUploadResponse($fileName, $content);
197
+ }
198
+
199
+ public function exportXmlAction()
200
+ {
201
+ $fileName = 'moreview.xml';
202
+ $content = $this->getLayout()->createBlock('moreview/adminhtml_moreview_grid')
203
+ ->getXml();
204
+
205
+ $this->_sendUploadResponse($fileName, $content);
206
+ }
207
+
208
+ protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
209
+ {
210
+ $response = $this->getResponse();
211
+ $response->setHeader('HTTP/1.1 200 OK','');
212
+ $response->setHeader('Pragma', 'public', true);
213
+ $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
214
+ $response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
215
+ $response->setHeader('Last-Modified', date('r'));
216
+ $response->setHeader('Accept-Ranges', 'bytes');
217
+ $response->setHeader('Content-Length', strlen($content));
218
+ $response->setHeader('Content-type', $contentType);
219
+ $response->setBody($content);
220
+ $response->sendResponse();
221
+ die;
222
+ }
223
+ }
app/code/local/Sbridge/Moreview/controllers/IndexController.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+ class Sbridge_Moreview_IndexController extends Mage_Core_Controller_Front_Action
12
+ {
13
+ public function indexAction()
14
+ {
15
+
16
+ /*
17
+ * Load an object by id
18
+ * Request looking like:
19
+ * http://site.com/moreview?id=15
20
+ * or
21
+ * http://site.com/moreview/id/15
22
+ */
23
+ /*
24
+ $moreview_id = $this->getRequest()->getParam('id');
25
+
26
+ if($moreview_id != null && $moreview_id != '') {
27
+ $moreview = Mage::getModel('moreview/moreview')->load($moreview_id)->getData();
28
+ } else {
29
+ $moreview = null;
30
+ }
31
+ */
32
+
33
+ /*
34
+ * If no param we load a the last created item
35
+ */
36
+ /*
37
+ if($moreview == null) {
38
+ $resource = Mage::getSingleton('core/resource');
39
+ $read= $resource->getConnection('core_read');
40
+ $moreviewTable = $resource->getTableName('moreview');
41
+
42
+ $select = $read->select()
43
+ ->from($moreviewTable,array('moreview_id','title','content','status'))
44
+ ->where('status',1)
45
+ ->order('created_time DESC') ;
46
+
47
+ $moreview = $read->fetchRow($select);
48
+ }
49
+ Mage::register('moreview', $moreview);
50
+ */
51
+
52
+
53
+ $this->loadLayout();
54
+ $this->renderLayout();
55
+ }
56
+ }
app/code/local/Sbridge/Moreview/etc/adminhtml.xml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ /**
3
+ * @category Sbridge
4
+ * @package Sbridge_Moreview
5
+ * @author ModuleCreator
6
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
7
+ */
8
+ -->
9
+ <?xml version="1.0" ?>
10
+ <config>
11
+ <acl>
12
+ <resources>
13
+ <admin>
14
+ <children>
15
+ <system>
16
+ <children>
17
+ <config>
18
+ <children>
19
+ <moreview_section translate="title" module="moreview">
20
+ <!--<title>Manage Request</title>-->
21
+ <sort_order>100</sort_order>
22
+ </moreview_section>
23
+ </children>
24
+ </config>
25
+ </children>
26
+ </system>
27
+ </children>
28
+ </admin>
29
+ </resources>
30
+ </acl>
31
+ </config>
app/code/local/Sbridge/Moreview/etc/config.xml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category Sbridge
5
+ * @package Sbridge_Moreview
6
+ * @author ModuleCreator
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Sbridge_Moreview>
13
+ <version>0.1.0</version>
14
+ </Sbridge_Moreview>
15
+ </modules>
16
+ <frontend>
17
+ <routers>
18
+ <moreview>
19
+ <use>standard</use>
20
+ <args>
21
+ <module>Sbridge_Moreview</module>
22
+ <frontName>moreview</frontName>
23
+ </args>
24
+ </moreview>
25
+ </routers>
26
+ <layout>
27
+ <updates>
28
+ <moreview>
29
+ <file>moreview.xml</file>
30
+ </moreview>
31
+ </updates>
32
+ </layout>
33
+ </frontend>
34
+ <admin>
35
+ <routers>
36
+ <moreview>
37
+ <use>admin</use>
38
+ <args>
39
+ <module>Sbridge_Moreview</module>
40
+ <frontName>moreview</frontName>
41
+ </args>
42
+ </moreview>
43
+ </routers>
44
+ </admin>
45
+ <global>
46
+ <models>
47
+ <moreview>
48
+ <class>Sbridge_Moreview_Model</class>
49
+ <resourceModel>moreview_mysql4</resourceModel>
50
+ </moreview>
51
+ <moreview_mysql4>
52
+ <class>Sbridge_Moreview_Model_Mysql4</class>
53
+ <entities>
54
+ <moreview>
55
+ <table>moreview</table>
56
+ </moreview>
57
+ </entities>
58
+ </moreview_mysql4>
59
+ </models>
60
+ <resources>
61
+ <moreview_setup>
62
+ <setup>
63
+ <module>Sbridge_Moreview</module>
64
+ </setup>
65
+ <connection>
66
+ <use>core_setup</use>
67
+ </connection>
68
+ </moreview_setup>
69
+ <moreview_write>
70
+ <connection>
71
+ <use>core_write</use>
72
+ </connection>
73
+ </moreview_write>
74
+ <moreview_read>
75
+ <connection>
76
+ <use>core_read</use>
77
+ </connection>
78
+ </moreview_read>
79
+ </resources>
80
+ <blocks>
81
+ <moreview>
82
+ <class>Sbridge_Moreview_Block</class>
83
+ </moreview>
84
+ </blocks>
85
+ <helpers>
86
+ <moreview>
87
+ <class>Sbridge_Moreview_Helper</class>
88
+ </moreview>
89
+ </helpers>
90
+ </global>
91
+ </config>
app/code/local/Sbridge/Moreview/etc/system.xml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ /**
3
+ * @category Sbridge
4
+ * @package Sbridge_Moreview
5
+ * @author ModuleCreator
6
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
7
+ */
8
+ -->
9
+ <?xml version="1.0" encoding="utf-8"?>
10
+ <config>
11
+ <tabs>
12
+ <mycustom_tab1 module="moreview" translate="label">
13
+ <label>Sbridge</label>
14
+ <sort_order>100</sort_order>
15
+ </mycustom_tab1>
16
+ </tabs>
17
+ <sections>
18
+ <moreview_section module="moreview" translate="label">
19
+ <label>Moreview</label>
20
+ <sort_order>100</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
+ <tab>mycustom_tab1</tab>
25
+ <groups>
26
+ <general_group translate="label">
27
+ <label>General</label>
28
+ <sort_order>10</sort_order>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>1</show_in_store>
32
+ <fields>
33
+ <module_moreview translate="label">
34
+ <label>Enable Module?</label>
35
+ <frontend_type>select</frontend_type>
36
+ <sort_order>1</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ <source_model>adminhtml/system_config_source_yesno</source_model>
41
+ </module_moreview>
42
+ <short_desc_instructions translate="label">
43
+ <label>Cross sell</label>
44
+ <frontend_type>select</frontend_type>
45
+ <sort_order>2</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ <source_model>adminhtml/system_config_source_yesno</source_model>
50
+ </short_desc_instructions>
51
+ <upsell_products translate="label">
52
+ <label>Up sell</label>
53
+ <frontend_type>select</frontend_type>
54
+ <sort_order>3</sort_order>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ <source_model>adminhtml/system_config_source_yesno</source_model>
59
+ </upsell_products>
60
+ <related_products translate="label">
61
+ <label>Related Product</label>
62
+ <frontend_type>select</frontend_type>
63
+ <sort_order>4</sort_order>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
+ <source_model>adminhtml/system_config_source_yesno</source_model>
68
+ </related_products>
69
+ </fields>
70
+ </general_group>
71
+ </groups>
72
+ </moreview_section>
73
+ </sections>
74
+ </config>
app/code/local/Sbridge/Moreview/sql/moreview_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+
12
+ $installer = $this;
13
+
14
+ $installer->startSetup();
15
+
16
+ $installer->run("
17
+
18
+ -- DROP TABLE IF EXISTS {$this->getTable('moreview')};
19
+ CREATE TABLE {$this->getTable('moreview')} (
20
+ `moreview_id` int(11) unsigned NOT NULL auto_increment,
21
+ `title` varchar(255) NOT NULL default '',
22
+ `filename` varchar(255) NOT NULL default '',
23
+ `content` text NOT NULL default '',
24
+ `status` smallint(6) NOT NULL default '0',
25
+ `created_time` datetime NULL,
26
+ `update_time` datetime NULL,
27
+ PRIMARY KEY (`moreview_id`)
28
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
29
+
30
+ ");
31
+
32
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/moreview.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <moreview_adminhtml_moreview_index>
4
+ <reference name="content">
5
+ <block type="moreview/adminhtml_moreview" name="moreview" />
6
+ </reference>
7
+ </moreview_adminhtml_moreview_index>
8
+ </layout>
app/design/frontend/default/default/layout/moreview.xml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ /**
3
+ * @category Sbridge
4
+ * @package Sbridge_Moreview
5
+ * @author ModuleCreator
6
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
7
+ */
8
+ -->
9
+ <?xml version="1.0"?>
10
+ <layout version="0.1.0">
11
+ <default>
12
+ <reference name="head">
13
+ <action method="addCss" ifconfig="moreview_section/general_group/module_moreview"><stylesheeet>css/moreview.css</stylesheeet></action>
14
+ </reference>
15
+ </default>
16
+ <moreview_index_index>
17
+ <reference name="content">
18
+ <block type="moreview/moreview" name="moreview" template="moreview/moreview.phtml" />
19
+ </reference>
20
+ </moreview_index_index>
21
+
22
+ <catalog_category_layered translate="label">
23
+ <reference name="product_list">
24
+ <action method="setTemplate" ifconfig="moreview_section/general_group/module_moreview">
25
+ <template>moreview/list.phtml</template>
26
+ </action>
27
+ </reference>
28
+ </catalog_category_layered>
29
+
30
+ <catalog_category_default translate="label">
31
+ <reference name="product_list">
32
+ <action method="setTemplate" ifconfig="moreview_section/general_group/module_moreview">
33
+ <template>moreview/list.phtml</template>
34
+ </action>
35
+ </reference>
36
+ </catalog_category_default>
37
+
38
+ <checkout_cart_index translate="label">
39
+ <reference name="checkout.cart.crosssell">
40
+ <action method="setTemplate" ifconfig="moreview_section/general_group/short_desc_instructions">
41
+ <template>moreview/crosssell.phtml</template>
42
+ </action>
43
+ </reference>
44
+ </checkout_cart_index>
45
+
46
+ <catalog_product_view translate="label">
47
+ <reference name="catalog.product.related">
48
+ <action method="setTemplate" ifconfig="moreview_section/general_group/related_products">
49
+ <template>moreview/related.phtml</template>
50
+ </action>
51
+ </reference>
52
+ </catalog_product_view>
53
+
54
+ <catalog_product_view translate="label">
55
+ <reference name="product.info.upsell">
56
+ <action method="setTemplate" ifconfig="moreview_section/general_group/upsell_products">
57
+ <template>moreview/upsell.phtml</template>
58
+ </action>
59
+ </reference>
60
+ </catalog_product_view>
61
+ </layout>
app/design/frontend/default/default/template/moreview/crosssell.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+ /**
12
+ * Cart cross sell items template
13
+ *
14
+ * @see Mage_Checkout_Block_Cart_Crosssell
15
+ */
16
+ $config = Mage::getStoreConfig('moreview_section/general_group/module_moreview');
17
+ if($config == 1):
18
+ ?>
19
+ <?php if($this->getItemCount()): ?>
20
+ <div class="crosssell">
21
+ <h2><?php echo $this->__('Based on your selection, you may be interested in the following items:') ?></h2>
22
+ <ul id="crosssell-products-list">
23
+ <?php foreach ($this->getItems() as $_item): ?>
24
+ <li class="item">
25
+ <a class="product-image" href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>">
26
+
27
+ <?php
28
+ $sb=0;
29
+ $imagesCount = Mage::getModel('catalog/product')->load($_item->getId())->getMediaGalleryImages();
30
+ if(count($imagesCount) >1 ):
31
+ $_images = $imagesCount->getItemByColumnValue('label', 'back');
32
+ if($_images)
33
+ {
34
+ $sb=1;
35
+ ?>
36
+ <img class="sbmoreview" src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail', $_images->getFile())->resize(75); ?>" alt="<?php echo $this->htmlEscape($_images->getLabel());?>" title="<?php $this->htmlEscape($_images->getLabel());?>"/>
37
+ <?php }
38
+ endif;?>
39
+
40
+ <img class="<?php if($sb==1)echo "sbview";?>" src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(75); ?>" width="75" height="75" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" /></a>
41
+ <div class="product-details">
42
+ <h3 class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?></a></h3>
43
+ <?php echo $this->getPriceHtml($_item, true) ?>
44
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
45
+ <ul class="add-to-links">
46
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
47
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
48
+ <?php endif; ?>
49
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_item)): ?>
50
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
51
+ <?php endif; ?>
52
+ </ul>
53
+ </div>
54
+ </li>
55
+ <?php endforeach; ?>
56
+ </ul>
57
+ <script type="text/javascript">decorateList('crosssell-products-list', 'none-recursive')</script>
58
+ </div>
59
+ <?php endif; ?>
60
+ <?php endif; ?>
app/design/frontend/default/default/template/moreview/list.phtml ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+ /**
12
+ * Product list template
13
+ *
14
+ * @see Mage_Catalog_Block_Product_List
15
+ */
16
+ ?>
17
+ <?php
18
+ $_productCollection=$this->getLoadedProductCollection();
19
+ $_helper = $this->helper('catalog/output');
20
+ ?>
21
+ <?php if(!$_productCollection->count()): ?>
22
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
23
+ <?php else: ?>
24
+ <div class="category-products">
25
+ <?php echo $this->getToolbarHtml() ?>
26
+ <?php // List mode ?>
27
+ <?php if($this->getMode()!='grid'): ?>
28
+ <?php $_iterator = 0; ?>
29
+ <ol class="products-list" id="products-list">
30
+ <?php foreach ($_productCollection as $_product): ?>
31
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
32
+ <?php // Product Image ?>
33
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
34
+ <?php
35
+ $sb=0;
36
+ $imagesCount = Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages();
37
+ if(count($imagesCount) >1 ):
38
+ $_images = $imagesCount->getItemByColumnValue('label', 'back');
39
+ if($_images)
40
+ {
41
+ $sb=1;
42
+ ?>
43
+ <img class="sbmoreview" src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail', $_images->getFile())->resize(135); ?>" alt="<?php echo $this->htmlEscape($_images->getLabel());?>" title="<?php $this->htmlEscape($_images->getLabel());?>"/>
44
+ <?php }
45
+ endif;?>
46
+ <img class="<?php if($sb==1)echo "sbview";?>" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
47
+ <?php // Product description ?>
48
+ <div class="product-shop">
49
+ <div class="f-fix">
50
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
51
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
52
+ <?php if($_product->getRatingSummary()): ?>
53
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
54
+ <?php endif; ?>
55
+ <?php echo $this->getPriceHtml($_product, true) ?>
56
+ <?php if($_product->isSaleable()): ?>
57
+ <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>
58
+ <?php else: ?>
59
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
60
+ <?php endif; ?>
61
+ <div class="desc std">
62
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
63
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
64
+ </div>
65
+ <ul class="add-to-links">
66
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
67
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
68
+ <?php endif; ?>
69
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
70
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
71
+ <?php endif; ?>
72
+ </ul>
73
+ </div>
74
+ </div>
75
+ </li>
76
+ <?php endforeach; ?>
77
+ </ol>
78
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
79
+
80
+ <?php else: ?>
81
+
82
+ <?php // Grid Mode ?>
83
+
84
+ <?php $_collectionSize = $_productCollection->count() ?>
85
+ <?php $_columnCount = $this->getColumnCount(); ?>
86
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
87
+ <?php if ($i++%$_columnCount==0): ?>
88
+ <ul class="products-grid">
89
+ <?php endif; ?>
90
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
91
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
92
+ <?php
93
+ $sb=0;
94
+ $imagesCount = Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages();
95
+ if(count($imagesCount) >1 ):
96
+ $_images = $imagesCount->getItemByColumnValue('label', 'back');
97
+ if($_images)
98
+ {
99
+ $sb=1;
100
+ ?>
101
+ <img class="sbmoreview" src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail', $_images->getFile())->resize(135); ?>" alt="<?php echo $this->htmlEscape($_images->getLabel());?>" title="<?php $this->htmlEscape($_images->getLabel());?>"/>
102
+ <?php }
103
+ endif;?>
104
+ <img class="<?php if($sb==1)echo "sbview";?>" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
105
+ <!--<img src="<?php echo $this->getSkinUrl('images/')?>home_main_callout.jpg" class="sbmoreview"/>-->
106
+ </a>
107
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
108
+ <?php if($_product->getRatingSummary()): ?>
109
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
110
+ <?php endif; ?>
111
+ <?php echo $this->getPriceHtml($_product, true) ?>
112
+ <div class="actions">
113
+ <?php if($_product->isSaleable()): ?>
114
+ <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>
115
+ <?php else: ?>
116
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
117
+ <?php endif; ?>
118
+ <ul class="add-to-links">
119
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
120
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
121
+ <?php endif; ?>
122
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
123
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
124
+ <?php endif; ?>
125
+ </ul>
126
+ </div>
127
+ </li>
128
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
129
+ </ul>
130
+ <?php endif ?>
131
+ <?php endforeach ?>
132
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
133
+ <?php endif; ?>
134
+
135
+ <div class="toolbar-bottom">
136
+ <?php echo $this->getToolbarHtml() ?>
137
+ </div>
138
+ </div>
139
+ <?php endif; ?>
app/design/frontend/default/default/template/moreview/moreview.phtml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <h4><?php echo $this->__('Module List') ?></h4>
11
+ <?php
12
+
13
+ /*
14
+ This shows how to load specific fields from a record in the database.
15
+ 1) Note the load(15), this corresponds to saying "select * from table where table_id = 15"
16
+ 2) You can then just use the get(fieldname) to pull specific data from the table.
17
+ 3) If you have a field named news_id, then it becomes getNewsId, etc.
18
+ */
19
+ /*
20
+ $news = Mage::getModel('moreview/moreview')->load(15);
21
+ echo $news->getNewsId();
22
+ echo $news->getTitle();
23
+ echo $news->getContent();
24
+ echo $news->getStatus();
25
+ */
26
+
27
+ /*
28
+ This shows an alternate way of loading datas from a record using the database the "Magento Way" (using blocks and controller).
29
+ Uncomment blocks in /app/code/local/Namespace/Module/controllers/IndexController.php if you want to use it.
30
+
31
+ */
32
+ /*
33
+ $object = $this->getMoreview();
34
+ echo 'id: '.$object['test_id'].'<br/>';
35
+ echo 'title: '.$object['title'].'<br/>';
36
+ echo 'content: '.$object['content'].'<br/>';
37
+ echo 'status: '.$object['status'].'<br/>';
38
+ */
39
+
40
+
41
+ /*
42
+ This shows how to load multiple rows in a collection and save a change to them.
43
+ 1) The setPageSize function will load only 5 records per page and you can set the current Page with the setCurPage function.
44
+ 2) The $collection->walk('save') allows you to save everything in the collection after all changes have been made.
45
+ */
46
+ /*
47
+ $i = 0;
48
+
49
+ $collection = Mage::getModel('moreview/moreview')->getCollection();
50
+ $collection->setPageSize(5);
51
+ $collection->setCurPage(2);
52
+ $size = $collection->getSize();
53
+ $cnt = count($collection);
54
+ foreach ($collection as $item) {
55
+ $i = $i+1;
56
+ $item->setTitle($i);
57
+ echo $item->getTitle();
58
+ }
59
+
60
+ $collection->walk('save');
61
+ */
62
+
63
+ /*
64
+ This shows how to load a single record and save a change.
65
+ 1) Note the setTitle, this corresponds to the table field name, title, and then you pass it the text to change.
66
+ 2) Call the save() function only on a single record.
67
+ */
68
+ /*
69
+ $object = Mage::getModel('moreview/moreview')->load(1);
70
+ $object->setTitle('This is a changed title');
71
+ $object->save();
72
+ */
73
+
74
+ ?>
app/design/frontend/default/default/template/moreview/related.phtml ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+ $config = Mage::getStoreConfig('moreview_section/general_group/module_moreview');
12
+ if($config == 1):
13
+ ?>
14
+ <?php if($this->getItems()->getSize()): ?>
15
+ <div class="block block-related">
16
+ <div class="block-title">
17
+ <strong><span><?php echo $this->__('Related Products') ?></span></strong>
18
+ </div>
19
+ <div class="block-content">
20
+ <p class="block-subtitle"><?php echo $this->__('Check items to add to the cart or') ?>&nbsp;<a href="#" onclick="selectAllRelated(this); return false;"><?php echo $this->__('select all') ?></a></p>
21
+ <ol class="mini-products-list" id="block-related">
22
+ <?php foreach($this->getItems() as $_item): ?>
23
+ <li class="item">
24
+ <?php if(!$_item->isComposite() && $_item->isSaleable()): ?>
25
+ <?php if (!$_item->getRequiredOptions()): ?>
26
+ <input type="checkbox" class="checkbox related-checkbox" id="related-checkbox<?php echo $_item->getId() ?>" name="related_products[]" value="<?php echo $_item->getId() ?>" />
27
+ <?php endif; ?>
28
+ <?php endif; ?>
29
+ <div class="product">
30
+ <a href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>" class="product-image">
31
+
32
+ <?php
33
+ $sb=0;
34
+ $imagesCount = Mage::getModel('catalog/product')->load($_item->getId())->getMediaGalleryImages();
35
+ if(count($imagesCount) >1 ):
36
+ $_images = $imagesCount->getItemByColumnValue('label', 'back');
37
+ if($_images)
38
+ {
39
+ $sb=1;
40
+ ?>
41
+ <img class="sbmoreview" src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail', $_images->getFile())->resize(50); ?>" alt="<?php echo $this->htmlEscape($_images->getLabel());?>" title="<?php $this->htmlEscape($_images->getLabel());?>"/>
42
+ <?php }
43
+ endif;?>
44
+
45
+ <img class="<?php if($sb==1)echo "sbview";?>" src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(50) ?>" width="50" height="50" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" /></a>
46
+ <div class="product-details">
47
+ <p class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?></a></p>
48
+ <?php echo $this->getPriceHtml($_item, true, '-related') ?>
49
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
50
+ <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a>
51
+ <?php endif; ?>
52
+ </div>
53
+ </div>
54
+ </li>
55
+ <?php endforeach ?>
56
+ </ol>
57
+ <script type="text/javascript">decorateList('block-related', 'none-recursive')</script>
58
+ </div>
59
+ <script type="text/javascript">
60
+ //<![CDATA[
61
+ $$('.related-checkbox').each(function(elem){
62
+ Event.observe(elem, 'click', addRelatedToProduct)
63
+ });
64
+
65
+ var relatedProductsCheckFlag = false;
66
+ function selectAllRelated(txt){
67
+ if (relatedProductsCheckFlag == false) {
68
+ $$('.related-checkbox').each(function(elem){
69
+ elem.checked = true;
70
+ });
71
+ relatedProductsCheckFlag = true;
72
+ txt.innerHTML="<?php echo $this->__('unselect all') ?>";
73
+ } else {
74
+ $$('.related-checkbox').each(function(elem){
75
+ elem.checked = false;
76
+ });
77
+ relatedProductsCheckFlag = false;
78
+ txt.innerHTML="<?php echo $this->__('select all') ?>";
79
+ }
80
+ addRelatedToProduct();
81
+ }
82
+
83
+ function addRelatedToProduct(){
84
+ var checkboxes = $$('.related-checkbox');
85
+ var values = [];
86
+ for(var i=0;i<checkboxes.length;i++){
87
+ if(checkboxes[i].checked) values.push(checkboxes[i].value);
88
+ }
89
+ if($('related-products-field')){
90
+ $('related-products-field').value = values.join(',');
91
+ }
92
+ }
93
+ //]]>
94
+ </script>
95
+ </div>
96
+ <?php endif ?>
97
+ <?php endif ?>
app/design/frontend/default/default/template/moreview/upsell.phtml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Setubridge Technolabs
5
+ * http://www.setubridge.com/
6
+ * @author SetuBridge
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ **/
9
+ ?>
10
+ <?php
11
+ $config = Mage::getStoreConfig('moreview_section/general_group/module_moreview');
12
+ if($config == 1):
13
+ ?>
14
+ <?php if(count($this->getItemCollection()->getItems())): ?>
15
+ <div class="box-collateral box-up-sell">
16
+ <h2><?php echo $this->__('You may also be interested in the following product(s)') ?></h2>
17
+ <table class="products-grid" id="upsell-product-table">
18
+ <?php // $this->setColumnCount(5); // uncomment this line if you want to have another number of columns. also can be changed in layout ?>
19
+ <?php $this->resetItemsIterator() ?>
20
+ <?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
21
+ <tr>
22
+ <?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
23
+ <?php if($_link=$this->getIterableItem()): ?>
24
+ <td>
25
+ <a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>" class="product-image">
26
+
27
+ <?php
28
+ $sb=0;
29
+ $imagesCount = Mage::getModel('catalog/product')->load($_link->getId())->getMediaGalleryImages();
30
+ if(count($imagesCount) >1 ):
31
+ $_images = $imagesCount->getItemByColumnValue('label', 'back');
32
+ if($_images)
33
+ {
34
+ $sb=1;
35
+ ?>
36
+ <img class="sbmoreview" src="<?php echo $this->helper('catalog/image')->init($_link, 'thumbnail', $_images->getFile())->resize(125); ?>" alt="<?php echo $this->htmlEscape($_images->getLabel());?>" title="<?php $this->htmlEscape($_images->getLabel());?>"/>
37
+ <?php }
38
+ endif;?>
39
+
40
+ <img class="<?php if($sb==1)echo "sbview";?>" src="<?php echo $this->helper('catalog/image')->init($_link, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_link->getName()) ?>" /></a>
41
+ <h3 class="product-name"><a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>"><?php echo $this->htmlEscape($_link->getName()) ?></a></h3>
42
+ <?php echo $this->getPriceHtml($_link, true, '-upsell') ?>
43
+ <?php echo $this->getReviewsSummaryHtml($_link) ?>
44
+ </td>
45
+ <?php else: ?>
46
+ <td class="empty">&nbsp;</td>
47
+ <?php endif; ?>
48
+ <?php endfor; ?>
49
+ </tr>
50
+ <?php endfor; ?>
51
+ </table>
52
+ <script type="text/javascript">decorateTable('upsell-product-table')</script>
53
+ </div>
54
+ <?php endif ?>
55
+ <?php endif ?>
app/etc/modules/Sbridge_Moreview.xml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category Sbridge
5
+ * @package Sbridge_Moreview
6
+ * @author ModuleCreator
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Sbridge_Moreview>
13
+ <active>true</active>
14
+ <codePool>local</codePool>
15
+ </Sbridge_Moreview>
16
+ </modules>
17
+ </config>
package.xml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Product_Back_Image_On_Hover</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>OSLv3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>A Perfect solution to showcase product back image on category product listing pages.</summary>
10
+ <description>&lt;h3&gt;A Perfect solution to showcase product back image on category product listing pages. &lt;/h3&gt;&#xD;
11
+ &#xD;
12
+ With online shopping perfect showcase of your catalog is must necessarily outstanding to increase sales &amp; user experience. We setubridge has right solution for merchant who wants to display products back image on category listing page. Our extension will seamlessly add functionality to display back product image on product image hover action by customer. Additionally you can control same functionality for upsell, cross sell &amp; related products by option control in backend configuration.&#xD;
13
+ &#xD;
14
+ &lt;h3&gt;Extension Features&lt;/h3&gt;&#xD;
15
+ &lt;li&gt;Display back image when customer hover on product image&lt;/li&gt;&#xD;
16
+ &lt;li&gt;Complete Configuration panel to control extension working from admin panel&lt;/li&gt;&#xD;
17
+ &lt;li&gt;Enable back hover image functionality for related,upsell &amp; cross sell products using backend configuration&lt;/li&gt;&#xD;
18
+ &#xD;
19
+ &#xD;
20
+ &lt;h3&gt;Technical Standards&lt;/h3&gt;&#xD;
21
+ &lt;li&gt;Follow Extension Development guideline&lt;/li&gt;&#xD;
22
+ &lt;li&gt;No Additional changes required for extension to work&lt;/li&gt;&#xD;
23
+ &lt;li&gt;Direct filter in Moreviews to load back button image rather than ugly looping concept&lt;/li&gt;</description>
24
+ <notes>First Release.</notes>
25
+ <authors><author><name>SetuBridge</name><user>Technolabs</user><email>support@setubridge.com</email></author></authors>
26
+ <date>2014-03-11</date>
27
+ <time>13:01:12</time>
28
+ <contents><target name="magelocal"><dir name="Sbridge"><dir name="Moreview"><dir name="Block"><dir name="Adminhtml"><dir name="Moreview"><dir name="Edit"><file name="Form.php" hash="499c477c4f7203c45d3f42ac174a845e"/><dir name="Tab"><file name="Form.php" hash="75347900018be00a3c041acb225a49e4"/></dir><file name="Tabs.php" hash="6b6ea5e3b70b8da392356c1b548e22a0"/></dir><file name="Edit.php" hash="cbf23091ef62105463f6e9dd1b55c32d"/><file name="Grid.php" hash="886348b4099b35ba3a2a03040466eb90"/></dir><file name="Moreview.php" hash="298206490393fe1de57ca978a00c8862"/></dir><file name="Moreview.php" hash="2dbfd160019e12b750a2d528736641f0"/></dir><dir name="Helper"><file name="Data.php" hash="77ad595320752f10a30b61bf5e723e19"/></dir><dir name="Model"><file name="Moreview.php" hash="50c45b71fe1afd1251b8c1ffc2ebab9d"/><dir name="Mysql4"><dir name="Moreview"><file name="Collection.php" hash="861ae53362636821496f143a6d30afe6"/></dir><file name="Moreview.php" hash="46b2cbbdb8ca27bb183a252caffb77ad"/></dir><file name="Status.php" hash="9a30e9ac179eb578fa968c8239d1537d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="MoreviewController.php" hash="84754802778f1983da620879806206a4"/></dir><file name="IndexController.php" hash="062e025896b8de25acd2fd0d65d55cc0"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9ca45088d0dace9cf8d193acf2e305b8"/><file name="config.xml" hash="2bc79dce1cbe5a44b0c3688de029c6fb"/><file name="system.xml" hash="433e8b49833d8e58c4786968932ba5d3"/></dir><dir name="sql"><dir name="moreview_setup"><file name="mysql4-install-0.1.0.php" hash="792f43ddc7894dd9f39a7472ed135c7f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="moreview"><file name="crosssell.phtml" hash="7bc6d54dd7db3d2d271198d024caa0c8"/><file name="list.phtml" hash="b1b1d3a45f12bbe4089093d27a1cc575"/><file name="moreview.phtml" hash="a1722fdcb91f8cc555e54c8fb12ce6e6"/><file name="related.phtml" hash="e44796becd9dcae45f815f3915e4f5cc"/><file name="upsell.phtml" hash="e973ba07390da41b2756a4d914dd9c79"/></dir></dir><dir name="layout"><file name="moreview.xml" hash="be6025c7926bc5cc2a94c5a756db1d72"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="moreview.xml" hash="1e81c54dc590a17f70063a4529383a98"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sbridge_Moreview.xml" hash="7a70ff4f71a279ab47f34b46de09ec16"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="moreview.css" hash="ecc5ddad78877b293b4cce18fada5c7f"/></dir></dir></dir></dir></target></contents>
29
+ <compatible/>
30
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
31
+ </package>
skin/frontend/default/default/css/moreview.css ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * @category Sbridge
3
+ * @package Sbridge_Moreview
4
+ * @author ModuleCreator
5
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
6
+ */
7
+
8
+ .sbmoreview
9
+ {
10
+ opacity:0;
11
+ position: absolute;
12
+ transition: all 1s ease;
13
+ -webkit-transition:all 1s ease;
14
+ -moz-transition:all 1s ease;
15
+ -o-transition:all 1s ease;
16
+ }
17
+ .product-image:hover .sbmoreview
18
+ {
19
+ opacity:1;
20
+ }
21
+ .product-image:hover .sbview
22
+ {
23
+ opacity:0;
24
+ }