+
Skip to content

Enahncement - Improve Random Sorting Behavior on Store Listing Page #2935

@jamil-mahmud

Description

@jamil-mahmud

Discussed in #2934

Originally posted by sazz-pranto October 15, 2025
Summary:
When using the [dokan-stores orderby="random"] shortcode or selecting the “Random” option from the store listing filter, the randomization only occurs once. Upon page reload, the same store order persists instead of being reshuffled.

For a true random sorting experience, the store order should change dynamically on every page load or refresh.

Video Reference:
🎥 https://d.pr/v/NPnIoN

Steps to Reproduce:

  1. Go to a page using the shortcode [dokan-stores orderby="random"] or use the filter option on the store listing page to view the stores in a random order.
  2. Observe that the stores are displayed in a random order.
  3. Refresh the page — the order remains exactly the same instead of changing randomly.

Expected Behavior:

  1. Each time the store listing page is loaded or refreshed, the stores should be displayed in a different random order.
  2. The random sorting should dynamically reshuffle results on each page load to provide a varied and fair display of vendors.

Observed Behavior:
Random sorting occurs only once, and the same order persists on subsequent page reloads. The randomization is likely being cached or executed based on a single static query result, likely tied to store name or cached SQL seed.

System Status:

Dokan: v4.1.1
WooCommerce: v10.2.2
WordPress: v6.8.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载