Version Notes
Product page not logged in: View number of likes and all approved comments
Product page logged in: Like/Unlike, View number of likes and all approved comments, submit comment
Admin Comments menu: View and edit comments to approve or reject them
Download this release
Release Info
Developer | Anush |
Extension | Registered_User_Like_Comment |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Lister/Like/Block/Indexblock.php +46 -0
- app/code/local/Lister/Like/Helper/Data.php +7 -0
- app/code/local/Lister/Like/Model/Like.php +9 -0
- app/code/local/Lister/Like/Model/Resource/Like.php +9 -0
- app/code/local/Lister/Like/Model/Resource/Like/Collection.php +19 -0
- app/code/local/Lister/Like/controllers/IndexController.php +43 -0
- app/code/local/Lister/Like/etc/config.xml +61 -0
- app/code/local/Lister/Like/sql/like_setup/mysql4-install-0.7.0.php +20 -0
- app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial.php +23 -0
- app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit.php +29 -0
- app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit/Form.php +19 -0
- app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit/Tab/Form.php +62 -0
- app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit/Tab/View.php +37 -0
- app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit/Tabs.php +31 -0
- app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Grid.php +94 -0
- app/code/local/Lister/Testimonial/Block/Indexblock.php +23 -0
- app/code/local/Lister/Testimonial/Helper/Data.php +7 -0
- app/code/local/Lister/Testimonial/Model/Feedbackmodel.php +15 -0
- app/code/local/Lister/Testimonial/Model/Resource/Testimonial.php +9 -0
- app/code/local/Lister/Testimonial/Model/Resource/Testimonial/Collection.php +19 -0
- app/code/local/Lister/Testimonial/Model/Testimonial.php +9 -0
- app/code/local/Lister/Testimonial/Model/Usermodel.php +24 -0
- app/code/local/Lister/Testimonial/controllers/Adminhtml/GridController.php +114 -0
- app/code/local/Lister/Testimonial/controllers/IndexController.php +22 -0
- app/code/local/Lister/Testimonial/controllers/TestimonialsController.php +14 -0
- app/code/local/Lister/Testimonial/etc/adminhtml.xml +36 -0
- app/code/local/Lister/Testimonial/etc/config.xml +70 -0
- app/code/local/Lister/Testimonial/sql/testimonial_setup/install-1.6.0.0.php +37 -0
- app/code/local/Lister/Testimonial/sql/testimonial_setup/mysql4-install-0.7.0.php +23 -0
- app/code/local/Lister/Testimonial/sql/testimonial_setup/mysql4-upgrade-1.6.1.0-1.6.1.1.php +39 -0
- app/design/frontend/default/modern/layout/catalog.xml +455 -0
- app/design/frontend/default/modern/layout/like/like.xml +12 -0
- app/design/frontend/default/modern/layout/testimonial/testimonial.xml +26 -0
- app/design/frontend/default/modern/template/catalog/product/view.phtml +163 -0
- app/design/frontend/default/modern/template/like/likes.phtml +21 -0
- app/design/frontend/default/modern/template/testimonial/comments.phtml +6 -0
- app/design/frontend/default/modern/template/testimonial/feedbackform.phtml +23 -0
- app/design/frontend/default/modern/template/testimonial/testimonials.phtml +9 -0
- app/etc/modules/Lister_Like.xml +29 -0
- app/etc/modules/Lister_Testimonial.xml +29 -0
- package.xml +20 -0
app/code/local/Lister/Like/Block/Indexblock.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class Lister_Like_Block_Indexblock extends Mage_Core_Block_Template
|
5 |
+
{
|
6 |
+
public function getprodlikes()
|
7 |
+
{
|
8 |
+
$prodid = Mage::registry('current_product')->getId();
|
9 |
+
$model = Mage::getModel("like/like")->getCollection()->addFieldToFilter('product_id',array(array('eq' => $prodid)));
|
10 |
+
$count = 0;
|
11 |
+
if ($model) {
|
12 |
+
foreach ($model as $like) {
|
13 |
+
$count++;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
if ($count==0)
|
17 |
+
return "Be the first to like this";
|
18 |
+
else if ($count==1)
|
19 |
+
return $count." person likes this";
|
20 |
+
else
|
21 |
+
return $count." people like this";
|
22 |
+
}
|
23 |
+
public function getuser()
|
24 |
+
{
|
25 |
+
$user = Mage::getSingleton('customer/session')->getCustomerId();
|
26 |
+
return $user;
|
27 |
+
}
|
28 |
+
public function getproduser()
|
29 |
+
{
|
30 |
+
return Mage::registry('current_product')->getId().",".Mage::getSingleton('customer/session')->getCustomerId();
|
31 |
+
}
|
32 |
+
public function getuserlike()
|
33 |
+
{
|
34 |
+
$prodid = Mage::registry('current_product')->getId();
|
35 |
+
$user = Mage::getSingleton('customer/session')->getCustomerId();
|
36 |
+
$model = Mage::getModel("like/like")->getCollection()->addFieldToFilter('product_id',array(array('eq' => $prodid)))->addFieldToFilter('user_id',array(array('eq' => $user)));
|
37 |
+
$liked = 0;
|
38 |
+
if ($model) {
|
39 |
+
foreach ($model as $like) {
|
40 |
+
$liked++;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
return $liked;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
?>
|
app/code/local/Lister/Like/Helper/Data.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Like_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
7 |
+
|
app/code/local/Lister/Like/Model/Like.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Like_Model_Like extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('like/like');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Lister/Like/Model/Resource/Like.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Like_Model_Resource_Like extends Mage_Core_Model_Resource_Db_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('like/like', 'like_id');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Lister/Like/Model/Resource/Like/Collection.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* To change this license header, choose License Headers in Project Properties.
|
5 |
+
* To change this template file, choose Tools | Templates
|
6 |
+
* and open the template in the editor.
|
7 |
+
*/
|
8 |
+
class Lister_Like_Model_Resource_Like_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Initialize resource
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
protected function _construct()
|
15 |
+
{
|
16 |
+
$this->_init('like/like');
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
app/code/local/Lister/Like/controllers/IndexController.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Like_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Default customer account page
|
8 |
+
*/
|
9 |
+
public function indexAction()
|
10 |
+
{
|
11 |
+
$this->loadLayout();
|
12 |
+
$this->renderLayout();
|
13 |
+
}
|
14 |
+
public function aaaAction()
|
15 |
+
{
|
16 |
+
$this->loadLayout();
|
17 |
+
$this->renderLayout();
|
18 |
+
}
|
19 |
+
public function unlikeAction()
|
20 |
+
{
|
21 |
+
$data = explode(",", $this->getRequest()->getParam("data"));
|
22 |
+
$prodid = $data[0];
|
23 |
+
$user = $data[1];
|
24 |
+
$model = Mage::getModel("like/like")->getCollection()->addFieldToFilter('product_id',array(array('eq' => $prodid)))->addFieldToFilter('user_id',array(array('eq' => $user)));
|
25 |
+
$rowid = 0;
|
26 |
+
foreach($model as $row) {
|
27 |
+
$rowid = $row->getlike_id();
|
28 |
+
}
|
29 |
+
Mage::getModel("like/like")->setId($rowid)->delete();
|
30 |
+
$this->_redirectReferer();
|
31 |
+
}
|
32 |
+
public function likeAction()
|
33 |
+
{
|
34 |
+
$data = explode(",", $this->getRequest()->getParam("data"));
|
35 |
+
$prodid = $data[0];
|
36 |
+
$user = $data[1];
|
37 |
+
$model = Mage::getModel("like/like");
|
38 |
+
$model->setProduct_id($prodid);
|
39 |
+
$model->setUser_id($user);
|
40 |
+
$model->save();
|
41 |
+
$this->_redirectReferer();
|
42 |
+
}
|
43 |
+
}
|
app/code/local/Lister/Like/etc/config.xml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Lister_Like>
|
5 |
+
<version>1.6.0</version>
|
6 |
+
</Lister_Like>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<like>
|
11 |
+
<class>Lister_Like_Helper</class>
|
12 |
+
</like>
|
13 |
+
</helpers>
|
14 |
+
<blocks>
|
15 |
+
<like>
|
16 |
+
<class>Lister_Like_Block</class>
|
17 |
+
</like>
|
18 |
+
</blocks>
|
19 |
+
<models>
|
20 |
+
<like>
|
21 |
+
<class>Lister_Like_Model</class>
|
22 |
+
<resourceModel>like_resource</resourceModel>
|
23 |
+
</like>
|
24 |
+
<like_resource>
|
25 |
+
<class>Lister_Like_Model_Resource</class>
|
26 |
+
<entities>
|
27 |
+
<like>
|
28 |
+
<table>likes</table>
|
29 |
+
</like>
|
30 |
+
</entities>
|
31 |
+
</like_resource>
|
32 |
+
</models>
|
33 |
+
<resources>
|
34 |
+
<like_setup>
|
35 |
+
<setup>
|
36 |
+
<module>Lister_Like</module>
|
37 |
+
</setup>
|
38 |
+
</like_setup>
|
39 |
+
</resources>
|
40 |
+
</global>
|
41 |
+
<frontend>
|
42 |
+
|
43 |
+
<routers>
|
44 |
+
<like>
|
45 |
+
<use>standard</use>
|
46 |
+
<args>
|
47 |
+
<module>Lister_Like</module>
|
48 |
+
<frontName>like</frontName>
|
49 |
+
</args>
|
50 |
+
</like>
|
51 |
+
</routers>
|
52 |
+
|
53 |
+
<layout>
|
54 |
+
<updates>
|
55 |
+
<like>
|
56 |
+
<file>like/like.xml</file>
|
57 |
+
</like>
|
58 |
+
</updates>
|
59 |
+
</layout>
|
60 |
+
</frontend>
|
61 |
+
</config>
|
app/code/local/Lister/Like/sql/like_setup/mysql4-install-0.7.0.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
5 |
+
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
$installer->run("
|
9 |
+
|
10 |
+
-- DROP TABLE IF EXISTS {$this->getTable('likes')};
|
11 |
+
CREATE TABLE {$this->getTable('likes')} (
|
12 |
+
`like_id` int(10) unsigned NOT NULL auto_increment,
|
13 |
+
`product_id` int(10) unsigned NOT NULL default '0',
|
14 |
+
`user_id` int(10) unsigned NOT NULL default '0',
|
15 |
+
PRIMARY KEY (`like_id`)
|
16 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
17 |
+
|
18 |
+
");
|
19 |
+
|
20 |
+
$installer->endSetup();
|
app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Block_Adminhtml_Testimonial extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
$this->_controller = 'adminhtml_testimonial';
|
8 |
+
$this->_blockGroup = 'testimonial';
|
9 |
+
$this->_headerText = Mage::helper('testimonial')->__('Testimonials');
|
10 |
+
$this->_addButtonLabel = Mage::helper('testimonial')->__('Testimonials');
|
11 |
+
parent::__construct();
|
12 |
+
$this->_removeButton('add');
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareLayout()
|
16 |
+
{
|
17 |
+
$this->setChild( 'grid',
|
18 |
+
$this->getLayout()->createBlock( $this->_blockGroup.'/' . $this->_controller . '_grid',
|
19 |
+
$this->_controller . '.grid')->setSaveParametersInSession(true) );
|
20 |
+
return parent::_prepareLayout();
|
21 |
+
}
|
22 |
+
}
|
23 |
+
?>
|
app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
class Lister_Testimonial_Block_Adminhtml_Testimonial_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
6 |
+
{
|
7 |
+
public function __construct()
|
8 |
+
{
|
9 |
+
parent::__construct();
|
10 |
+
|
11 |
+
$this->_objectId = 'id';
|
12 |
+
$this->_blockGroup = 'testimonial';
|
13 |
+
$this->_controller = 'adminhtml_testimonial';
|
14 |
+
|
15 |
+
$this->_updateButton('save', 'label', Mage::helper('testimonial')->__('Save Item'));
|
16 |
+
$this->_updateButton('delete', 'label', Mage::helper('testimonial')->__('Delete Item'));
|
17 |
+
}
|
18 |
+
|
19 |
+
public function getHeaderText()
|
20 |
+
{
|
21 |
+
if( Mage::registry('testimonial_data') && Mage::registry('testimonial_data')->getId() ) {
|
22 |
+
$name = Mage::registry('testimonial_data')->getData();
|
23 |
+
return Mage::helper('testimonial')->__("Testimonial by ". $name['name']);
|
24 |
+
} else {
|
25 |
+
return Mage::helper('testimonial')->__('Add Item');
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
29 |
+
?>
|
app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Block_Adminhtml_Testimonial_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form(array(
|
8 |
+
'id' => 'edit_form',
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
)
|
12 |
+
);
|
13 |
+
|
14 |
+
$form->setUseContainer(true);
|
15 |
+
$this->setForm($form);
|
16 |
+
return parent::_prepareForm();
|
17 |
+
}
|
18 |
+
}
|
19 |
+
?>
|
app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Block_Adminhtml_Testimonial_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form();
|
8 |
+
$this->setForm($form);
|
9 |
+
$fieldset = $form->addFieldset('testimonial_form', array('legend'=>Mage::helper('testimonial')->__('Item information')));
|
10 |
+
|
11 |
+
$fieldset->addField('product_id', 'text', array(
|
12 |
+
'label' => Mage::helper('testimonial')->__('Product'),
|
13 |
+
'name' => 'product_id',
|
14 |
+
));
|
15 |
+
|
16 |
+
$fieldset->addField('name', 'text', array(
|
17 |
+
'label' => Mage::helper('testimonial')->__('Name'),
|
18 |
+
'name' => 'name',
|
19 |
+
));
|
20 |
+
|
21 |
+
$fieldset->addField('email', 'text', array(
|
22 |
+
'label' => Mage::helper('testimonial')->__('Email'),
|
23 |
+
'name' => 'email',
|
24 |
+
));
|
25 |
+
|
26 |
+
$fieldset->addField('dial', 'text', array(
|
27 |
+
'label' => Mage::helper('testimonial')->__('Phone'),
|
28 |
+
'name' => 'dial',
|
29 |
+
));
|
30 |
+
|
31 |
+
$fieldset->addField('remark', 'text', array(
|
32 |
+
'label' => Mage::helper('testimonial')->__('Remark'),
|
33 |
+
'name' => 'remark',
|
34 |
+
));
|
35 |
+
|
36 |
+
$fieldset->addField('status', 'select', array(
|
37 |
+
'label' => Mage::helper('testimonial')->__('Status'),
|
38 |
+
'name' => 'status',
|
39 |
+
'values' => array(
|
40 |
+
array(
|
41 |
+
'value' => 1,
|
42 |
+
'label' => Mage::helper('testimonial')->__('Approved'),
|
43 |
+
),
|
44 |
+
|
45 |
+
array(
|
46 |
+
'value' => 0,
|
47 |
+
'label' => Mage::helper('testimonial')->__('Rejected'),
|
48 |
+
),
|
49 |
+
),
|
50 |
+
));
|
51 |
+
|
52 |
+
if ( Mage::getSingleton('adminhtml/session')->gettestimonialData() )
|
53 |
+
{
|
54 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->gettestimonialData());
|
55 |
+
Mage::getSingleton('adminhtml/session')->settestimonialData(null);
|
56 |
+
} elseif ( Mage::registry('testimonial_data') ) {
|
57 |
+
$form->setValues(Mage::registry('testimonial_data')->getData());
|
58 |
+
}
|
59 |
+
return parent::_prepareForm();
|
60 |
+
}
|
61 |
+
}
|
62 |
+
?>
|
app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit/Tab/View.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Block_Adminhtml_Testimonial_Edit_Tab_View extends Mage_Adminhtml_Block_Template
|
4 |
+
{
|
5 |
+
|
6 |
+
public function getProduct()
|
7 |
+
{
|
8 |
+
return Mage::registry('testimonial_data')->getProduct_id();
|
9 |
+
}
|
10 |
+
|
11 |
+
public function getName()
|
12 |
+
{
|
13 |
+
return Mage::registry('testimonial_data')->getName();
|
14 |
+
}
|
15 |
+
|
16 |
+
public function getEmail()
|
17 |
+
{
|
18 |
+
return Mage::registry('testimonial_data')->getEmail();
|
19 |
+
}
|
20 |
+
|
21 |
+
public function getPhone()
|
22 |
+
{
|
23 |
+
return Mage::registry('testimonial_data')->getDial();
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getRemark()
|
27 |
+
{
|
28 |
+
return Mage::registry('testimonial_data')->getRemark();
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getStatus()
|
32 |
+
{
|
33 |
+
return Mage::registry('testimonial_data')->getStatus();
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
37 |
+
?>
|
app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Edit/Tabs.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Block_Adminhtml_Testimonial_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('testimonial_tabs');
|
9 |
+
$this->setDestElementId('edit_form');
|
10 |
+
$this->setTitle(Mage::helper('testimonial')->__('Testimonials'));
|
11 |
+
}
|
12 |
+
|
13 |
+
protected function _beforeToHtml()
|
14 |
+
{
|
15 |
+
|
16 |
+
$this->addTab('form_view', array(
|
17 |
+
'label' => Mage::helper('testimonial')->__('View Testimonial'),
|
18 |
+
'title' => Mage::helper('testimonial')->__('View Testimonial'),
|
19 |
+
'content' => $this->getLayout()->createBlock('testimonial/adminhtml_testimonial_edit_tab_view')->setTemplate('testimonial/testimonial.phtml')->toHtml(),
|
20 |
+
));
|
21 |
+
|
22 |
+
$this->addTab('form_section', array(
|
23 |
+
'label' => Mage::helper('testimonial')->__('Edit Testimonial'),
|
24 |
+
'title' => Mage::helper('testimonial')->__('Edit Testimonial'),
|
25 |
+
'content' => $this->getLayout()->createBlock('testimonial/adminhtml_testimonial_edit_tab_form')->toHtml(),
|
26 |
+
));
|
27 |
+
|
28 |
+
return parent::_beforeToHtml();
|
29 |
+
}
|
30 |
+
}
|
31 |
+
?>
|
app/code/local/Lister/Testimonial/Block/Adminhtml/Testimonial/Grid.php
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Block_Adminhtml_Testimonial_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('testimonialGrid');
|
9 |
+
$this->setDefaultSort('testimonial_id');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
$this->setUseAjax(true);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('testimonial/testimonial')->getCollection();
|
18 |
+
|
19 |
+
$this->setCollection($collection);
|
20 |
+
return parent::_prepareCollection();
|
21 |
+
}
|
22 |
+
|
23 |
+
protected function _prepareColumns()
|
24 |
+
{
|
25 |
+
$this->addColumn('testimonial_id', array(
|
26 |
+
'header' => Mage::helper('testimonial')->__('ID'),
|
27 |
+
'align' =>'left',
|
28 |
+
'index' => 'testimonial_id',
|
29 |
+
));
|
30 |
+
$this->addColumn('product_id', array(
|
31 |
+
'header' => Mage::helper('testimonial')->__('Product'),
|
32 |
+
'align' =>'left',
|
33 |
+
'index' => 'product_id',
|
34 |
+
));
|
35 |
+
$this->addColumn('name', array(
|
36 |
+
'header' => Mage::helper('testimonial')->__('Name'),
|
37 |
+
'align' =>'left',
|
38 |
+
'index' => 'name',
|
39 |
+
));
|
40 |
+
$this->addColumn('email', array(
|
41 |
+
'header' => Mage::helper('testimonial')->__('Email'),
|
42 |
+
'align' =>'left',
|
43 |
+
'index' => 'email',
|
44 |
+
));
|
45 |
+
$this->addColumn('dial', array(
|
46 |
+
'header' => Mage::helper('testimonial')->__('Phone'),
|
47 |
+
'align' =>'left',
|
48 |
+
'index' => 'dial',
|
49 |
+
));
|
50 |
+
$this->addColumn('remark', array(
|
51 |
+
'header' => Mage::helper('testimonial')->__('Remark'),
|
52 |
+
'align' =>'left',
|
53 |
+
'index' => 'remark',
|
54 |
+
));
|
55 |
+
$this->addColumn('status', array(
|
56 |
+
'header' => Mage::helper('testimonial')->__('Status'),
|
57 |
+
'align' =>'left',
|
58 |
+
'index' => 'status',
|
59 |
+
'type' => 'options',
|
60 |
+
'options' => array('1' => 'Approved','2' => 'Rejected')
|
61 |
+
));
|
62 |
+
$this->addColumn('action',
|
63 |
+
array(
|
64 |
+
'header' => Mage::helper('testimonial')->__('Action'),
|
65 |
+
'width' => '100',
|
66 |
+
'type' => 'action',
|
67 |
+
'getter' => 'getId',
|
68 |
+
'actions' => array(
|
69 |
+
array(
|
70 |
+
'caption' => Mage::helper('testimonial')->__('Edit'),
|
71 |
+
'url' => array('base'=> '*/*/edit'),
|
72 |
+
'field' => 'id'
|
73 |
+
),
|
74 |
+
array(
|
75 |
+
'caption' => Mage::helper('testimonial')->__('View'),
|
76 |
+
'url' => array('base'=> '*/*/edit'),
|
77 |
+
'field' => 'id'
|
78 |
+
)
|
79 |
+
),
|
80 |
+
'filter' => false,
|
81 |
+
'sortable' => false,
|
82 |
+
'index' => 'stores',
|
83 |
+
'is_system' => true,
|
84 |
+
));
|
85 |
+
return parent::_prepareColumns();
|
86 |
+
}
|
87 |
+
|
88 |
+
public function getRowUrl($row)
|
89 |
+
{
|
90 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
?>
|
app/code/local/Lister/Testimonial/Block/Indexblock.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class Lister_Testimonial_Block_Indexblock extends Mage_Core_Block_Template
|
5 |
+
{
|
6 |
+
public function getuser()
|
7 |
+
{
|
8 |
+
$prod = Mage::registry('current_product')->getId();
|
9 |
+
return Mage::getModel("testimonial/usermodel")->getuser().','.$prod;
|
10 |
+
}
|
11 |
+
public function getfeedbacks()
|
12 |
+
{
|
13 |
+
$feed = Mage::getModel("testimonial/testimonial")->getCollection()->addFieldToFilter('status',array(array('eq' => 'Approved')));
|
14 |
+
return $feed;
|
15 |
+
}
|
16 |
+
public function getprodfeedbacks()
|
17 |
+
{
|
18 |
+
$prodid = Mage::registry('current_product')->getId();
|
19 |
+
$feed = Mage::getModel("testimonial/testimonial")->getCollection()->addFieldToFilter('status',array(array('eq' => 'Approved')))->addFieldToFilter('product_id',array(array('eq' => $prodid)));
|
20 |
+
return $feed;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
?>
|
app/code/local/Lister/Testimonial/Helper/Data.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
7 |
+
|
app/code/local/Lister/Testimonial/Model/Feedbackmodel.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Model_Feedbackmodel extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
public function submitfeedback($customerDetails)
|
6 |
+
{
|
7 |
+
$model = Mage::getModel("testimonial/testimonial");
|
8 |
+
$model->setProduct_id($customerDetails["product"]);
|
9 |
+
$model->setName($customerDetails["name"]);
|
10 |
+
$model->setEmail($customerDetails["email"]);
|
11 |
+
$model->setDial($customerDetails["phone"]);
|
12 |
+
$model->setRemark($customerDetails["remark"]);
|
13 |
+
$query = $model->save();
|
14 |
+
}
|
15 |
+
}
|
app/code/local/Lister/Testimonial/Model/Resource/Testimonial.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Model_Resource_Testimonial extends Mage_Core_Model_Resource_Db_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('testimonial/testimonial', 'testimonial_id');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Lister/Testimonial/Model/Resource/Testimonial/Collection.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* To change this license header, choose License Headers in Project Properties.
|
5 |
+
* To change this template file, choose Tools | Templates
|
6 |
+
* and open the template in the editor.
|
7 |
+
*/
|
8 |
+
class Lister_Testimonial_Model_Resource_Testimonial_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Initialize resource
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
protected function _construct()
|
15 |
+
{
|
16 |
+
$this->_init('testimonial/testimonial');
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
app/code/local/Lister/Testimonial/Model/Testimonial.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Model_Testimonial extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('testimonial/testimonial');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Lister/Testimonial/Model/Usermodel.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class Lister_Testimonial_Model_Usermodel extends Mage_Core_Model_Abstract
|
5 |
+
{
|
6 |
+
protected function _construct()
|
7 |
+
{
|
8 |
+
$this->_init("testimonial/usermodel");
|
9 |
+
}
|
10 |
+
public function getuser()
|
11 |
+
{
|
12 |
+
$name = Mage::helper('customer')->getCustomerName();
|
13 |
+
if(strcmp($name, " ")==0)
|
14 |
+
return "Nope";
|
15 |
+
else
|
16 |
+
{
|
17 |
+
$email = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
18 |
+
$billingaddress = Mage::getModel('customer/address')->load($visitorData->default_billing);
|
19 |
+
$addressdata = $billingaddress ->getData();
|
20 |
+
return $name.','.$email;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
}
|
24 |
+
?>
|
app/code/local/Lister/Testimonial/controllers/Adminhtml/GridController.php
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_Adminhtml_GridController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
protected function _initAction()
|
6 |
+
{
|
7 |
+
// load layout, set active menu and breadcrumbs
|
8 |
+
$this->loadLayout()
|
9 |
+
->_setActiveMenu('testimonial')
|
10 |
+
->_addBreadcrumb(Mage::helper('testimonial')->__('Testimonial'), Mage::helper('testimonial')->__('Testimonial'))
|
11 |
+
;
|
12 |
+
return $this;
|
13 |
+
}
|
14 |
+
|
15 |
+
public function indexAction()
|
16 |
+
{
|
17 |
+
$this->_title($this->__('Testimonial'));
|
18 |
+
$this->_initAction();
|
19 |
+
$this->renderLayout();
|
20 |
+
}
|
21 |
+
|
22 |
+
public function editAction()
|
23 |
+
{
|
24 |
+
$testimonialId = $this->getRequest()->getParam('id');
|
25 |
+
$testimonialModel = Mage::getModel('testimonial/testimonial')->load($testimonialId);
|
26 |
+
|
27 |
+
if ($testimonialModel->getId() || $testimonialId == 0) {
|
28 |
+
|
29 |
+
Mage::register('testimonial_data', $testimonialModel);
|
30 |
+
|
31 |
+
$this->loadLayout();
|
32 |
+
$this->_setActiveMenu('testimonial/items');
|
33 |
+
|
34 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
35 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
|
36 |
+
|
37 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
38 |
+
|
39 |
+
$this->_addContent($this->getLayout()->createBlock('testimonial/adminhtml_testimonial_edit'))
|
40 |
+
->_addLeft($this->getLayout()->createBlock('testimonial/adminhtml_testimonial_edit_tabs'));
|
41 |
+
|
42 |
+
$this->renderLayout();
|
43 |
+
} else {
|
44 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('testimonial')->__('Item does not exist'));
|
45 |
+
$this->_redirect('*/*/');
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
public function saveAction()
|
50 |
+
{
|
51 |
+
if ( $this->getRequest()->getPost() ) {
|
52 |
+
try {
|
53 |
+
$postData = $this->getRequest()->getPost();
|
54 |
+
$testimonialModel = Mage::getModel('testimonial/testimonial');
|
55 |
+
|
56 |
+
if($postData['status']==1)
|
57 |
+
{
|
58 |
+
$testimonialModel->setId($this->getRequest()->getParam('id'))
|
59 |
+
->setProduct_id($postData['product_id'])
|
60 |
+
->setName($postData['name'])
|
61 |
+
->setEmail($postData['email'])
|
62 |
+
->setDial($postData['dial'])
|
63 |
+
->setRemark($postData['remark'])
|
64 |
+
->setStatus("Approved")
|
65 |
+
->save();
|
66 |
+
}
|
67 |
+
else
|
68 |
+
{
|
69 |
+
$testimonialModel->setId($this->getRequest()->getParam('id'))
|
70 |
+
->setProduct_id($postData['product_id'])
|
71 |
+
->setName($postData['name'])
|
72 |
+
->setEmail($postData['email'])
|
73 |
+
->setDial($postData['dial'])
|
74 |
+
->setRemark($postData['remark'])
|
75 |
+
->setStatus("Rejected")
|
76 |
+
->save();
|
77 |
+
}
|
78 |
+
|
79 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully saved'));
|
80 |
+
Mage::getSingleton('adminhtml/session')->settestimonialData(false);
|
81 |
+
|
82 |
+
$this->_redirect('*/*/');
|
83 |
+
return;
|
84 |
+
} catch (Exception $e) {
|
85 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
86 |
+
Mage::getSingleton('adminhtml/session')->settestimonialData($this->getRequest()->getPost());
|
87 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
88 |
+
return;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
$this->_redirect('*/*/');
|
92 |
+
}
|
93 |
+
|
94 |
+
public function deleteAction()
|
95 |
+
{
|
96 |
+
if( $this->getRequest()->getParam('id') > 0 ) {
|
97 |
+
try {
|
98 |
+
$testimonialModel = Mage::getModel('testimonial/testimonial');
|
99 |
+
|
100 |
+
$testimonialModel->setId($this->getRequest()->getParam('id'))
|
101 |
+
->delete();
|
102 |
+
|
103 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
104 |
+
$this->_redirect('*/*/');
|
105 |
+
} catch (Exception $e) {
|
106 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
107 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
108 |
+
}
|
109 |
+
}
|
110 |
+
$this->_redirect('*/*/');
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
|
app/code/local/Lister/Testimonial/controllers/IndexController.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Default customer account page
|
8 |
+
*/
|
9 |
+
public function indexAction()
|
10 |
+
{
|
11 |
+
$this->loadLayout();
|
12 |
+
$this->renderLayout();
|
13 |
+
}
|
14 |
+
public function receiveAction()
|
15 |
+
{
|
16 |
+
$customerDetails=$this->getRequest()->getParams();
|
17 |
+
$message = $this->__('Response recorded');
|
18 |
+
Mage::getSingleton('core/session')->addSuccess($message);
|
19 |
+
Mage::getModel('testimonial/feedbackmodel')->submitfeedback($customerDetails);
|
20 |
+
$this->_redirectReferer();
|
21 |
+
}
|
22 |
+
}
|
app/code/local/Lister/Testimonial/controllers/TestimonialsController.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Lister_Testimonial_TestimonialsController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Default customer account page
|
8 |
+
*/
|
9 |
+
public function indexAction()
|
10 |
+
{
|
11 |
+
$this->loadLayout();
|
12 |
+
$this->renderLayout();
|
13 |
+
}
|
14 |
+
}
|
app/code/local/Lister/Testimonial/etc/adminhtml.xml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category Mage
|
23 |
+
* @package Mage_Cms
|
24 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
<config>
|
29 |
+
<menu>
|
30 |
+
<testimonial translate="title" module="testimonial">
|
31 |
+
<title>Comments</title>
|
32 |
+
<sort_order>100</sort_order>
|
33 |
+
<action>testimonial/adminhtml_grid</action>
|
34 |
+
</testimonial>
|
35 |
+
</menu>
|
36 |
+
</config>
|
app/code/local/Lister/Testimonial/etc/config.xml
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Lister_Testimonial>
|
5 |
+
<version>1.6.1.1</version>
|
6 |
+
</Lister_Testimonial>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<testimonial>
|
11 |
+
<class>Lister_Testimonial_Helper</class>
|
12 |
+
</testimonial>
|
13 |
+
</helpers>
|
14 |
+
<blocks>
|
15 |
+
<testimonial>
|
16 |
+
<class>Lister_Testimonial_Block</class>
|
17 |
+
</testimonial>
|
18 |
+
</blocks>
|
19 |
+
<models>
|
20 |
+
<testimonial>
|
21 |
+
<class>Lister_Testimonial_Model</class>
|
22 |
+
<resourceModel>testimonial_resource</resourceModel>
|
23 |
+
</testimonial>
|
24 |
+
<testimonial_resource>
|
25 |
+
<class>Lister_Testimonial_Model_Resource</class>
|
26 |
+
<entities>
|
27 |
+
<testimonial>
|
28 |
+
<table>testimonial</table>
|
29 |
+
</testimonial>
|
30 |
+
</entities>
|
31 |
+
</testimonial_resource>
|
32 |
+
</models>
|
33 |
+
<resources>
|
34 |
+
<testimonial_setup>
|
35 |
+
<setup>
|
36 |
+
<module>Lister_Testimonial</module>
|
37 |
+
</setup>
|
38 |
+
</testimonial_setup>
|
39 |
+
</resources>
|
40 |
+
</global>
|
41 |
+
<frontend>
|
42 |
+
|
43 |
+
<routers>
|
44 |
+
<testimonial>
|
45 |
+
<use>standard</use>
|
46 |
+
<args>
|
47 |
+
<module>Lister_Testimonial</module>
|
48 |
+
<frontName>testimonial</frontName>
|
49 |
+
</args>
|
50 |
+
</testimonial>
|
51 |
+
</routers>
|
52 |
+
|
53 |
+
<layout>
|
54 |
+
<updates>
|
55 |
+
<testimonial>
|
56 |
+
<file>testimonial/testimonial.xml</file>
|
57 |
+
</testimonial>
|
58 |
+
</updates>
|
59 |
+
</layout>
|
60 |
+
</frontend>
|
61 |
+
<adminhtml>
|
62 |
+
<layout>
|
63 |
+
<updates>
|
64 |
+
<testimonial>
|
65 |
+
<file>testimonial/testimonial.xml</file>
|
66 |
+
</testimonial>
|
67 |
+
</updates>
|
68 |
+
</layout>
|
69 |
+
</adminhtml>
|
70 |
+
</config>
|
app/code/local/Lister/Testimonial/sql/testimonial_setup/install-1.6.0.0.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Create table 'customer_testimonial'
|
10 |
+
*/
|
11 |
+
$table = $installer->getConnection()
|
12 |
+
->newTable($installer->getTable('testimonial/testimonial'))
|
13 |
+
->addColumn('testimonial_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
14 |
+
'identity' => true,
|
15 |
+
'unsigned' => true,
|
16 |
+
'nullable' => false,
|
17 |
+
'primary' => true,
|
18 |
+
), 'Testimonial Id')
|
19 |
+
->addColumn('product_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
20 |
+
'unsigned' => true,
|
21 |
+
'nullable' => false,
|
22 |
+
'default' => '0',
|
23 |
+
), 'Product Id')
|
24 |
+
->addColumn('name', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
|
25 |
+
), 'Name')
|
26 |
+
->addColumn('email', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
|
27 |
+
), 'Email')
|
28 |
+
->addColumn('dial', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
|
29 |
+
), 'Dial')
|
30 |
+
->addColumn('remark', Varien_Db_Ddl_Table::TYPE_TEXT, 255, array(
|
31 |
+
), 'Remark')
|
32 |
+
->addIndex($installer->getIdxName('testimonial/testimonial', array('testimonial_id')),
|
33 |
+
array('testimonial_id'))
|
34 |
+
->setComment('Customer Testimonials');
|
35 |
+
$installer->getConnection()->createTable($table);
|
36 |
+
|
37 |
+
$installer->endSetup();
|
app/code/local/Lister/Testimonial/sql/testimonial_setup/mysql4-install-0.7.0.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
5 |
+
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
$installer->run("
|
9 |
+
|
10 |
+
-- DROP TABLE IF EXISTS {$this->getTable('testimonial')};
|
11 |
+
CREATE TABLE {$this->getTable('testimonial')} (
|
12 |
+
`testimonial_id` int(10) unsigned NOT NULL auto_increment,
|
13 |
+
`product_id` int(10) unsigned NOT NULL default '0',
|
14 |
+
`name` varchar(255) NOT NULL default '',
|
15 |
+
`email` varchar(255) NOT NULL default '',
|
16 |
+
`dial` varchar(255) NOT NULL default '',
|
17 |
+
`remark` varchar(255) NOT NULL default '',
|
18 |
+
PRIMARY KEY (`testimonial_id`),
|
19 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
20 |
+
|
21 |
+
");
|
22 |
+
|
23 |
+
$installer->endSetup();
|
app/code/local/Lister/Testimonial/sql/testimonial_setup/mysql4-upgrade-1.6.1.0-1.6.1.1.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
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 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Wishlist
|
23 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
$installer = $this;
|
28 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
|
32 |
+
$installer->run("
|
33 |
+
|
34 |
+
alter table {$this->getTable('testimonial/testimonial')} add `status` varchar(255)
|
35 |
+
;
|
36 |
+
|
37 |
+
");
|
38 |
+
|
39 |
+
$installer->endSetup();
|
app/design/frontend/default/modern/layout/catalog.xml
ADDED
@@ -0,0 +1,455 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category design
|
23 |
+
* @package default_modern
|
24 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
|
28 |
+
Supported layout update handles (action):
|
29 |
+
- catalog_product_gallery
|
30 |
+
- catalog_product_compare_index
|
31 |
+
|
32 |
+
Supported layout update handles (special):
|
33 |
+
- default
|
34 |
+
- catalog_category_default
|
35 |
+
- catalog_category_layered
|
36 |
+
- catalog_product_view
|
37 |
+
|
38 |
+
-->
|
39 |
+
<layout version="0.1.0">
|
40 |
+
|
41 |
+
<!--
|
42 |
+
Default layout, loads most of the pages
|
43 |
+
-->
|
44 |
+
|
45 |
+
<default>
|
46 |
+
|
47 |
+
<!-- Mage_Catalog -->
|
48 |
+
<reference name="left">
|
49 |
+
<!--block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
|
50 |
+
<action method="setImgSrc"><src>images/media/left_col_callout.jpg</src></action>
|
51 |
+
<action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (555) 555-0123.</alt></action>
|
52 |
+
<action method="setLinkUrl"><url>checkout/cart</url></action>
|
53 |
+
</block-->
|
54 |
+
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
|
55 |
+
</reference>
|
56 |
+
<reference name="footer_links">
|
57 |
+
<action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title></action>
|
58 |
+
</reference>
|
59 |
+
<block type="catalog/product_price_template" name="catalog_product_price_template" />
|
60 |
+
</default>
|
61 |
+
|
62 |
+
|
63 |
+
<!--
|
64 |
+
Category default layout
|
65 |
+
-->
|
66 |
+
|
67 |
+
<catalog_category_default translate="label">
|
68 |
+
<label>Catalog Category (Non-Anchor)</label>
|
69 |
+
<reference name="root">
|
70 |
+
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
|
71 |
+
</reference>
|
72 |
+
<reference name="left">
|
73 |
+
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
|
74 |
+
</reference>
|
75 |
+
<reference name="content">
|
76 |
+
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
|
77 |
+
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
|
78 |
+
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
|
79 |
+
<block type="page/html_pager" name="product_list_toolbar_pager"/>
|
80 |
+
<!-- The following code shows how to set your own pager increments -->
|
81 |
+
<!--
|
82 |
+
<action method="setDefaultListPerPage"><limit>10</limit></action>
|
83 |
+
<action method="setDefaultGridPerPage"><limit>8</limit></action>
|
84 |
+
<action method="addPagerLimit"><mode>list</mode><limit>10</limit></action>
|
85 |
+
<action method="addPagerLimit"><mode>list</mode><limit>20</limit></action>
|
86 |
+
<action method="addPagerLimit"><mode>list</mode><limit>30</limit></action>
|
87 |
+
<action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
|
88 |
+
<action method="addPagerLimit"><mode>grid</mode><limit>8</limit></action>
|
89 |
+
<action method="addPagerLimit"><mode>grid</mode><limit>16</limit></action>
|
90 |
+
<action method="addPagerLimit"><mode>grid</mode><limit>24</limit></action>
|
91 |
+
<action method="addPagerLimit" translate="label"><mode>grid</mode><limit>all</limit><label>All</label></action>
|
92 |
+
-->
|
93 |
+
</block>
|
94 |
+
<!--action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
|
95 |
+
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
|
96 |
+
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
|
97 |
+
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
|
98 |
+
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action-->
|
99 |
+
<action method="setColumnCount"><count>4</count></action>
|
100 |
+
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
|
101 |
+
</block>
|
102 |
+
</block>
|
103 |
+
</reference>
|
104 |
+
</catalog_category_default>
|
105 |
+
|
106 |
+
<!--
|
107 |
+
Category layered navigation layout
|
108 |
+
-->
|
109 |
+
|
110 |
+
<catalog_category_layered translate="label">
|
111 |
+
<label>Catalog Category (Anchor)</label>
|
112 |
+
<reference name="root">
|
113 |
+
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
|
114 |
+
</reference>
|
115 |
+
<reference name="left">
|
116 |
+
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
|
117 |
+
</reference>
|
118 |
+
<reference name="content">
|
119 |
+
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
|
120 |
+
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
|
121 |
+
<!-- <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/su.phtml</template></action> -->
|
122 |
+
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
|
123 |
+
<block type="page/html_pager" name="product_list_toolbar_pager"/>
|
124 |
+
<!-- The following code shows how to set your own pager increments -->
|
125 |
+
<!--
|
126 |
+
<action method="setDefaultListPerPage"><limit>10</limit></action>
|
127 |
+
<action method="setDefaultGridPerPage"><limit>8</limit></action>
|
128 |
+
<action method="addPagerLimit"><mode>list</mode><limit>10</limit></action>
|
129 |
+
<action method="addPagerLimit"><mode>list</mode><limit>20</limit></action>
|
130 |
+
<action method="addPagerLimit"><mode>list</mode><limit>30</limit></action>
|
131 |
+
<action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
|
132 |
+
<action method="addPagerLimit"><mode>grid</mode><limit>8</limit></action>
|
133 |
+
<action method="addPagerLimit"><mode>grid</mode><limit>16</limit></action>
|
134 |
+
<action method="addPagerLimit"><mode>grid</mode><limit>24</limit></action>
|
135 |
+
<action method="addPagerLimit" translate="label"><mode>grid</mode><limit>all</limit><label>All</label></action>
|
136 |
+
-->
|
137 |
+
</block>
|
138 |
+
<!--action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
|
139 |
+
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
|
140 |
+
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
|
141 |
+
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
|
142 |
+
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action-->
|
143 |
+
<action method="setColumnCount"><count>4</count></action>
|
144 |
+
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
|
145 |
+
</block>
|
146 |
+
</block>
|
147 |
+
</reference>
|
148 |
+
</catalog_category_layered>
|
149 |
+
|
150 |
+
<catalog_category_layered_nochildren translate="label">
|
151 |
+
<label>Catalog Category (Without Subcategories)</label>
|
152 |
+
<remove name="right.reports.product.viewed"/>
|
153 |
+
<reference name="left">
|
154 |
+
<!--block type="reports/product_viewed" name="left.reports.product.viewed" template="reports/product_viewed.phtml"/-->
|
155 |
+
</reference>
|
156 |
+
</catalog_category_layered_nochildren>
|
157 |
+
|
158 |
+
<!--
|
159 |
+
Compare products page
|
160 |
+
-->
|
161 |
+
|
162 |
+
<catalog_product_compare_index translate="label">
|
163 |
+
<label>Catalog Product Compare List</label>
|
164 |
+
<!-- Mage_Catalog -->
|
165 |
+
<reference name="root">
|
166 |
+
<action method="setTemplate"><template>page/popup.phtml</template></action>
|
167 |
+
</reference>
|
168 |
+
<reference name="head">
|
169 |
+
<action method="addJs"><script>scriptaculous/scriptaculous.js</script></action>
|
170 |
+
<action method="addJs"><script>varien/product.js</script></action>
|
171 |
+
</reference>
|
172 |
+
<reference name="content">
|
173 |
+
<block type="catalog/product_compare_list" name="catalog.compare.list" template="catalog/product/compare/list.phtml"/>
|
174 |
+
</reference>
|
175 |
+
</catalog_product_compare_index>
|
176 |
+
|
177 |
+
<!--
|
178 |
+
Product view
|
179 |
+
-->
|
180 |
+
|
181 |
+
<catalog_product_view translate="label">
|
182 |
+
<!--Update handle for Like<update handle = "like_index_index"/>Till here-->
|
183 |
+
<label>Catalog Product View (Any)</label>
|
184 |
+
<!-- Mage_Catalog -->
|
185 |
+
<reference name="root">
|
186 |
+
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
|
187 |
+
</reference>
|
188 |
+
<reference name="head">
|
189 |
+
<action method="addJs"><script>varien/product.js</script></action>
|
190 |
+
<action method="addJs"><script>varien/configurable.js</script></action>
|
191 |
+
|
192 |
+
<action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
|
193 |
+
<action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
|
194 |
+
<action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
|
195 |
+
</reference>
|
196 |
+
<reference name="content">
|
197 |
+
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
|
198 |
+
<!--
|
199 |
+
<action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/summary.phtml</template></action>
|
200 |
+
<action method="addReviewSummaryTemplate"><type>short</type><template>review/helper/summary_short.phtml</template></action>
|
201 |
+
<action method="addReviewSummaryTemplate"><type>...</type><template>...</template></action>
|
202 |
+
-->
|
203 |
+
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml"/>
|
204 |
+
<block type="core/text_list" name="alert.urls" as="alert_urls" translate="label">
|
205 |
+
<label>Alert Urls</label>
|
206 |
+
</block>
|
207 |
+
|
208 |
+
<action method="setTierPriceTemplate"><template>catalog/product/view/tierprices.phtml</template></action>
|
209 |
+
|
210 |
+
<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
|
211 |
+
<action method="addTab" translate="title" module="catalog"><alias>description</alias><title>Product Description</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action>
|
212 |
+
<action method="addTab" translate="title" module="catalog"><alias>upsell_products</alias><title>We Also Recommend</title><block>catalog/product_list_upsell</block><template>catalog/product/list/upsell.phtml</template></action>
|
213 |
+
<action method="addTab" translate="title" module="catalog"><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>
|
214 |
+
</block>
|
215 |
+
|
216 |
+
<block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data" />
|
217 |
+
<block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
|
218 |
+
<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>
|
219 |
+
|
220 |
+
<block type="core/text_list" name="product.info.extrahint" as="extrahint" translate="label">
|
221 |
+
<label>Product View Extra Hint</label>
|
222 |
+
</block>
|
223 |
+
|
224 |
+
<block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label">
|
225 |
+
<label>Info Column Options Wrapper</label>
|
226 |
+
<block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/>
|
227 |
+
<block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
|
228 |
+
<action method="addOptionRenderer"><type>text</type><block>catalog/product_view_options_type_text</block><template>catalog/product/view/options/type/text.phtml</template></action>
|
229 |
+
<action method="addOptionRenderer"><type>file</type><block>catalog/product_view_options_type_file</block><template>catalog/product/view/options/type/file.phtml</template></action>
|
230 |
+
<action method="addOptionRenderer"><type>select</type><block>catalog/product_view_options_type_select</block><template>catalog/product/view/options/type/select.phtml</template></action>
|
231 |
+
<action method="addOptionRenderer"><type>date</type><block>catalog/product_view_options_type_date</block><template>catalog/product/view/options/type/date.phtml</template></action>
|
232 |
+
</block>
|
233 |
+
<block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
|
234 |
+
</block>
|
235 |
+
<block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
|
236 |
+
<label>Bottom Block Options Wrapper</label>
|
237 |
+
<action method="insert"><block>product.tierprices</block></action>
|
238 |
+
<block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/>
|
239 |
+
<action method="append"><block>product.info.addtocart</block></action>
|
240 |
+
<action method="append"><block>product.info.addto</block></action>
|
241 |
+
</block>
|
242 |
+
|
243 |
+
<!-- Added by Anush to include a new tab in product attributes place for user feedback -->
|
244 |
+
|
245 |
+
<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml">
|
246 |
+
<action method="addTab" translate="title" module="catalog">
|
247 |
+
<alias>description</alias>
|
248 |
+
<title>Description</title>
|
249 |
+
<block>catalog/product_view_description</block>
|
250 |
+
<template>catalog/product/view/description.phtml</template>
|
251 |
+
</action>
|
252 |
+
<action method="addTab" translate="title" module="catalog">
|
253 |
+
<alias>additional</alias>
|
254 |
+
<title>Additional Information</title>
|
255 |
+
<block>catalog/product_view_attributes</block>
|
256 |
+
<template>catalog/product/view/attributes.phtml</template>
|
257 |
+
</action>
|
258 |
+
<action method="addTab" translate="title" module="catalog">
|
259 |
+
<alias>feedback</alias>
|
260 |
+
<title>Write Comment</title>
|
261 |
+
<block>testimonial/indexblock</block>
|
262 |
+
<template>testimonial/feedbackform.phtml</template>
|
263 |
+
</action>
|
264 |
+
<action method="addTab" translate="title" module="catalog">
|
265 |
+
<alias>comments</alias>
|
266 |
+
<title>Comments</title>
|
267 |
+
<block>testimonial/indexblock</block>
|
268 |
+
<template>testimonial/comments.phtml</template>
|
269 |
+
</action>
|
270 |
+
</block>
|
271 |
+
|
272 |
+
<!-- Till here-->
|
273 |
+
|
274 |
+
<block type="core/template_facade" name="product.info.container1" as="container1">
|
275 |
+
<action method="setDataByKey"><key>alias_in_layout</key><value>container1</value></action>
|
276 |
+
<action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
|
277 |
+
<action method="append"><block>product.info.options.wrapper</block></action>
|
278 |
+
<action method="append"><block>product.info.options.wrapper.bottom</block></action>
|
279 |
+
</block>
|
280 |
+
<block type="core/template_facade" name="product.info.container2" as="container2">
|
281 |
+
<action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>
|
282 |
+
<action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
|
283 |
+
<action method="append"><block>product.info.options.wrapper</block></action>
|
284 |
+
<action method="append"><block>product.info.options.wrapper.bottom</block></action>
|
285 |
+
</block>
|
286 |
+
<action method="unsetCallChild"><child>container1</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
|
287 |
+
<action method="unsetCallChild"><child>container2</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
|
288 |
+
</block>
|
289 |
+
</reference>
|
290 |
+
<reference name="upsell_products">
|
291 |
+
<action method="setColumnCount"><columns>5</columns></action>
|
292 |
+
<action method="setItemLimit"><type>upsell</type><limit>5</limit></action>
|
293 |
+
</reference>
|
294 |
+
<reference name="left">
|
295 |
+
<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
|
296 |
+
</reference>
|
297 |
+
</catalog_product_view>
|
298 |
+
|
299 |
+
<!--
|
300 |
+
Additional block dependant on product type
|
301 |
+
-->
|
302 |
+
<PRODUCT_TYPE_simple translate="label" module="catalog">
|
303 |
+
<label>Catalog Product View (Simple)</label>
|
304 |
+
<reference name="product.info">
|
305 |
+
<block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/default.phtml">
|
306 |
+
<block type="core/text_list" name="product.info.simple.extra" as="product_type_data_extra" translate="label">
|
307 |
+
<label>Product Extra Info</label>
|
308 |
+
</block>
|
309 |
+
</block>
|
310 |
+
</reference>
|
311 |
+
</PRODUCT_TYPE_simple>
|
312 |
+
<PRODUCT_TYPE_configurable translate="label" module="catalog">
|
313 |
+
<label>Catalog Product View (Configurable)</label>
|
314 |
+
<reference name="product.info">
|
315 |
+
<block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/default.phtml">
|
316 |
+
<block type="core/text_list" name="product.info.configurable.extra" as="product_type_data_extra" translate="label">
|
317 |
+
<label>Product Extra Info</label>
|
318 |
+
</block>
|
319 |
+
</block>
|
320 |
+
</reference>
|
321 |
+
<reference name="product.info.options.wrapper">
|
322 |
+
<block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml"/>
|
323 |
+
</reference>
|
324 |
+
</PRODUCT_TYPE_configurable>
|
325 |
+
<PRODUCT_TYPE_grouped translate="label" module="catalog">
|
326 |
+
<label>Catalog Product View (Grouped)</label>
|
327 |
+
<reference name="product.info">
|
328 |
+
<block type="catalog/product_view_type_grouped" name="product.info.grouped" as="product_type_data" template="catalog/product/view/type/grouped.phtml">
|
329 |
+
<block type="core/text_list" name="product.info.grouped.extra" as="product_type_data_extra" translate="label">
|
330 |
+
<label>Product Extra Info</label>
|
331 |
+
</block>
|
332 |
+
</block>
|
333 |
+
</reference>
|
334 |
+
</PRODUCT_TYPE_grouped>
|
335 |
+
<PRODUCT_TYPE_virtual translate="label" module="catalog">
|
336 |
+
<label>Catalog Product View (Virtual)</label>
|
337 |
+
<reference name="product.info">
|
338 |
+
<block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
|
339 |
+
<block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
|
340 |
+
<label>Product Extra Info</label>
|
341 |
+
</block>
|
342 |
+
</block>
|
343 |
+
</reference>
|
344 |
+
</PRODUCT_TYPE_virtual>
|
345 |
+
|
346 |
+
|
347 |
+
|
348 |
+
<!--
|
349 |
+
Product send to friend
|
350 |
+
-->
|
351 |
+
|
352 |
+
<catalog_product_send translate="label">
|
353 |
+
<label>Catalog Product Email to a Friend</label>
|
354 |
+
<!-- Mage_Catalog -->
|
355 |
+
<reference name="root">
|
356 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
357 |
+
</reference>
|
358 |
+
<reference name="head">
|
359 |
+
<action method="addJs"><script>varien/product.js</script></action>
|
360 |
+
</reference>
|
361 |
+
<reference name="content">
|
362 |
+
<block type="catalog/product_send" name="product.send" template="catalog/product/send.phtml">
|
363 |
+
</block>
|
364 |
+
</reference>
|
365 |
+
</catalog_product_send>
|
366 |
+
|
367 |
+
<!--
|
368 |
+
Product additional images gallery popup
|
369 |
+
-->
|
370 |
+
|
371 |
+
<catalog_product_gallery translate="label">
|
372 |
+
<label>Catalog Product Image Gallery Popup</label>
|
373 |
+
<!-- Mage_Catalog -->
|
374 |
+
<reference name="root">
|
375 |
+
<action method="setTemplate"><template>page/popup.phtml</template></action>
|
376 |
+
</reference>
|
377 |
+
<reference name="content">
|
378 |
+
<block type="catalog/product_gallery" name="catalog_product_gallery" template="catalog/product/gallery.phtml"/>
|
379 |
+
</reference>
|
380 |
+
</catalog_product_gallery>
|
381 |
+
|
382 |
+
<!--
|
383 |
+
SEO Site Map
|
384 |
+
-->
|
385 |
+
|
386 |
+
<catalog_seo_sitemap translate="label">
|
387 |
+
<label>Catalog Seo Sitemap (Common)</label>
|
388 |
+
<remove name="right"/>
|
389 |
+
<remove name="left"/>
|
390 |
+
|
391 |
+
<reference name="root">
|
392 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
393 |
+
</reference>
|
394 |
+
<reference name="content">
|
395 |
+
<block type="page/template_container" name="seo.sitemap.container" template="catalog/seo/sitemap/container.phtml">
|
396 |
+
<block type="page/template_links" name="seo.sitemap.links" as="links" template="page/template/links.phtml"/>
|
397 |
+
<block type="page/html_pager" name="seo.sitemap.pager.top" as="pager_top" template="page/html/pager.phtml"/>
|
398 |
+
<block type="page/html_pager" name="seo.sitemap.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
|
399 |
+
</block>
|
400 |
+
</reference>
|
401 |
+
</catalog_seo_sitemap>
|
402 |
+
|
403 |
+
<catalog_seo_sitemap_category translate="label">
|
404 |
+
<label>Catalog Seo Sitemap (Category List)</label>
|
405 |
+
<reference name="head">
|
406 |
+
<action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
|
407 |
+
</reference>
|
408 |
+
<update handle="catalog_seo_sitemap" />
|
409 |
+
<reference name="seo.sitemap.container">
|
410 |
+
<action method="setTitle" translate="title" module="catalog"><title>Categories</title></action>
|
411 |
+
<block type="catalog/seo_sitemap_category" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
|
412 |
+
<action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
|
413 |
+
<action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
|
414 |
+
<action method="setItemsTitle" translate="title" module="catalog"><title>categories</title></action>
|
415 |
+
</block>
|
416 |
+
</reference>
|
417 |
+
<reference name="seo.sitemap.links">
|
418 |
+
<action method="addLink" translate="label title" module="catalog"><label>Products Sitemap</label><url helper="catalog/map/getProductUrl"/><title>Products Sitemap</title></action>
|
419 |
+
</reference>
|
420 |
+
</catalog_seo_sitemap_category>
|
421 |
+
|
422 |
+
<catalog_seo_sitemap_category_tree translate="label">
|
423 |
+
<label>Catalog Seo Sitemap (Category Tree)</label>
|
424 |
+
<reference name="seo.sitemap.container">
|
425 |
+
<remove name="seo.sitemap.pager.top" />
|
426 |
+
<remove name="seo.sitemap.pager.bottom" />
|
427 |
+
<block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.top" as="pager_top" template="page/html/pager.phtml"/>
|
428 |
+
<block type="catalog/seo_sitemap_tree_pager" name="seo.sitemap.tree.pager.bottom" as="pager_bottom" template="page/html/pager.phtml"/>
|
429 |
+
<remove name="seo.sitemap.sitemap" />
|
430 |
+
<block type="catalog/seo_sitemap_tree_category" name="seo.sitemap.sitemap_tree" as="sitemap" after="pager_top" template="catalog/seo/tree.phtml">
|
431 |
+
<action method="bindPager"><pager>seo.sitemap.tree.pager.top</pager></action>
|
432 |
+
<action method="bindPager"><pager>seo.sitemap.tree.pager.bottom</pager></action>
|
433 |
+
</block>
|
434 |
+
</reference>
|
435 |
+
</catalog_seo_sitemap_category_tree>
|
436 |
+
|
437 |
+
<catalog_seo_sitemap_product translate="label">
|
438 |
+
<label>Catalog Seo Sitemap (Product List)</label>
|
439 |
+
<reference name="head">
|
440 |
+
<action method="setTitle" translate="title" module="catalog"><title>Site Map</title></action>
|
441 |
+
</reference>
|
442 |
+
<update handle="catalog_seo_sitemap" />
|
443 |
+
<reference name="seo.sitemap.container">
|
444 |
+
<action method="setTitle" translate="title" module="catalog"><title>Products</title></action>
|
445 |
+
<block type="catalog/seo_sitemap_product" name="seo.sitemap.sitemap" as="sitemap" after="pager_top" template="catalog/seo/sitemap.phtml">
|
446 |
+
<action method="bindPager"><pager>seo.sitemap.pager.top</pager></action>
|
447 |
+
<action method="bindPager"><pager>seo.sitemap.pager.bottom</pager></action>
|
448 |
+
<action method="setItemsTitle" translate="title" module="catalog"><title>products</title></action>
|
449 |
+
</block>
|
450 |
+
</reference>
|
451 |
+
<reference name="seo.sitemap.links">
|
452 |
+
<action method="addLink" translate="label title" module="catalog"><label>Categories Sitemap</label><url helper="catalog/map/getCategoryUrl"/><title>Categories Sitemap</title></action>
|
453 |
+
</reference>
|
454 |
+
</catalog_seo_sitemap_product>
|
455 |
+
</layout>
|
app/design/frontend/default/modern/layout/like/like.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<layout version="0.1.0">
|
2 |
+
<!--Make this like_index_index to use for update handle-->
|
3 |
+
<catalog_product_view>
|
4 |
+
<reference name="content">
|
5 |
+
<!-- Remove this reference also to use update handle-->
|
6 |
+
<reference name = "product.info">
|
7 |
+
<block type="like/indexblock" name="like_block" as="like_block"
|
8 |
+
template="like/likes.phtml" />
|
9 |
+
</reference>
|
10 |
+
</reference>
|
11 |
+
</catalog_product_view>
|
12 |
+
</layout>
|
app/design/frontend/default/modern/layout/testimonial/testimonial.xml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<layout version="0.1.0">
|
2 |
+
<testimonial_index_index>
|
3 |
+
<reference name="content">
|
4 |
+
<block type="testimonial/indexblock" name="index_block"
|
5 |
+
template="testimonial/feedbackform.phtml" />
|
6 |
+
</reference>
|
7 |
+
</testimonial_index_index>
|
8 |
+
<testimonial_testimonials_index>
|
9 |
+
<reference name="content">
|
10 |
+
<block type="testimonial/indexblock" name="index_block"
|
11 |
+
template="testimonial/testimonials.phtml" />
|
12 |
+
</reference>
|
13 |
+
</testimonial_testimonials_index>
|
14 |
+
<default>
|
15 |
+
<reference name="footer_links">
|
16 |
+
<action method="addLink" translate="label title">
|
17 |
+
<label>Customer Testimonials</label>
|
18 |
+
<url>testimonial/testimonials</url>
|
19 |
+
<title>Customer Testimonials</title>
|
20 |
+
<prepare>true</prepare>
|
21 |
+
<position>1</position>
|
22 |
+
<liParams/>
|
23 |
+
</action>
|
24 |
+
</reference>
|
25 |
+
</default>
|
26 |
+
</layout>
|
app/design/frontend/default/modern/template/catalog/product/view.phtml
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_modern
|
23 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Product view template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View
|
31 |
+
* @see Mage_Review_Block_Product_View
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
<?php $_helper = $this->helper('catalog/output'); ?>
|
36 |
+
<?php $_product = $this->getProduct(); ?>
|
37 |
+
<html><head>
|
38 |
+
<title>Superman</title></head>
|
39 |
+
<script type="text/javascript">
|
40 |
+
var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
|
41 |
+
</script>
|
42 |
+
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
43 |
+
<div class="product-view">
|
44 |
+
<div class="product-essential">
|
45 |
+
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
|
46 |
+
<?php echo $this->getBlockHtml('formkey') ?>
|
47 |
+
<div class="no-display">
|
48 |
+
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
49 |
+
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<div class="product-shop">
|
53 |
+
<div class="product-name">
|
54 |
+
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<?php if ($this->canEmailToFriend()): ?>
|
58 |
+
<p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
|
59 |
+
<?php endif; ?>
|
60 |
+
|
61 |
+
<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
|
62 |
+
<?php echo $this->getChildHtml('alert_urls') ?>
|
63 |
+
<?php echo $this->getChildHtml('product_type_data') ?>
|
64 |
+
<?php echo $this->getTierPriceHtml() ?>
|
65 |
+
<?php echo $this->getChildHtml('extrahint') ?>
|
66 |
+
<!--Like Comment this to produce block using update handle-->
|
67 |
+
<?php echo $this->getChildHtml('like_block'); ?>
|
68 |
+
<!--Till here -->
|
69 |
+
|
70 |
+
<?php if (!$this->hasOptions()):?>
|
71 |
+
<div class="add-to-box">
|
72 |
+
<?php if($_product->isSaleable()): ?>
|
73 |
+
<?php echo $this->getChildHtml('addtocart') ?>
|
74 |
+
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
|
75 |
+
<span class="or"><?php echo $this->__('OR') ?></span>
|
76 |
+
<?php endif; ?>
|
77 |
+
<?php endif; ?>
|
78 |
+
<?php echo $this->getChildHtml('addto') ?>
|
79 |
+
</div>
|
80 |
+
<?php endif; ?>
|
81 |
+
|
82 |
+
<?php if ($_product->getShortDescription()):?>
|
83 |
+
<div class="short-description">
|
84 |
+
<h2><?php echo $this->__('Quick Overview') ?></h2>
|
85 |
+
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
|
86 |
+
</div>
|
87 |
+
<?php endif;?>
|
88 |
+
|
89 |
+
<?php echo $this->getChildHtml('other');?>
|
90 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
91 |
+
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
|
92 |
+
<?php endif;?>
|
93 |
+
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<div class="product-img-box">
|
97 |
+
<?php echo $this->getChildHtml('media') ?>
|
98 |
+
</div>
|
99 |
+
|
100 |
+
<div class="clearer"></div>
|
101 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
102 |
+
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
|
103 |
+
<?php endif;?>
|
104 |
+
</form>
|
105 |
+
<script type="text/javascript">
|
106 |
+
//<![CDATA[
|
107 |
+
var productAddToCartForm = new VarienForm('product_addtocart_form');
|
108 |
+
productAddToCartForm.submit = function(button, url) {
|
109 |
+
if (this.validator.validate()) {
|
110 |
+
var form = this.form;
|
111 |
+
var oldUrl = form.action;
|
112 |
+
|
113 |
+
if (url) {
|
114 |
+
form.action = url;
|
115 |
+
}
|
116 |
+
var e = null;
|
117 |
+
try {
|
118 |
+
this.form.submit();
|
119 |
+
} catch (e) {
|
120 |
+
}
|
121 |
+
this.form.action = oldUrl;
|
122 |
+
if (e) {
|
123 |
+
throw e;
|
124 |
+
}
|
125 |
+
|
126 |
+
if (button && button != 'undefined') {
|
127 |
+
button.disabled = true;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}.bind(productAddToCartForm);
|
131 |
+
|
132 |
+
productAddToCartForm.submitLight = function(button, url){
|
133 |
+
if(this.validator) {
|
134 |
+
var nv = Validation.methods;
|
135 |
+
delete Validation.methods['required-entry'];
|
136 |
+
delete Validation.methods['validate-one-required'];
|
137 |
+
delete Validation.methods['validate-one-required-by-name'];
|
138 |
+
// Remove custom datetime validators
|
139 |
+
for (var methodName in Validation.methods) {
|
140 |
+
if (methodName.match(/^validate-datetime-.*/i)) {
|
141 |
+
delete Validation.methods[methodName];
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
if (this.validator.validate()) {
|
146 |
+
if (url) {
|
147 |
+
this.form.action = url;
|
148 |
+
}
|
149 |
+
this.form.submit();
|
150 |
+
}
|
151 |
+
Object.extend(Validation.methods, nv);
|
152 |
+
}
|
153 |
+
}.bind(productAddToCartForm);
|
154 |
+
//]]>
|
155 |
+
</script>
|
156 |
+
</div>
|
157 |
+
|
158 |
+
<div class="product-collateral">
|
159 |
+
<?php echo $this->getChildHtml('info_tabs') ?>
|
160 |
+
<?php echo $this->getChildHtml('product_additional_data') ?>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
</html>
|
app/design/frontend/default/modern/template/like/likes.phtml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$user = $this->getuser();
|
3 |
+
|
4 |
+
if ($user == "") {
|
5 |
+
|
6 |
+
}
|
7 |
+
else {
|
8 |
+
if ($this->getuserlike()>0) {
|
9 |
+
?>
|
10 |
+
<a href="<?php echo $this->getUrl('like/index/unlike',array('data'=>$this->getproduser())); ?>">Unlike</a>
|
11 |
+
<?php
|
12 |
+
}
|
13 |
+
else {
|
14 |
+
?>
|
15 |
+
<a href="<?php echo $this->getUrl('like/index/like',array('data'=>$this->getproduser())); ?>">Like</a>
|
16 |
+
<?php
|
17 |
+
}
|
18 |
+
echo " | ";
|
19 |
+
}
|
20 |
+
echo $this->getprodlikes();
|
21 |
+
?>
|
app/design/frontend/default/modern/template/testimonial/comments.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
foreach($this->getprodfeedbacks() as $feed)
|
3 |
+
{
|
4 |
+
echo "<b>".$feed->getname().": </b>".$feed->getremark()."<br>";
|
5 |
+
}
|
6 |
+
?>
|
app/design/frontend/default/modern/template/testimonial/feedbackform.phtml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(strpos($this->getuser(), "Nope")!== false)
|
3 |
+
echo "Login in to give feedback";
|
4 |
+
else
|
5 |
+
{
|
6 |
+
$details = explode(",", $this->getuser());
|
7 |
+
$name = $details[0];
|
8 |
+
$email = $details[1];
|
9 |
+
$product = $details[2];
|
10 |
+
echo ' <html>
|
11 |
+
<body>
|
12 |
+
<form action = '.$this->getUrl('testimonial/index/receive').' method = "post">
|
13 |
+
<p>Product: <input type="text" style="border:none" size = "30" name = "product" id = "product" value = "'.$product.'" readonly></p><br>
|
14 |
+
<p>Name: <input type="text" style="border:none" size = "30" name = "name" id = "name" value = "'.$name.'" readonly></p><br>
|
15 |
+
<p>Email: <input type="email" size = "30" name = "email" id = "email" value = "'.$email.'"></p><br>
|
16 |
+
<p>Number: <input type="number" size = "30" name = "phone" id = "phone" value = ""></p><br>
|
17 |
+
<p>Remarks: </p><p><textarea cols = 30 rows = 5 name="remark" id = "remark" required></textarea></p>
|
18 |
+
<p><input type = "submit"></p>
|
19 |
+
</form>
|
20 |
+
</body>
|
21 |
+
</html>';
|
22 |
+
}
|
23 |
+
?>
|
app/design/frontend/default/modern/template/testimonial/testimonials.phtml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
echo "<table border = '10' cellspacing = '10' cellpadding='10'><tr><th>Product ID</th><th>Name</th><th>Email</th><th>Phone</th><th>Remarks</th></tr>";
|
3 |
+
foreach($this->getfeedbacks() as $feed)
|
4 |
+
{
|
5 |
+
|
6 |
+
echo "<tr><td>".$feed->getproduct_id()."</td><td>".$feed->getname()."</td><td>".$feed->getemail()."</td><td>".$feed->getdial()."</td><td>".$feed->getremark()."</td></tr>";
|
7 |
+
}
|
8 |
+
echo "</table>";
|
9 |
+
?>
|
app/etc/modules/Lister_Like.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Phoenix
|
17 |
+
* @package Lister_Customer
|
18 |
+
* @copyright Copyright (c) 2014 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
-->
|
22 |
+
<config>
|
23 |
+
<modules>
|
24 |
+
<Lister_Like>
|
25 |
+
<active>true</active>
|
26 |
+
<codePool>local</codePool>
|
27 |
+
</Lister_Like>
|
28 |
+
</modules>
|
29 |
+
</config>
|
app/etc/modules/Lister_Testimonial.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Phoenix
|
17 |
+
* @package Lister_Customer
|
18 |
+
* @copyright Copyright (c) 2014 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
-->
|
22 |
+
<config>
|
23 |
+
<modules>
|
24 |
+
<Lister_Testimonial>
|
25 |
+
<active>true</active>
|
26 |
+
<codePool>local</codePool>
|
27 |
+
</Lister_Testimonial>
|
28 |
+
</modules>
|
29 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Registered_User_Like_Comment</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Like and Comment about products by registered users of the store.</summary>
|
10 |
+
<description>Registered users of the store can login and like and comment about the product. Product page displays the number of likes for the product. Logged in user can like/unlike a product and comment about it. Comments submitted can be approved/rejected by the store admin. Separate admin menu called &quot;Comments&quot; for admin. Admin can view comments and edit them to approve them. Approved comments appear under comments in the product page.</description>
|
11 |
+
<notes>Product page not logged in: View number of likes and all approved comments
|
12 |
+
Product page logged in: Like/Unlike, View number of likes and all approved comments, submit comment
|
13 |
+
Admin Comments menu: View and edit comments to approve or reject them</notes>
|
14 |
+
<authors><author><name>Anush</name><user>anushshiva</user><email>anushshiva@gmail.com</email></author></authors>
|
15 |
+
<date>2014-11-28</date>
|
16 |
+
<time>12:35:27</time>
|
17 |
+
<contents><target name="magelocal"><dir name="Lister"><dir name="Like"><dir name="Block"><file name="Indexblock.php" hash="f2323a1863addd62a30668797c63efc5"/></dir><dir name="Helper"><file name="Data.php" hash="2a8afb7d38f9d2fc20438625b3baa74c"/></dir><dir name="Model"><file name="Like.php" hash="c2fd89a64ad9fe95c63032516dc673cd"/><dir name="Resource"><dir name="Like"><file name="Collection.php" hash="d190472aa43b4801e11f5a0530f49bde"/></dir><file name="Like.php" hash="1a1f5c091edd0a4d197c1c8861a21d57"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="a6909089d3c6fa384b49d3e887dd93ab"/></dir><dir name="etc"><file name="config.xml" hash="d333794d73e2a3febcac892fc6d4246a"/></dir><dir name="sql"><dir name="like_setup"><file name="mysql4-install-0.7.0.php" hash="d5dfa1b6d87a846cdd218b93fa037e40"/></dir></dir></dir><dir name="Testimonial"><dir name="Block"><dir name="Adminhtml"><dir name="Testimonial"><dir name="Edit"><file name="Form.php" hash="61c712a4910b6a879dfa32904b49ca5c"/><dir name="Tab"><file name="Form.php" hash="2f6536301e9cfca7e6a936214a3a604e"/><file name="View.php" hash="1223fb502592c0e8e3c69d1a44300d12"/></dir><file name="Tabs.php" hash="9c0280bdde44ef72280efd1345eae818"/></dir><file name="Edit.php" hash="25bc996d72e088d724b5a72aadb134fd"/><file name="Grid.php" hash="11d8aa33c2f7fe130683dd0e216149a5"/></dir><file name="Testimonial.php" hash="184bbe13fd986ee6939284471a4e9a0b"/></dir><file name="Indexblock.php" hash="a66db1dee854b8cf7b54a197b5cd6d38"/></dir><dir name="Helper"><file name="Data.php" hash="b219c7bd0967db6165252c3316ced1b6"/></dir><dir name="Model"><file name="Feedbackmodel.php" hash="978b4b18315831cf5f914b4c1d9b2032"/><dir name="Resource"><dir name="Testimonial"><file name="Collection.php" hash="757f35e1ab6dd61a25df40ca0c8858a7"/></dir><file name="Testimonial.php" hash="13ce3e0893f2d0a892e7b0dfe448a90e"/></dir><file name="Testimonial.php" hash="b561e1debf43fc8fe8d37067170d8993"/><file name="Usermodel.php" hash="22ba632a4e7705a5dda7794901ba99e0"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="GridController.php" hash="87cd5c0dd28b4a5c04d4ad470e30b06d"/></dir><file name="IndexController.php" hash="ff6c3ac9c9871b2ea1489ce657da780f"/><file name="TestimonialsController.php" hash="d5158e6ebbbc930a149190c878a016fd"/></dir><dir name="etc"><file name="adminhtml.xml" hash="5541668a882374da164ad7cc6fa0a92f"/><file name="config.xml" hash="ab11da3314d2e8e49b4fe2ef4de0c60e"/></dir><dir name="sql"><dir name="testimonial_setup"><file name="install-1.6.0.0.php" hash="b93aa37d3964147d42a34a6f0dc5043c"/><file name="mysql4-install-0.7.0.php" hash="8723ca97f55d192c08b3cc077aa11827"/><file name="mysql4-upgrade-1.6.1.0-1.6.1.1.php" hash="e3eb20fa6a56fd2cc1f007dbbda5187d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="modern"><dir name="layout"><file name="catalog.xml" hash="7dca14a0a984b7c9eb3614cb077c67d7"/><dir name="like"><file name="like.xml" hash="f4fbb216e8f1daf189dff5a4cdfe6301"/></dir><dir name="testimonial"><file name="testimonial.xml" hash="c91d489ce51fdf07e1dd12b5e6d90117"/></dir></dir><dir name="template"><dir name="catalog"><dir name="product"><file name="view.phtml" hash="54ffc8da4be7a4cc92ea5970661d0777"/></dir></dir><dir name="like"><file name="likes.phtml" hash="9fc75b7c17c8716b27d545e579fc7900"/></dir><dir name="testimonial"><file name="comments.phtml" hash="f0741473bcf8d1a0e74cead4dd6f36a7"/><file name="feedbackform.phtml" hash="3fc0d0af91287d177a7c6093cf498bdc"/><file name="testimonials.phtml" hash="33a974f4ed3a4715e8f7a6ee59d6cde9"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lister_Like.xml" hash="a5c1d6c691335f7cef022184f4c19604"/><file name="Lister_Testimonial.xml" hash="c09d6a1144b199b6d624cbae9039bcd9"/></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
+
</package>
|