Now you will see the controller file of admin that controls all the code insert, list, delete, and form sections. You will get a description on each of them. Create a file atadmin/controller/catalog/feedback.php and start to insert the following lines of code:
<?php
class ControllerCatalogFeedback extends Controller { private $error = array(); public function index() {
$this->language->load('catalog/feedback');
$this->document->setTitle($this->language
->get('heading_feedback'));
$this->load->model('catalog/feedback');
$this->getList();
}
You created a controller named ControllerCatalogFeedback, which is extended from the parent called Controller. Next, you made the index function, which gets loaded by default. Within that, it loads the language files you have already created, and the title is set with the feedback heading and loaded with the feedback.php model file.
public function insert() {
$this->language->load('catalog/feedback');
$this->document->setTitle($this->language
->get('heading_feedback'));
$this->load->model('catalog/feedback');
if (($this->request->server['REQUEST_METHOD'] == 'POST') &&
$this->validateForm()) {
$this->model_catalog_feedback->addfeedback($this->request
->post);
$this->session->data['success'] = $this->language
->get('text_success');
$url = '';
if (isset($this->request->get['sort'])) {
$url .='&sort=' . $this->request->get['sort'];} if (isset($this->request->get['order'])) {
$url .='&order=' . $this->request->get['order'];} if (isset($this->request->get['page'])) {
$url .='&page=' . $this->request->get['page'];
}
$this->redirect($this->url->link('catalog/feedback',
'token=' . $this->session->data['token'] . $url, 'SSL'));
}
$this->getForm();
}
When you click on the Insert button, this function is called, and it loads the feedback language file and sets the title of the document as "Feedback", as heading_feedback holds the text "Feedback". Then, it loads the feedback.php model file and checks whether its form is submitted or not. If the form is not submitted, it will load the getForm() function from the same feedback.php controller file that shows
the form. If the form is submitted and is validated, it will save the data into the database and sends the $_POST value to model $this->model_catalog_feedback>addfeedback($this->request->post);for adding the feedback to the database. Then, the success session is set and applied with the sort order and limit and is redirected to the list of the feedback.
public function update() {
$this->language->load('catalog/feedback');
$this->document->setTitle($this->language
->get('heading_feedback'));
$this->load->model('catalog/feedback');
if (($this->request->server['REQUEST_METHOD'] == 'POST') &&
$this->validateForm()) {
$this->model_catalog_feedback->editfeedback($this->request
->get['feedback_id'], $this->request->post);
$this->session->data['success'] = $this->language
->get('text_success');
$url = '';
if (isset($this->request->get['sort'])) {
$url .='&sort=' . $this->request->get['sort'];} if (isset($this->request->get['order'])) {
$url .='&order=' . $this->request->get['order'];} if (isset($this->request->get['page'])) {
$url .='&page=' . $this->request->get['page'];}
$this->redirect($this->url->link('catalog/feedback', 'token='
. $this->session->data['token'] . $url, 'SSL'));
}
$this->getForm();
}
When we click on the edit link, the update page is loaded and hence the update function of this controller is called. It also loads the feedback.php language file, sets the title of the document, and loads thefeedback.php model file. If the submitted data are valid and the requested method is POST, the feedback will be saved into the
database, else it again calls the form and the form is shown. Update is made using code $this->model_catalog_feedback->editfeedback($this->request>get['feedback_id'], $this->request->post);. It calls the update function of the feedback model, and the session is set, it is applied the sort order limit, and redirected to the list of the feedback.
public function delete() {
$this->language->load('catalog/feedback');
$this->document->setfeedback_author($this->language
->get('heading_feedback'));
$this->load->model('catalog/feedback');
if (isset($this->request->post['selected']) && $this
->validateDelete()) {
foreach ($this->request->post['selected'] as $feedback_id) { $this->model_catalog_feedback->deletefeedback($feedback_id);
}
$this->session->data['success'] = $this->language
->get('text_success');
$url = '';
if (isset($this->request->get['sort'])) {
$url .='&sort=' . $this->request->get['sort'];} if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['page'])) {
$url .='&page=' . $this->request->get['page'];
}
$this->redirect($this->url->link('catalog/feedback', 'token='
. $this->session->data['token'] . $url, 'SSL'));
}
$this->getList();
}
For deleting the feedback, the preceding code is used. On the list of feedback page when you select the checkbox, which is to the left of each row, and click on the delete button, the delete function of the controller is executed. It deletes the selected rows
from the database, and the query that it runs is with the help of $this->model_ catalog_feedback->deletefeedback($feedback_id);. The deletefeedback function will be run on the loop or on each selected row, and the rows are deleted.
Till now, we have shown you the full code but taking the length of the code into consideration, we are now doing a copy, paste, and replace action by which it will be easy for us to mention only the required code and discard the one that is already mentioned.
Navigate to admin/controller/catalog/information.php and open it. Now find the protected function, getList(), copy the whole function to our feedback. php controller, and paste to thecontroller class just below the delete class as we mentioned previously; however, you can keep it anywhere outside the other functions. After pasting, find all the "information" words and change them to "feedback". Likewise, find all the "title" words and change them to feedback_author but only within the getList() function and not in the entire document. With the changes mentioned previously, you will see the following lines of code:
if (isset($this->request->get['sort'])) { $sort = $this->request->get['sort'];
} else {
$sort = 'fd.feedback_author';
}
$url = '';
if (isset($this->request->get['sort'])) {
$url .='&sort=' . $this->request->get['sort'];
}
Whenever you click on Sort Order on the list, it starts to order the table according to the sort order. If there is no click, it sorts by feedback_author. Similarly, the page number and order number are set as well as the get value of sort of the URL.
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home', 'token=' . $this
->session->data['token'], 'SSL'),
'separator' => false
);
Breadcrumbs are created in an array and passed on to the template file.
$this->data['insert'] = $this->url
->link('catalog/feedback/insert', 'token=' . $this->session
->data['token'] . $url, 'SSL');
$this->data['delete'] = $this->url
->link('catalog/feedback/delete', 'token=' . $this->session
->data['token'] . $url, 'SSL');
Insert and delete links are created and passed on to the template file.
$data = array(
'sort' => $sort,
'order' => $order,
'start' => ($page - 1) * $this->config
->get('config_admin_limit'),
'limit' => $this->config->get('config_admin_limit')
);
$feedback_total = $this->model_catalog_feedback
->getTotalfeedbacks();
$results = $this->model_catalog_feedback->getfeedbacks($data);
Results are received by querying the database.
foreach ($results as $result) {
$action = array();
$action[] = array(
'text' => $this->language->get('text_edit'),
'href' => $this->url->link('catalog/feedback/update', 'token=' .
$this->session->data['token'] . '&feedback_id=' .
$result['feedback_id'] . $url, 'SSL')
);
$this->data['feedbacks'][] = array(
'feedback_id' => $result['feedback_id'],
'feedback_author' => $result['feedback_author'],
'sort_order' => $result['sort_order'],
'selected' =>isset($this->request->post['selected'])
&&in_array($result['feedback_id'], $this->request
->post['selected']),
'action' => $action
);
}
Results received are combined to make it an array and passed to the template file.
$this->data['heading_feedback_author'] = $this->language
->get('heading_feedback_author');
$this->data['text_no_results'] = $this->language
->get('text_no_results');
Messages are retrieved from the language file and passed to the template file. Now again navigate to admin/controller/catalog/information.php, and open it to find the getForm()protected function and copy the whole function's code to our feedback.php controller. Paste this into the controller class just below the getlist() function as we mentioned previously, but you can keep it anywhere outside the other functions.
After pasting, find all the "information" words and change them to "feedback", and likewise find all the "title" words and change them to feedback_author, but only within the getForm() function and not in the entire document. As there are some extra fields, we have to remove the following code snippet:
if (isset($this->request->post['keyword'])) {
$this->data['keyword'] = $this->request->post['keyword'];
} elseif (!empty($feedback_info)) {
$this->data['keyword'] = $feedback_info['keyword'];
} else {$this->data['keyword'] = '';}
if (isset($this->request->post['bottom'])) {
$this->data['bottom'] = $this->request->post['bottom'];
} elseif (!empty($feedback_info)) {
$this->data['bottom'] = $feedback_info['bottom'];
} else {$this->data['bottom'] = 0;}
Once the replacement is complete and the extra fields are removed, our getForm function is ready.
$this->data['heading_feedback_author'] = $this->language-
>get('heading_feedback_author');
$this->data['text_default'] = $this->language->get('text_default');
$this->data['text_enabled'] = $this->language->get('text_enabled');
The preceding lines of code, and many such lines in the function, take the text or the sentence from the language and pass it to the template files.
if (isset($this->request->get['feedback_id']) && ($this->request
->server['REQUEST_METHOD'] != 'POST')) {
$feedback_info = $this->model_catalog_feedback
->getfeedback($this->request->get['feedback_id']);
}
This part of code checks whether the feedback_id is passed with the GET method of the form, and if so, it will retrieve the feedback and assign it to $feedback_info.
$this->data['token'] = $this->session->data['token'];
To preserve the session state within the admin section, the token session is defined and needs to be passed within all the URLs used within the admin section.
$this->load->model('localisation/language');
$this->data['languages'] = $this->model_localisation_language
->getLanguages();
It loads the language.php model, which is at the localization folder on the model section. It is loaded to load languages used in the site. All languages used are passed to the template file as the languages variable.
if (isset($this->request->post['feedback_description'])) {
$this->data['feedback_description'] = $this->request
->post['feedback_description'];
} elseif (isset($this->request->get['feedback_id'])) {
$this->data['feedback_description'] = $this
->model_catalog_feedback->getfeedbackDescriptions($this
->request->get['feedback_id']);
} else {$this->data['feedback_description'] = array();}
The preceding code checks whether feedback_description is passed as POST, and feedback_id is passed as a GET method or something else. If feedback_ description is passed as POST, it will hold thePOST data and if feedback_id is passed as the GET method, it will retrieve feedback_description from the database. If it is none, it will assign the blank array to feedback_description.
$this->load->model('setting/store');
$this->data['stores'] = $this->model_setting_store->getStores();
It loads the store.php model from the setting folder and retrieves all the stores and passes it to the template as the stores variable.
if (isset($this->request->post['feedback_store'])) {
$this->data['feedback_store'] = $this->request
->post['feedback_store'];
} elseif (isset($this->request->get['feedback_id'])) {
$this->data['feedback_store'] = $this->model_catalog_feedback
->getfeedbackStores($this->request->get['feedback_id']);
} else {$this->data['feedback_store'] = array(0);}
If the store is passed as POST, it will hold the POST data; if feedback_id is passed as GET, it will retrieve the store from the database. If it is none, it will assign an array with the zero value to the store, which is the default store value. The overall request data is checked with the following lines of code.
if (isset($this->request->post['feedback_layout'])) {
$this->data['feedback_layout'] = $this->request
->post['feedback_layout'];
} elseif (isset($this->request->get['feedback_id'])) {
$this->data['feedback_layout'] = $this->model_catalog_feedback
->getfeedbackLayouts($this->request->get['feedback_id']);
} else {$this->data['feedback_layout'] = array();}
The code snippets check whether feedback_layout is passed as POST, feedback_ id is passed as a GET method, or something else. If feedback_layout is passed as POST, it will hold the POST data, iffeedback_id is passed as the GET, it will retrieve feedback_layout from the database. If it is none, it will assign the blank array to feedback_layout.
protected function validateForm() {
if (!$this->user->hasPermission('modify', 'catalog/feedback')) {
$this->error['warning'] = $this->language
->get('error_permission');
}
if ($this->error && !isset($this->error['warning'])) {
$this->error['warning'] = $this->language
->get('error_warning');
}
if (!$this->error) {return true;} else {return false;} }
The validateForm()function is to validate the form and needs to be copied just below the getForm() function. It checks for user permission, whether to modify the feedback section or not. If it does not have permission, an error is shown.
protected function validateDelete() {
if (!$this->user->hasPermission('modify', 'catalog/feedback')) {
$this->error['warning'] = $this->language
->get('error_permission');
}
if (!$this->error) {return true;} else {return false;} }
The validateDelete()function is used to validate deletion. First, it checks whether the user has permission to modify or not. If the user has permission to modify, only he/she is able to delete. Then, they place the closing curly brace at the end for the class.
Creating the template files for form and list at the admin
Navigate to admin/view/template/catalog/, copy information_form.tpl, paste it in the same folder, and rename it as feedback_form.tpl. Likewise, copy the information_list.tpl file, paste on the same folder, and rename it to feedback_ list.tpl.
Now open the feedback_list.tpl file, look for information, and replace all with feedback. Likewise, look for title and replace all with feedback_author. Your feedback_list.tpl is now ready after the replacing process. Most of the code is already described in the feedback_list.tpl file, so we are ignoring them.
Now open the feedback_form.tpl file, look for information, and replace all with feedback. Likewise, find title and replace all with feedback_author. It contains some extra fields, so we have to remove them. Remove the following code from the feedback_form.tpl file:
<tr>
<td><?php echo $entry_keyword; ?></td>
<td><input type="text" name="keyword" value="<?php echo
$keyword; ?>" /></td>
</tr><tr>
<td><?php echo $entry_bottom; ?></td>
<td><?php if ($bottom) { ?> <input type="checkbox" name="bottom" value="1" checked="checked" />
<?php } else { ?> <input type="checkbox" name="bottom" value="1"
/>
<?php } ?></td>
</tr><tr>
<td><?php echo $entry_keyword; ?></td>
<td><input type="text" name="keyword" value="<?php echo $keyword;
?>" /></td>
</tr><tr>
<td><?php echo $entry_bottom; ?></td>
<td><?php if ($bottom) { ?> <input type="checkbox" name="bottom" value="1" checked="checked" />
<?php } else { ?> <input type="checkbox" name="bottom" value="1"
/>
<?php } ?></td>
</tr>
After removing the preceding code, feedback_form.tpl is ready. We are describing some code snippets from the feedback_form.tpl file, while the others are described already.
<td><textarea name="feedback_description[<?php echo
$language['language_id']; ?>][description]" id="description<?php
echo $language['language_id']; ?>"><?php echo isset($feedback_description[$language['language_id']]) ?
$feedback_description[$language['language_id']]['description']
: ''; ?></textarea>
<?php if (isset($error_description[$language['language_id']])) {
?>
<span class="error"><?php echo
$error_description[$language['language_id']]; ?></span>
<?php } ?>
</td>
The preceding code shows the text area. Here the name of the text area of the form is named as the feedback_description[<?php echo $language['language_id']; ?>][description] array for storing description as per the language. To show the editor, id=description<?php echo $language['language_id']; ?> plays a vital role. With the same ID name, the following code is called to show the editor:
<script type="text/javascript"
src="view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript"><!--
<?phpforeach ($languages as $language) { ?>
CKEDITOR.replace('description<?php echo $language['language_id'];
?>', { filebrowserBrowseUrl:
'index.php?route=common/filemanager&token=<?php echo $token;
?>', filebrowserImageBrowseUrl:
'index.php?route=common/filemanager&token=<?php echo $token;
?>', filebrowserFlashBrowseUrl:
'index.php?route=common/filemanager&token=<?php echo $token;
?>', filebrowserUploadUrl:
'index.php?route=common/filemanager&token=<?php echo $token;
?>', filebrowserImageUploadUrl:
'index.php?route=common/filemanager&token=<?php echo $token;
?>', filebrowserFlashUploadUrl:
'index.php?route=common/filemanager&token=<?php echo $token;
?>'
});
<?php } ?>
//--></script>
With this, the JavaScript code CKEditor is loaded on the text area field.
Write the entire code and call the ID of the text area at CKEDITOR.
replace('description<?php echo $language['language_id']; ?>', replace with your ID of the text area, and the editor will be shown at your text area.
With this, we complete the changes at the admin section. Now we are moving towards the frontend or catalog folder.
Creating the model file at the catalog folder frontend
We need to create a model file to retrieve data from the database. We will make the file at the catalog folder. Navigate to catalog/model/catalog/ and create feedback.php and insert the following lines of code:
<?php
Class ModelCatalogFeedback extends Model { public function getFeedbacks() {
$query = $this->db->query("SELECT DISTINCT * FROM " .
DB_PREFIX. "feedback f LEFT JOIN " . DB_PREFIX
."feedback_description fd ON (f.feedback_id = fd.feedback_id) LEFT JOIN " . DB_PREFIX. "feedback_to_store f2s ON (f.feedback_id = f2s.feedback_id)WHERE fd.language_id = '" . (int)$this->config->get('config_language_id') . "'
AND f2s.store_id = '" . (int)$this->config
->get('config_store_id') . "' AND f.status = '1'");
return $query->rows;
}
public function getTotalFeedbacks() {
$query = $this->db->query("SELECT COUNT(*) AS total FROM " .
DB_PREFIX . "feedback f LEFT JOIN " . DB_PREFIX .
"feedback_to_store f2s ON (f.feedback_id = f2s.feedback_id)
WHERE f2s.store_id = '" . (int)$this->config
->get('config_store_id') . "' AND f.status = '1'");
return $query->row['total'];
}
}
?>
We create a class named ModelCatalogFeedback as the feedback.php file is created in the catalog folder. Then, we create a public function, getFeedbacks. It queries the database to select all the data that have the status of 1 from the feedback table and the feedback_description table, which is then returned. At last, we create a public function called getTotalFeedbacks. It queries the database and counts all the active feedback. It returns the total number of active feedback. The model file, feedback. php, is ready.
Creating the language file at the frontend
Now navigate to catalog/language/english/product/, create a feedback.php file, and paste the following lines of code:
<?php
$_['text_feedback'] = 'List of feedback';
$_['text_description'] = 'List of feedback';
$_['text_keywords'] = 'List of feedback';
$_['text_error'] = 'Feedback not found!';
$_['text_empty'] = 'There are no feedbacks to list.';
?>
The required sentences are defined on the variable. Create the feedback.php language file.
Creating the controller file at the frontend
After creating the language and model file, we are creating the controller file. Navigate to catalog/controller/product/, create feedback.php, and insert the following code:
<?php
class ControllerProductFeedback extends Controller { public function index() {
$this->language->load('product/feedback');
$this->load->model('catalog/feedback');
The language file and model files are loaded to get the language and retrieve the model methods.
if (isset($this->request->get['page'])) { $page = $this->request->get['page'];
} else { $page = 1;}
if (isset($this->request->get['limit'])) { $limit = $this->request->get['limit'];
} else {
$limit = $this->config->get('config_catalog_limit');
}
It will set the $page variable to the GET value of the page if GET is set, else $page will be 1. This is needed for pagination. It will set the $limit variable to the GET value of the limit. If GET is not set, $limitwill be the value of the catalog limit of the setting from the admin.
$this->data['breadcrumbs'] = array(); $this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home'),
'separator' => false );
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_feedback'),
'href' => $this->url->link('product/feedback'),
'separator' =>'::' );
It adds the breadcrumb, which is passed as an array to the template file.
$this->document->setTitle($this->language
->get('text_feedback'));
$this->document->setDescription($this->language
->get('text_description'));
$this->document->setKeywords($this->language
->get('text_keywords'));
The preceding lines of code set the document title, metadescription, and keywords. These are described in the language file.
$this->data['heading_title'] = $this->language
->get('text_feedback');
$this->data['text_empty'] = $this->language
->get('text_empty');
$this->data['button_continue'] = $this->language
->get('button_continue');
The preceding lines of code are for retrieving the message from the language file and passing it to the template file.
$url = '';
if (isset($this->request->get['page'])) {
$url .='&page=' . $this->request->get['page']; }
$this->data['feedbacks'] = array(); $data = array(
'start' => ($page - 1) * $limit,
'limit' => $limit );
The $data variable is passed as the parameter to retrieve only a limited number of the feedback data.
$results = $this->model_catalog_feedback->getfeedbacks($data); foreach ($results as $result) {
$this->data['feedbacks'][] = array(
'feedback_author' => $result['feedback_author'],
'description'=>html_entity_decode($result['description'],
ENT_QUOTES, 'UTF-8'),
);
}
The $results variable retrieves the data, and it is run through the loop to assign only the author's name and the described feedback. Feedback description is stored as encoded HTML, and we have to decode it to show only the formatted HTML; we parse it with html_entity_decode.
$feedback_total = $this->model_catalog_feedback
->getTotalFeedbacks();
The preceding line of code retrieves the total number of active feedback.
$pagination = new Pagination();
$pagination->total = $feedback_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url
->link('product/feedback','&page={page}');
$this->data['pagination'] = $pagination->render();
The preceding lines of code pass the pagination variable to the template file to show pagination.
$this->data['limit'] = $limit;
$this->data['continue'] = $this->url->link('common/home');
if (file_exists(DIR_TEMPLATE . $this->config ->get('config_template') . '/template/product/feedback.tpl')) {
$this->template = $this->config->get('config_template') .
'/template/product/feedback.tpl';
} else {
$this->template = 'default/template/product/feedback.tpl';
}
It checks whether the template file for the current active theme is available or not, and if available, it will render the feedback.tpl file, else it renders the feedback. tpl file from the default theme.
$this->children = array(
'common/column_left',
'common/column_right',
'common/content_top',
'common/content_bottom',
'common/footer',
'common/header'
);
$this->response->setOutput($this->render());
}
}
?>
With this, the feedback.php controller file is also ready.
Creating the template file at the frontend
Navigate to catalog/view/theme/default/template/product, create feedback. tpl, and insert the following code:
<?php echo $header; ?><?php echo $column_left; ?><?php echo
$column_right; ?>
<div id="content"><?php echo $content_top; ?>
<div class="breadcrumb">
<?phpforeach ($breadcrumbs as $breadcrumb) { ?>
<?php echo $breadcrumb['separator']; ?><a href="<?php echo
$breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
<?php } ?>
</div>
The preceding lines of code show the breadcrumbs.
<h1><?php echo $heading_title; ?></h1>
<?php if ($feedbacks) { ?>
<div class="content">
<?phpforeach ($feedbacks as $feedback) { ?>
<div>
<div class="name">Name: <?php echo $feedback['feedback_author']; ?></ div>
<div class="description"><?php echo $feedback['description']; ?></div>
</div>
<?php } ?>
The preceding lines of code show the List of feedback, Author name, and its description as shown in the following screenshot:
To show the pagination for the template file, we have to insert the following lines of code to the part where we would like to show the pagination:
<div class="pagination"><?php echo $pagination; ?></div>
It shows the pagination in the template file and mostly we show the pagination at the bottom, so paste the code at the end of the feedback.tpl file.
</div>
<?php } ?>
<?php if (!$feedbacks) { ?>
<div class="content"><?php echo $text_empty; ?></div>
If there are no feedback, a message saying There are no feedbacks to show is shown as per the language file.
<div class="buttons">
<div class="right"><a href="<?php echo $continue; ?>" class="button"><?php echo $button_continue; ?></a></div>
</div>
<?php } ?>
<?php echo $content_bottom; ?></div>
<?php echo $footer; ?>
With this, the template file is also complete and thus our feedback management is complete.
Now, we insert the link on the menu to be able to manage the feedback, so navigate to admin/language/english/common/header.php and look for the following line of code:
$_['text_zone'] = 'Zones';
And after this insert the following line of code:
$_['text_feedback'] = 'Feedback';
In the language file, we defined text_feedback, which we need to call at the controller and pass it to the template. Now, we are calling in the controller file, so navigate toadmin/controller/common/header.php and look for the following line of code:
$this->data['heading_title'] = $this->language->get('heading_title');
Then insert the following line of code:
$this->data['text_feedback'] = $this->language->get(' text_feedback');
Likewise, for linking the Feedback word, we have to define the URL and it is done as shown in the following code. For this, we have to insert the following lines of code just before $this->data['stores'] = array();:
$this->data['feedback_link'] = $this->url->link('catalog/feedback',
'token=' . $this->session->data['token'], 'SSL');
Now navigate to admin/view/template/common/header.tpl and look for the following line of code:
<li><a href="<?php echo $review; ?>"><?php echo $text_review; ?></a></ li>
Then, insert the following line of code:
<li><a href="<?php echo $feedback; ?>"><?php echo $feedback; ?></a></ li>
With the preceding code insertion, you will be able to see the Feedback link when you hover on Catalog of the admin menu. Now click on the Feedback link and you will be able to see the list of feedback, if there is any, as well as the Insert button and the Delete button. Now you are ready to manage the feedback.
Till now we have created the page to list the feedback and a form to edit, delete, and insert the feedback. Now, you can also create the module for feedback by following the steps in the previous chapters. For viewing the list of feedback at the frontend, we have to use the link as follows and insert the link somewhere in the templates so that visitors will be able to see the feedback list.
http://www.example.com/index.php?route=product/feedback.
No comments:
Post a Comment