Hi,
There are two issues here.
1. Looking at the Demo site use this link Keyword Search on letter 'a'. Please note that the first four items returned in the search are links to the same item, 'Apply Cinema 30'. This item appears in multiple categories.
Suggestion, return unique items.
2. Using the search results from above, sort the items by price Low > High. Please note item returned in the 8th position. The price of the item is £1,175. This item is between items prices at £100 and and £235.
Not sure what/where the problem is here. But clearly the sort is off.
Thanks!
Love what you've done with the cart.
There are two issues here.
1. Looking at the Demo site use this link Keyword Search on letter 'a'. Please note that the first four items returned in the search are links to the same item, 'Apply Cinema 30'. This item appears in multiple categories.
Suggestion, return unique items.
2. Using the search results from above, sort the items by price Low > High. Please note item returned in the 8th position. The price of the item is £1,175. This item is between items prices at £100 and and £235.
Not sure what/where the problem is here. But clearly the sort is off.
Thanks!
Love what you've done with the cart.
OpenCart modules and custom programming
Please visit site and store www.opencartmods.com
Demo Site
It looks like Daniel probably duped the Apple Cinema monitor a bunch of times when testing the new copy function. You'll notice they all have different product IDs. So it's not a bug, just an issue with the demo store (in previous versions a product would have multiple returns if it was in multiple categories; I don't know if that was ever changed).
The Sony VAIO is a good catch. It appears the comma is the issue.
The Sony VAIO is a good catch. It appears the comma is the issue.
-Ryan
Yep, you are correct, the dups are the result of over active copy function.rph wrote:It looks like Daniel probably duped the Apple Cinema monitor a bunch of times when testing the new copy function. You'll notice they all have different product IDs. So it's not a bug, just an issue with the demo store (in previous versions a product would have multiple returns if it was in multiple categories; I don't know if that was ever changed).
The Sony VAIO is a good catch. It appears the comma is the issue.
that just leaves the sort by price issue.
thanks
/Goober
OpenCart modules and custom programming
Please visit site and store www.opencartmods.com
Demo Site
Yeah, the problem is the sort is doing everything as strings. Here's a real quick fix for it:
/catalog/model/catalog/product.php
Change:
To:
/catalog/model/catalog/product.php
Change:
Code: Select all
$sort_data = array(
'pd.name',
'p.price',
'rating'
);
if (in_array($sort, $sort_data)) {
$sql .= " ORDER BY LCASE(" . $sort . ")";
} else {
$sql .= " ORDER BY LCASE(pd.name)";
}
Code: Select all
$sort_data = array(
'LCASE(pd.name)',
'p.price',
'rating'
);
if (in_array($sort, $sort_data)) {
$sql .= " ORDER BY " . $sort;
} else {
$sql .= " ORDER BY LCASE(pd.name)";
}
-Ryan
We are running v1.4.8 and I have found the error that doesn't allow for sorting by price.
In that same file (/catalog/model/catalog/product.php), the 'p.price' sort option is missing from the array.
This error occurs in multiple places on this page in functions for sorting by category, manufacturer, tags, keyword, and specials.
BEFORE:
AFTER:
I also noticed that 'special' is incorrectly included in the list in most of these functions as well.
The specials info isn't available for sorting because the table is not included in the SQL query.
In that same file (/catalog/model/catalog/product.php), the 'p.price' sort option is missing from the array.
This error occurs in multiple places on this page in functions for sorting by category, manufacturer, tags, keyword, and specials.
BEFORE:
Code: Select all
$sort_data = array(
'pd.name',
'p.sort_order',
'special',
'rating'
);
Code: Select all
$sort_data = array(
'pd.name',
'p.price',
'p.sort_order',
'special',
'rating'
);
The specials info isn't available for sorting because the table is not included in the SQL query.
I have this problem in the backend.dunester wrote:Having the same pricing issue here.
On low to high $17.95 come before $4.95 - seems to be looking at each number individually i.e. the 1 in $17.95 is lower than the 4 in $4.95 so it gets put first.
They are sorted like this:
Name:
1.000 stuks
10.000 stuks
100 stuks
but I want to sort them like this:
Name:
100 stuks
1.000 stuks
10.000 stuks
without removing the '.'
Hi Guys,ocatfni wrote:We are running v1.4.8 and I have found the error that doesn't allow for sorting by price.
In that same file (/catalog/model/catalog/product.php), the 'p.price' sort option is missing from the array.
This error occurs in multiple places on this page in functions for sorting by category, manufacturer, tags, keyword, and specials.
BEFORE:AFTER:Code: Select all
$sort_data = array( 'pd.name', 'p.sort_order', 'special', 'rating' );
I also noticed that 'special' is incorrectly included in the list in most of these functions as well.Code: Select all
$sort_data = array( 'pd.name', 'p.price', 'p.sort_order', 'special', 'rating' );
The specials info isn't available for sorting because the table is not included in the SQL query.
I was having the same issue with my products not sort properly by price. I have edited the code as explained above, now it's almost working as it should be but just one product is now out of order?
I'm pretty limited when it comes to editing code etc so I don't want to start messing around with too much, if anyone has any ideas I would appreciate it. As I said the above fix worked to some extent but for some reason one product in still out of order, although there is only around 10 products on the page I was testing.
Thanks,
Pat
Gym Equipment Online Store
http://www.wizardhomefitness.com.au
----------------------------------------------------
Fresh Kicks Online Sneaker & Clothing Store
http://www.freshkicks.com.au
Who is online
Users browsing this forum: No registered users and 153 guests