Skip to content

Conversation

sarron93
Copy link
Owner

Description (*)

If use Magento\Backend\Block\Widget\Grid\Column\Filter\Price::getCondition method and Magento\Backend\Block\Widget\Grid\Column\Filter\Price::getValue() return array with indexes 'from' or 'to' string data, then PHP throw notice exception and Magento break apply filter, redirect to some page

Fixed Issues (if relevant)

  1. Fixes Price Filter Into Grid not working for specific data magento/magento2#29213

Manual testing scenarios (*)

  1. Create Grid Block with deprecated functionality extended class Magento\Backend\Block\Widget\Grid\Extended
  2. Add column type price $this->addColumn( 'total_price', [ 'header' => __('Total Price'), 'index' => 'total_price', 'type' => 'price', 'currency_code' => (string)$this->_scopeConfig ->getValue(Currency::XML_PATH_CURRENCY_BASE), ] );
  3. Apply a filter on this field. Example: '123a'
  4. Apply filter price to 123 cost

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@sarron93 sarron93 merged commit 238ce85 into 2.4-develop Jul 20, 2020
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.

Price Filter Into Grid not working for specific data
1 participant