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

Keep current selection for Related, Up-sells, Cross-sells, Associated grids #2715

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

luigifab
Copy link
Contributor

@luigifab luigifab commented Nov 16, 2022

Description

Go to Catalog > Products and choose any product.
For Related, Up-sells, Cross-sells, Associated (for grouped products) grids.

  • Uncheck all products, then reset filter or filter or sort or change the page, after AJAX all products are unchecked.
  • Check some products, then reset filter or filter or sort or change the page, after AJAX selected products are checked.

Try Sales / Order grid, this is the same thing.
This is an extract of #1379.

OpenMage 20.0.17 / PHP 8.0.25

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

@github-actions github-actions bot added the Component: Adminhtml Relates to Mage_Adminhtml label Nov 16, 2022
@fballiano
Copy link
Contributor

I'm not sure I understand the current behaviour and the wanted one

@kiatng
Copy link
Contributor

kiatng commented Dec 2, 2022

I think it's bug: backend product page > Up-Sells tab > grid

  1. select a product on page 1
  2. go to page 2 and back to page 1
  3. the selected product is unchecked

However, the fix doesn't seem to work for me.

@luigifab
Copy link
Contributor Author

luigifab commented Jan 1, 2023

I tested your scenario, with the current PR, it works for me.

@ADDISON74
Copy link
Contributor

ADDISON74 commented Jan 13, 2023

This is a nasty bug. I was able to reproduce it easily. If you use Magento Sample Pack, just edit the product Silver Desert Necklace, go to Up-sells, select in the grid Any and press the [Search] button. You will get 30 product pages in the grid. Select one product at a time on the first 4 pages then go back without saving the product. All selections not made no longer exist, they are gone.

The funny part is that the interface notices the change and displays the diskette icon for saving next to Up-sells.

@ADDISON74
Copy link
Contributor

I applied this PR and the issue is solved. All checkmarks remain on each page in the grid.

Copy link
Contributor

@kiatng kiatng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested.

@fballiano fballiano merged commit bad6244 into OpenMage:1.9.4.x Jan 19, 2023
@fballiano
Copy link
Contributor

merged and cherrypicked to v20

@luigifab luigifab deleted the fix-product-xsell branch March 15, 2023 20:14
@luigifab luigifab restored the fix-product-xsell branch March 15, 2023 20:14
@luigifab luigifab deleted the fix-product-xsell branch March 15, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Component: Adminhtml Relates to Mage_Adminhtml
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants