• Hi,

    Is it possible to sort the stores list on a custom field?

    In my case, after the customer enters his location/zipcode, I want the store list items to sort by the distance to the customers location.

    Thanks,

    Esat

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter esatkaraer

    (@esatkaraer)

    Also,

    I want to be able to sort it by whether the shop is open or closed?
    If this is possible, that would be even better.

    Thanks

    Plugin Author WC Lovers

    (@wclovers)

    In my case, after the customer enters his location/zipcode, I want the store list items to sort by the distance to the customers location.

    – Sorry, it’s not possible to sort by distance as it’s not a saved values. Distance always calculated dynamically based on customer’s location.

    Thread Starter esatkaraer

    (@esatkaraer)

    And how about sorting by open and closed shops.

    So open shops always on top in de listing.

    Plugin Author WC Lovers

    (@wclovers)

    It’s also dynamic condition.

    Thread Starter esatkaraer

    (@esatkaraer)

    Can you tell me the location of where the ordering is done in code, I want to add some custom code to accomplish this.

    If I succeed I will share it here as a solution.

    Thanks

    Plugin Author WC Lovers

    (@wclovers)

    It’s from here – \wp-content\plugins\wc-multivendor-marketplace\core\class-wcfmmp-vendor.php line 2858

    But it’s preferable not to edit core files. You may modify this query args parameters using this filter – wcfmmp_vendor_list_args

    Or, may manipulate result using this filter – wcfmmp_vendor_list

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Sort by nearest store’ is closed to new replies.