Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

I want to filter vendor list with user location

Theme and Plugin Support

Tagged: 

Resolved
Viewing 13 reply threads
  • Author
    Posts
    • #136870
      karansethi1595
      Participant

      I saw the shortcode [wcmp_vendorslist] but i want it to take user location by default and have the default value as a 5km radius (this should not be visible)
      Only a locate button before the search should be visible and only address field should be visible. NO selection of within/ km /miles should be visible.
      How to achieve that?

    • #136906

      Hi @karansethi1595, thanks for getting in touch with us.

      The modification you are looking for requires a good amount of custom code.
      Do you have any developers so we can assist you with the coding flow you need to follow for this customization.

      • #136956
        karansethi1595
        Participant

        Can you send me the coding flow to follow for this customization
        Let me see what I could do to achieve it

    • #136909
      karansethi1595
      Participant

      Can you provide something that I can copy and paste
      I can follow your instructions exactly as you specify

    • #136921

      @karansethi1595, I am afraid we don’t have any readymade code for this as this is a custom requirement.
      So you have to develop this from your end.

    • #136939
      karansethi1595
      Participant

      I have seen that the same question has been asked a lot by many people but all the questions don’t have a direct answer and a simplified solution can help a lot of people like me since it’s like an issue for almost every user of the plugin for years.

    • #136961

      @karansethi1595, we provide a general flow that all the sites can use. Now we do understand that each site needs its own flow. That is why we do provide filters and hooks, so our users can tweak the flow as per their needs.

    • #137008
      karansethi1595
      Participant

      How about just a current location icon that feeds as location and has the default value as a 5km radius, can you share how to achieve it?

    • #137043

      HI,
      To remove radius use below filter

      apply_filters('wcmp_vendor_list_filter_radius_data', array(5,10,20,30,50));
      Copy

      and for distance

      override dc-woocommerce-multi-vendor/templates/shortcode/vendor-list/map-filters.php by copying it to yourtheme/dc-product-vendor/shortcode/vendor-list/map-filters.php

      then remove as per your requirement.

      If you want to do this by default then you have to add good amount of custom code using below filter

      wcmp_vendor_list_data
      Copy

      Regards,

    • #137055
      karansethi1595
      Participant

      I want a button to take curent location as input I did what this guy did in vendor list .js in frontend but it’s still not showing up
      https://multivendorx.com/support-forum/topic/get-current-location/

      Wcfm has this by default

      I have achieved it and it was way too simple why make it complicated for everyone

      Just in this file – dc-woocommerce-multi-vendor/templates/shortcode/vendor_lists.php

      have to add k and 5 in these line as –

      Inthis line add K-
      <?php $selected_distance = isset($request[‘distanceSelect’]) ? $request[‘distanceSelect’] : “K”; ?>

      And in this line add 5
      $selected_radius = isset($request[‘radiusSelect’]) ? $request[‘radiusSelect’] : ‘5’;

      And remove it with CSS from customizer -> additional css
      div.wcmp-inp-wrap:nth-child(3) {
      display: none;
      }

      div.wcmp-inp-wrap:nth-child(2) {
      display: none;
      }

      Simple! why is the support like you need a good amount of custom code where it only required a few letters? and it wasn’t even complex at all!
      Now please tell me how to add the current location stuff
      like this – https://joao-diroots.tinytake.com/media/a02079?filename=1556718554245_01-05-2019-02-49-11.png&sub_type=thumbnail_preview&type=attachment&width=699&height=176

      it wont cost you any thing and would actually help your future users as my answer would be prompt to them

    • #137056
      karansethi1595
      Participant

      I want a button to take curent location as input I did what this guy did in vendor list .js in frontend but it’s still not showing up
      https://multivendorx.com/support-forum/topic/get-current-location/

      Wcfm has this by default

      like this – https://joao-diroots.tinytake.com/media/a02079?filename=1556718554245_01-05-2019-02-49-11.png&sub_type=thumbnail_preview&type=attachment&width=699&height=176

    • #137088

      @karansethi1595, we don’t have this support yet.

      However, we do have a plan to add this in our future updates.

      For now you can you can track the progress of this issue from here https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/issues/1080

    • #137134
      karansethi1595
      Participant

      https://multivendorx.com/support-forum/topic/get-current-location/

      this is the source you need for that purpose

    • #137136

      Thank you for sharing.

    • #140879

      Hi, we have added this in our update i.e. 3.8.11.7

Viewing 13 reply threads

The topic ‘I want to filter vendor list with user location’ is closed to new replies.