EmicoEcommerce / Magento2Tweakwise-archived

Magento 2 module for Tweakwise integration
Other
9 stars 25 forks source link

Price filter remove link isn't working #39

Closed jasperzeinstra closed 6 years ago

jasperzeinstra commented 6 years ago

When price filter is shown as a slider and you filter by price you get a GET param in your url something lik https://www.urlofyourshop.com/category/?price%5B0%5D=212-999. In the state block above the filters you will see two links to delete the price, one for 212 and one for 999. But the clear URL isn't made correctly. \Emico\Tweakwise\Model\Catalog\Layer\Url\QueryParameters::getAttributeRemoveUrl is not handeling the values correctly. It's handeling price as a multi select, trying to remove 212 or 999 from the options. But it's checking $index = array_search($value, $values); $values is an array [0 => '212-999'], and $value is 212 or 999, so array search doesn't return a $key and then the remove URL is incorrect.

Environment

Steps to reproduce

  1. Filter on price
  2. Notice that there are two price remove links
  3. Try to remove price filter by clicking on one of the links

Actual result

  1. Price filter isn't removed

Expected result