Product
Store demo
Showcase
Features
Why for developers
Why for store owners
Industries
Fashion
Health & Beauty
Food & Beverage
Automotive
Industrial & Scientific
Furniture
B2B eCommerce
International
Downloads
Download nopCommerce
Marketplace
Translations
Copyright removal key
Mobile application
Web API
Support & services
Training
Documentation
Community forums
Premium support services
Request a quote
Contact us
Partners
English
English
Español
Deutsch
Russian
Français
Italiano
Português
Türkçe
简体中文
日本語
Tiếng Việt
Get started
Shopping cart
My account
Log in
Register
Home
>
Forums
>
General
>
Bug Reports
>
Nop_ProductLoadAllPaged small issue
Nop_ProductLoadAllPaged small issue
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
milasch
Total Posts:
33
Karma:
175
Joined:
10/7/2009
Location:
Canada
Posted:
13 years ago
Hi,
Nop_ProductLoadAllPaged is considering ProductVariants which Deleted=1 leading to problems with sorting.
I've fixed it by simply putting an "AND pv.Deleted=0" in the where clause.
Thanks
milasch
Total Posts:
33
Karma:
175
Joined:
10/7/2009
Location:
Canada
Posted:
13 years ago
I've just noticed things are a bit more complicated than that. Actually we can indeed have products and no productvariant. The only problem is that when trying to sort, the stored procedure will take in consideration deleted product variants.
So instead of only adding:
AND
(
pv.Deleted=0
)
it will only work with
AND
(
@OrderBy=0 OR pv.Deleted=0
)
milasch
Total Posts:
33
Karma:
175
Joined:
10/7/2009
Location:
Canada
Posted:
13 years ago
Correction:
AND
(
@OrderBy<>0 AND pv.Deleted=0
)
milasch
Total Posts:
33
Karma:
175
Joined:
10/7/2009
Location:
Canada
Posted:
13 years ago
Correction # 2:
AND
(
@OrderBy=0 OR (@OrderBy<>0 AND pv.Deleted=0)
)
My bad! :P
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Still have questions or need help?
.
Premium support services
.
Get dedicated support from the nopCommerce team with a guaranteed response within 24 hours.
.
Online course for developers
.
Get the practical and technical skills you need to run and customize nopCommerce websites.