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

admin: correct category sort below top category #5899

Merged
merged 1 commit into from Jul 28, 2023

Conversation

torvista
Copy link
Member

Mentioned here: https://www.zen-cart.com/showthread.php?229613-category_product_listing-issue&p=1396101#post1396101

When in the subcategory immediately below the TOP, the sorting options redirect to the TOP category due to this:

if (isset($_GET['cID'])) {
  $_GET['cID'] = (int)$_GET['cID'];
}

$_GET['cID'] is set, but an empty string, but there is no category 0 so it redirects to the top, maintaining the previous sort order.

So a change to

if (!empty($_GET['cID'])) {
  $_GET['cID'] = (int)$_GET['cID'];

seems a fix: both category and product sort as selected.

@drbyte drbyte merged commit c668a0b into zencart:v158 Jul 28, 2023
5 checks passed
@torvista torvista deleted the admin_cat_sort branch July 28, 2023 08:40
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

Successfully merging this pull request may close these issues.

None yet

2 participants