Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix filter_category

  • Loading branch information...
commit a715be1aeab80c6d6e4a39d6207d2653739e8fc1 1 parent 71efe12
@msva msva authored
View
34 admin/controller/catalog/product.php
@@ -38,8 +38,8 @@ public function insert() {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
//filter category start//
- if (isset($this->request->get['filter_category'])) {
- $url .= '&filter_category=' . $this->request->get['filter_category'];
+ if (isset($this->request->get['filter_category_id'])) {
+ $url .= '&filter_category_id=' . $this->request->get['filter_category_id'];
}
//filter category end//
if (isset($this->request->get['filter_quantity'])) {
@@ -94,8 +94,8 @@ public function update() {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
//filter category start//
- if (isset($this->request->get['filter_category'])) {
- $url .= '&filter_category=' . $this->request->get['filter_category'];
+ if (isset($this->request->get['filter_category_id'])) {
+ $url .= '&filter_category_id=' . $this->request->get['filter_category_id'];
}
//filter category end//
if (isset($this->request->get['filter_quantity'])) {
@@ -206,8 +206,8 @@ public function copy() {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
//filter category start//
- if (isset($this->request->get['filter_category'])) {
- $url .= '&filter_category=' . $this->request->get['filter_category'];
+ if (isset($this->request->get['filter_category_id'])) {
+ $url .= '&filter_category_id=' . $this->request->get['filter_category_id'];
}
//filter category end//
if (isset($this->request->get['filter_quantity'])) {
@@ -255,10 +255,10 @@ private function getList() {
$filter_price = null;
}
//filter category start//
- if (isset($this->request->get['filter_category'])) {
- $filter_category = $this->request->get['filter_category'];
+ if (isset($this->request->get['filter_category_id'])) {
+ $filter_category_id = $this->request->get['filter_category_id'];
} else {
- $filter_category = NULL;
+ $filter_category_id = NULL;
}
//filter category end//
if (isset($this->request->get['filter_quantity'])) {
@@ -305,8 +305,8 @@ private function getList() {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
//filter category start//
- if (isset($this->request->get['filter_category'])) {
- $url .= '&filter_category=' . $this->request->get['filter_category'];
+ if (isset($this->request->get['filter_category_id'])) {
+ $url .= '&filter_category_id=' . $this->request->get['filter_category_id'];
}
//filter category end//
if (isset($this->request->get['filter_quantity'])) {
@@ -354,7 +354,7 @@ private function getList() {
'filter_model' => $filter_model,
'filter_price' => $filter_price,
//filter category start//
- 'filter_category' => $filter_category,
+ 'filter_category_id' => $filter_category_id,
// End
'filter_quantity' => $filter_quantity,
'filter_status' => $filter_status,
@@ -514,8 +514,8 @@ private function getList() {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
// Add
- if (isset($this->request->get['filter_category'])) {
- $url .= '&filter_category=' . $this->request->get['filter_category'];
+ if (isset($this->request->get['filter_category_id'])) {
+ $url .= '&filter_category_id=' . $this->request->get['filter_category_id'];
}
// End add
@@ -548,7 +548,7 @@ private function getList() {
$this->data['filter_model'] = $filter_model;
$this->data['filter_price'] = $filter_price;
// Add
- $this->data['filter_category'] = $filter_category;
+ $this->data['filter_category_id'] = $filter_category_id;
// End add
$this->data['filter_quantity'] = $filter_quantity;
$this->data['filter_status'] = $filter_status;
@@ -699,8 +699,8 @@ private function getForm() {
$url = '';
//filter category start//
- if (isset($this->request->get['filter_category'])) {
- $url .= '&filter_category=' . $this->request->get['filter_category'];
+ if (isset($this->request->get['filter_category_id'])) {
+ $url .= '&filter_category_id=' . $this->request->get['filter_category_id'];
}
//filter category end//
View
10 admin/view/template/catalog/product_list.tpl
@@ -63,10 +63,10 @@
<td><input type="text" name="filter_name" value="<?php echo $filter_name; ?>" /></td>
<td><input type="text" name="filter_model" value="<?php echo $filter_model; ?>" /></td>
<td align="left"><input type="text" name="filter_price" value="<?php echo $filter_price; ?>" size="8"/></td>
- <td ><select name="filter_category" style="width: 18em;" >
+ <td ><select name="filter_category_id" style="width: 18em;" >
<option value="*"></option>
<?php foreach ($categories as $category) { ?>
- <?php if ($category['category_id']==$filter_category) { ?>
+ <?php if ($category['category_id']==$filter_category_id) { ?>
<option value="<?php echo $category['category_id']; ?>" selected="selected"><?php echo $category['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $category['category_id']; ?>"><?php echo $category['name']; ?></option>
@@ -160,10 +160,10 @@ function filter() {
url += '&filter_price=' + encodeURIComponent(filter_price);
}
- var filter_category = $('select[name=\'filter_category\']').attr('value');
+ var filter_category_id = $('select[name=\'filter_category_id\']').attr('value');
- if (filter_category != '*') {
- url += '&filter_category=' + encodeURIComponent(filter_category);
+ if (filter_category_id != '*') {
+ url += '&filter_category_id=' + encodeURIComponent(filter_category_id);
}
var filter_quantity = $('input[name=\'filter_quantity\']').attr('value');
Please sign in to comment.
Something went wrong with that request. Please try again.