Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Featured products output - limit does not exclude disabled products #6077

Closed
zemguru opened this issue Oct 11, 2017 · 0 comments
Closed

Comments

@zemguru
Copy link

zemguru commented Oct 11, 2017

Tested with latest Master. But the problem seems to be there for ages.
The same, I suppose, can be found in other modules?

To Reproduce:

  • Disable one product, e.g. IPhone 6

Go to Featured module, and set limit to 1 (can be any number, less then total "enabled" products added to Featured module),

Remove all products from Featured.

Add at first IPhone 6 (which is disabled) and then any other "enabled" product.
Save.

Go to homepage (or anywhere, where you have added Featured module display):

There will be no products shown, because we have LIMIT 1, but the first product returned is "Disabled", and result array is sliced AFTER limited return.

https://github.com/opencart/opencart/blob/master/upload/catalog/controller/extension/module/featured.php#L17-L22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants