1

In layered navigation it is required to make custom parameter in remove link for triggering proper removal in this filter, to have possibility to save filter state in session and be able to remove this filter as well.

I using following approach:

public function apply(Zend_Controller_Request_Abstract $request, $filterBlock)
{
    if ($request->getParam('delete_filter') == 1) {
        $request->setParam('delete_filter', 0);
        Mage::getSingleton('customer/session')->unsFilterSettings();
        return $this;
    }
   // create filter from customer session paramteres

I am using Ajax filter and can't get rid of this delete_filter param, is it possible to patch request on the fly and remove this parameter ? I tried clearParams() - no luck

  • in the layered navigation if the parameter is not in url it's automatically removed. – Qaisar Satti Apr 26 '16 at 10:24
  • yes, thats why i need somehow to separate removal from empty parameter of this filter (if its empty to make filter from session) and trying to use custom parameters like this one. but cant get rid of it – Ilja Apr 26 '16 at 10:26
  • did you adding this in session? what is your current url? – Qaisar Satti Apr 26 '16 at 10:29
  • /category_url/filter/LANGUAGE/25,35.html?delete_languages=1&isLayerAjax=1 the LANGUAGE is the subject filter param – Ilja Apr 26 '16 at 10:31
  • you want to remove the language param 25? – Qaisar Satti Apr 26 '16 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.