Thanks in advance
This modification also makes it possible to sort or filtrer products by price.
In admin/controller/catalog/product
Find (37):
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$url .= '&filter_quantity=' . $this->request->get['filter_quantity'];
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$url .= '&filter_quantity=' . $this->request->get['filter_quantity'];
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$url .= '&filter_quantity=' . $this->request->get['filter_quantity'];
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$url .= '&filter_quantity=' . $this->request->get['filter_quantity'];
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$filter_quantity = $this->request->get['filter_quantity'];
} else {
$filter_quantity = NULL;
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$filter_price = $this->request->get['filter_price'];
} else {
$filter_price = NULL;
}
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$url .= '&filter_quantity=' . $this->request->get['filter_quantity'];
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
Code: Select all
'filter_quantity' => $filter_quantity,
Code: Select all
'filter_price' => $filter_price,
Code: Select all
'quantity' => $result['quantity'],
Code: Select all
'price' => $result['price'],
Code: Select all
$this->data['column_quantity'] = $this->language->get('column_quantity');
Code: Select all
$this->data['column_price'] = $this->language->get('column_price');
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$url .= '&filter_quantity=' . $this->request->get['filter_quantity'];
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
Code: Select all
$this->data['sort_quantity'] = HTTPS_SERVER . 'index.php?route=catalog/product&token=' . $this->session->data['token'] . '&sort=p.quantity' . $url;
Code: Select all
$this->data['sort_price'] = HTTPS_SERVER . 'index.php?route=catalog/product&token=' . $this->session->data['token'] . '&sort=p.price' . $url;
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$url .= '&filter_quantity=' . $this->request->get['filter_quantity'];
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
Code: Select all
$this->data['filter_quantity'] = $filter_quantity;
Code: Select all
$this->data['filter_price'] = $filter_price;
Code: Select all
if (isset($this->request->get['filter_quantity'])) {
$url .= '&filter_quantity=' . $this->request->get['filter_quantity'];
}
Code: Select all
if (isset($this->request->get['filter_price'])) {
$url .= '&filter_price=' . $this->request->get['filter_price'];
}
Find (287):
Code: Select all
if (isset($data['filter_quantity']) && !is_null($data['filter_quantity'])) {
$sql .= " AND p.quantity = '" . $this->db->escape($data['filter_quantity']) . "'";
}
Code: Select all
if (isset($data['filter_price']) && !is_null($data['filter_price'])) {
$sql .= " AND p.price = '" . $this->db->escape($data['filter_price']) . "'";
}
Code: Select all
'p.quantity',
Code: Select all
'p.price',
Code: Select all
if (isset($data['filter_quantity']) && !is_null($data['filter_quantity'])) {
$sql .= " AND p.quantity = '" . $this->db->escape($data['filter_quantity']) . "'";
}
Code: Select all
if (isset($data['filter_price']) && !is_null($data['filter_price'])) {
$sql .= " AND p.price = '" . $this->db->escape($data['filter_price']) . "'";
}
Find (22):
Code: Select all
$_['column_quantity'] = 'Quantity';
Code: Select all
$_['column_price'] = 'Price';
Find (32):
Code: Select all
<td class="right"><?php if ($sort == 'p.quantity') { ?>
<a href="<?php echo $sort_quantity; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_quantity; ?></a>
<?php } else { ?>
<a href="<?php echo $sort_quantity; ?>"><?php echo $column_quantity; ?></a>
<?php } ?></td>
Code: Select all
<td class="right"><?php if ($sort == 'p.price') { ?>
<a href="<?php echo $sort_price; ?>" class="<?php echo strtolower($order); ?>"><?php echo $column_price; ?></a>
<?php } else { ?>
<a href="<?php echo $sort_price; ?>"><?php echo $column_price; ?></a>
<?php } ?></td>
Code: Select all
<td align="right"><input type="text" name="filter_quantity" value="<?php echo $filter_quantity; ?>" style="text-align: right;" /></td>
Code: Select all
<td align="right"><input type="text" name="filter_price" value="<?php echo $filter_price; ?>" style="text-align: right;" /></td>
Code: Select all
<td class="right"><?php if ($product['quantity'] <= 0) { ?>
<span style="color: #FF0000;"><?php echo $product['quantity']; ?></span>
<?php } elseif ($product['quantity'] <= 5) { ?>
<span style="color: #FFA500;"><?php echo $product['quantity']; ?></span>
<?php } else { ?>
<span style="color: #008000;"><?php echo $product['quantity']; ?></span>
<?php } ?></td>
Code: Select all
<td class="right"><?php echo $product['price']; ?></td>
Code: Select all
var filter_quantity = $('input[name=\'filter_quantity\']').attr('value');
if (filter_quantity) {
url += '&filter_quantity=' + encodeURIComponent(filter_quantity);
}
Code: Select all
var filter_price = $('input[name=\'filter_price\']').attr('value');
if (filter_price) {
url += '&filter_price=' + encodeURIComponent(filter_price);
}
Tous les packs de langues Française depuis la v1.4.7 et toutes les versions intégrales 100 % Français sont disponibles sur le Portail Officiel Français.
********* Make note of this: *********
In admin/language/enclish/catalog/product.php
Find (22):
Code: Select all
$_['column_quantity'] = 'Quantity';
After add:
Code: Select all
$_['column_price] = 'Price';
***** Should be $_['column_price'] = 'Price';
***** The ending Apostrophe on 'column_price' is missing.
I edited it this on mine (after getting a syntax error) and now it works.
(cj)
http://www.adventhouseplans.com
----
Opencart v2.3.0.2 no VQMod yet
I fixed the above topic(cj) wrote: In admin/language/enclish/catalog/product.php
Find (22):
Code: Select all
$_['column_quantity'] = 'Quantity';
After add:
Code: Select all
$_['column_price] = 'Price';
***** Should be $_['column_price'] = 'Price';
***** The ending Apostrophe on 'column_price' is missing.
I edited it this on mine (after getting a syntax error) and now it works.
Thanks
Tous les packs de langues Française depuis la v1.4.7 et toutes les versions intégrales 100 % Français sont disponibles sur le Portail Officiel Français.
Users browsing this forum: No registered users and 19 guests