AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
More Category Items doesn't show items even though there are others in category
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
For one product in a category, more category items doesn't show anything even though there are other products in the category and the other products in the category show items in more category items. I'm trying to figure out what is going on by debugging the sql query. It ends up being the following, but then eliminates the product 4056, since that is the product being viewed. SELECT TOP 5 CN.* FROM ac_CatalogNodes AS CN INNER JOIN ac_Products AS P ON CN.CatalogNodeId = P.ProductId WHERE CN.CategoryId = 125 AND CN.CatalogNodeTypeId = 1 AND CN.OrderBy >-8 AND CN.OrderBy < 8 AND P.VisibilityId = 0 ORDER BY ABS (CN.OrderBy - 0)
I can't figure out your logic on int minOrderBy = currentOrderBy - 2 * parameters.MaxItems; int maxOrderBy = currentOrderBy + 2 * parameters.MaxItems;
In this case, the minOrderBy is -8 and maxOrderBy is 8 because the order by of this product is 0. If I take out the minOrderBy and the maxOrderBy, it returns 5 products, whose orderby s are 25,26,27,28.
I fixed this by moving the first product in the admin, then moving it back again.
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
Thanks for the explanation. Quote:I can't figure out your logic on int minOrderBy = currentOrderBy - 2 * parameters.MaxItems; int maxOrderBy = currentOrderBy + 2 * parameters.MaxItems; We are actually listing the products in More Category Items that are closest to the product being viewed. And this logic is actually looking for the nearest products to the product actually being viewed.
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
More Category Items doesn't show items even though there are others in category
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close