e commerce – How to allow multiple live filters to be selected and how do you show results?

So my question is about applying e-commerce filters that then shows live results (e.g. with AJAX / no page reload).

In this case you can theoretically allow user select multiple filters at given time, rather than one-by-one.

In theory, it could be really useful: for example, user wants to select all products with 4 and 5 star feedback.

With regular flow it will look like:

Select 5 star → site shows results → scroll to star filter → select 4 stars → site shows results

If you could allow select multiple filters the flow is much simpler:

Select 5 star → select 4 stars → site shows results

The problem is it’s difficult to define clear conditions how to do that.

How / when to apply the filters?

NN recommends to check whether a cursor (keyboard focus) is still in the filter area and load results if cursor leaves the filter area (or load after 1-2 seconds regardless). So in theory person can apply multiple filters before results are loaded.

I didn’t found a site with described functionality though. Most allow only to apply 1 filter at time: either full page reloads or results load immediately after first filter selected, thus making it impossible to select more filters.

How to show the results

Then the problem is how do you show the results, because you have two options:

  1. Scroll to the top of the page, making it impossible to add more filters (because you also scroll filter panels).
  2. Do not scroll, but that can make user think there were no results (if there are e.g. 3 results and you’re down below on the page).

The article doesn’t really gives the solutions and contradicts itself marking both options as subpar ones. So would be great if someone has a solution here that satisfies both cases.

neutral density – Do I still need filters for photographing landscape under an eclipse, if I’m not zooming in on the sun itself?

When using a solar filter and properly exposing to see details on the sun’s surface, the only thing that is going to show up anywhere in the frame is the sun. Notice that there are no stars visible in any filtered images below.

enter image description here
About an hour before totality as the Moon’s silhouette is just beginning to move in front of the Sun. A solar filter was used with a 200mm lens (the image is heavily cropped to about a 900mm angle of view on a FF camera) on a 20MP APS-C camera. ISO 400, 1/500 second, f/5.6. The filter is providing about 15 stops of attenuation not only of visible light, but of infrared and UV as well.

Everything else will be entirely too dark. If you want to take photos of the landscape during an eclipse, you won’t be able to use a solar filter unless you use exposures in the minutes-long range.

This unfiltered image was taken about two minutes before totality. ISO 1600, 1/100, f/4 That’s EV100 = 7, about the same brightness as brightly lit nighttime streets or a stage show. In full direct sunlight the scene would have been about eight stops, or 256X brighter!

enter image description here

During a total solar eclipse one can safely image the Sun’s corona without a solar filter. The light from the Sun’s corona is much dimmer that the surface of the Sun itself.
enter image description here
Unfiltered. ISO 400, 1/500, f/5.6 (EV100 = 12, about the same exposure settings one would use for a subject in full shadow on a sunny day.)

Below is an unfiltered image of the “Diamond Ring” that is visible just as the very first speck of the Sun’s surface becomes visible after totality ends. Notice that the exposure is bright enough to see a bright star, Regulus in the constellation Leo, to the upper left of the Sun.
enter image description here
Unfiltered. ISO 1600, 1/125, f/4 (EV100 = 7). FF camera at 105mm (cropped)

On the other hand, when enough of the Sun’s limb is visible to see the “Bailey’s beads”, the sun is much too bright to be imaged without a filter. Below is a filtered shot taken just 24 seconds after the “Diamond Ring” image above! Most annular eclipses will be much brighter than this for the entire event.
enter image description here
Filtered. ISO 400, 1/500, f/5.6 (EV100 = 12 with a 15 stop filter! That’s EV100 = 27. The exposure settings plus solar filter were 20 stops dimmer than the “diamond ring” shot.

So what I am wondering is, if I were to take a landscape photo with a mild telephoto lens (e.g. a 85mm), with an eclipsing sun in a corner, do I still need the recommended protection? Or would a 10 stop, ND 1000 filter be sufficient?

A ten-stop ND filter would probably make things worse. Why? Because many ND filters only attenuate for visible light wavelengths and do not attenuate infrared wavelengths, which is where most of the damage the sun can do will come from. With a ten-stop ND filter, you’ll expose for ten time longer, thus subjecting your camera to ten times as much of the Sun’s infrared energy!

Personally, I wouldn’t include the sun when it is more than a few degrees above the horizon in any frame when using a 50mm lens, much less an 85mm.

It’s usually fairly safe to photograph a scene containing the sun using a wide angle lens, say 35mm or wider on FF body, when using a DSLR or other camera that only exposes the sensor or film during the actual exposure. For mirrorless cameras, though, the sensor is almost always exposed just as it would be for a very long exposure and more care must be taken with regard to the sun.

As the focal length increases, more of the sun’s energy will be collected by the lens. This means more potential for damage.

enter image description here

enter image description here

Not only can you damage your camera and/or lens, but you can also permanently damage your vision if using an optical viewfinder!

The links embedded above point to other questions we’ve had here at Photography SE that address most of your concerns. Let us know if you still have questions after reading them.

8 – I can’t change permissions for text filters

I performed a pretty massive 50,000+ node migration a few weeks ago (from Drupal 7.70 to Drupal 8.9), and just noticed today that some of the Text Filters aren’t visible in content creation pages (in particular, Plain text filter, which is what I like to make the default for most fields).

I tried creating a similar filter called “Plain”, but when defining the default filter for content types on text fields, though at least now the new filter is visible as on option from the select box, it won’t save (it reverts back to Full HTML filter on save). Furthermore, the filter permissions page shows that something is awry as well…as I am unable to assign ANY permissions for the new filter or two of the migrated filters to any custom roles.

Clearly the migration didn’t go smoothly. It took me 2 weeks to get ANY migration to work properly…so I really do no want to roll back and try again if possible. Is there any way I an fix the text filters and their respective permissions problem here?

I have full access to the server, mysql, etc. Is there something I should be looking for in particular? Or at least a DB model that I can copy?

Thanks in advance for your help.

enter image description here
enter image description here
enter image description here

EDIT: I just noticed that I can go into the individual user roles, and “see” the checkboxes that aren’t showing up on the Permissions matrix (where you can select permissions for all users at once). Is this maybe just a rendering bug for the main permissions display page? Here’s another screenshot:

enter image description here

filters – Get current user data

I do work on filter posts by current user, but in my dropdown list, i can get only all users list, but I need to see only the current user

function getСurrentUserForFilter(){
    $res = '';
    $user_query = new WP_User_Query(array('number'=>999));
    $users = $user_query->get_results();
    foreach($users as $user){
        echo'<option value="'.$user->ID.'">'.$user->user_email.'</option>';
    return $res;

what am I doing wrong?

magento2.3 – add custom filters in search results in Magento 2.3

I want to override or add a custom filter in search results, for this I override ListProduct, all seams working fine, except the pagination and left navigation do not reflect the filter

here is my code, searching is fine, the only issue is pagination and left navigation is not updating as per new search filters.

use MagentoCatalogModelProduct;

class ListProduct extends MagentoCatalogBlockProductListProduct
    protected $_customerSession;
    protected $categoryFactory;
    protected $_productCollection;
    protected $_redirect;
    protected $_url;

 * ListProduct constructor.
 * @param MagentoCatalogBlockProductContext $context
 * @param MagentoFrameworkDataHelperPostHelper $postDataHelper
 * @param MagentoCatalogModelLayerResolver $layerResolver
 * @param MagentoCatalogApiCategoryRepositoryInterface $categoryRepository
 * @param MagentoFrameworkUrlHelperData $urlHelper
 * @param Helper $helper
 * @param array $data
 * @param MagentoCustomerModelSession $customerSession
 * @param MagentoCatalogModelCategoryFactory $categoryFactory
public function __construct(
    MagentoFrameworkUrlInterface $url,
    MagentoFrameworkAppResponseHttp $redirect,
    MagentoCatalogBlockProductContext $context,
    MagentoFrameworkDataHelperPostHelper $postDataHelper,
    MagentoCatalogModelLayerResolver $layerResolver,
    MagentoCatalogApiCategoryRepositoryInterface $categoryRepository,
    MagentoFrameworkUrlHelperData $urlHelper,
    array $data = (),
    MagentoCustomerModelSession $customerSession,
    MagentoCatalogModelCategoryFactory $categoryFactory
) {
    $this->_customerSession = $customerSession;
    $this->categoryFactory = $categoryFactory;
    $this->_url = $url;
    $this->_redirect = $redirect;


public function getFilteredProductCollection()
    return $this->_getProductCollection();

protected function _getProductCollection()
    return $this->_productCollection = $this->initializeProductCollection();

private function initializeProductCollection()
    $layer = parent::getLayer();
    $collection = $layer->getProductCollection()->addAttributeToFilter('MY_ATTRIBUTE', 'SOME VALUE');
    return $collection;


The number of products displayed on the page clears all selected product filters – woocommerce

I have a problem on the Product archive, when I filter products and change the number of displayed products per page, all the set filters are reset.

I’ve noticed that both the filter and the number of products on the page also enter their attributes in the URL, and that’s probably the problem. Does anyone have any solution for this?

enter image description here

Filtered products: http://xxx.xxx/product-category/spirits/?ixwpst[pa_brand[]=25&ixwpst[pa_brand[]=28&title=1&excerpt=1&content=1&categories=1&attributes=1&tags=1&sku=1&ixwpsf[pa_brand][show]=all&ixwpsf[taxonomy][pa_brand][multiple]=1&ixwpsf[taxonomy][pa_brand][filter]=0&ixwpsf[taxonomy][pa_region][show]=all&ixwpsf[taxonomy][pa_region][multiple]=1&ixwpsf[taxonomy][pa_region][filter]=0&ixwpsf[taxonomy][pa_detail-type-1][show]=all&ixwpsf[taxonomy][pa_detail-type-1][multiple]=1&ixwpsf[taxonomy][pa_detail-type-1][filter]=0&ixwpsf[taxonomy][pa_detail-type-2][show]=all&ixwpsf[taxonomy][pa_detail-type-2][multiple]=1&ixwpsf[taxonomy][pa_detail-type-2][filter]=0

Displaying number of products on page: http://xxx.xx/product-category/spirits/?Products-per-page=48

filters – Agricultural spectrum photography and NIR

I am looking into different cameras or sensors that i could use to measure the following em ranges that are useful to agriculture. I’m hoping to construct an open source device(s) to measure the following within a small and reproducible device(s):

Cellulose Absorption Index: 2000-2200nm

Plant Water Index: 902-970nm

Disease Water Stress Index: 547-1657nm

NDVI 670-800nm

I am also looking for filters or filter combinations for the following ranges:

Cellulose Absorption Index: 2000-2200nm

Plant Water Index: 902-970nm

Disease Water Stress Index: 547-1657nm


magento2 – Apply filters or mass actions on grids with fake collection (or wirhout ui components)

I a admin grid with a change on _prepareCollection() function to get the collection from a response of api call, its working fine. But I do not have the filters or mass functions, how can I do that without ui components?

enter image description here

I have this change on my grid file:

 * Collection
protected function _prepareCollection()
    $filter = (
        'query' => 'cat yellow',
        'page' => 1,
        'region' => '',
        'year' => '',

    $collection = $this->_api->searchCat($filter);

    return parent::_prepareCollection();

If I could simulate a collection, maybe I could use ui components, but I’m lost, how can I resolve my problem?

The idea is use the filter to search cats with cat api, and the mass action is to import those registers into a products.

filters – How to prevent WordPress from updating the post modified date?

I asked this here because I am going to change categories for 100+ posts. But I don’t want to change the modified date(I use the quick edit feature). So I am looking a way to temporarily disable updating the modified date?

Is there any filter for that?

Localhost port delay using tc filters

After searching on Internet and reading this and this, I am able to have delay over three different ports as I am just only using the three main branches of the tree.

tc qdisc del dev lo root
tc qdisc add dev lo root handle 1:prio
tc qdisc add dev lo parent 1:1 handle 30: netem delay 146ms
tc qdisc add dev lo parent 1:2 handle 20: netem delay 275ms
tc qdisc add dev lo parent 1:3 handle 10: netem delay 258ms
tc filter add dev lo parent 1: protocol ip prio 1 u32 match ip dport 6332 0xffff flowid 1:1
tc filter add dev lo parent 1: protocol ip prio 1 u32 match ip dport 6333 0xffff flowid 1:2
tc filter add dev lo parent 1: protocol ip prio 1 u32 match ip dport 6334 0xffff flowid 1:3

The problem is that I am not able to scale it to four and over. I will desire to have up to 16 different ports.