No matches in Vendor search (wp-admin)

Theme and Plugin Support

No matches in Vendor search (wp-admin) Resolved

Tagged: 

Viewing 17 reply threads
  • Author
    Posts
    • #107670
      odedtalmon
      Participant

      Hello,
      I’m trying to assign a Vendor to a Product, i’m using the search function to search for vendors, some vendors appear in the list and some don’t.
      For those that don’t I get an error in the debug.log file that says:

      [12-Oct-2020 12:08:20 UTC] PHP Notice:  Undefined property: WP_Error::$name in /home/MY_USER/public_html/MY_WEBSITE/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1401
      Copy

      I was looking at the code on woocommerce_json_search_vendors() function and something doesn’t add up, on line 1396, we have this loop:

      if (!empty($vendors) && is_array($vendors)) {
      	foreach ($vendors as $vendor) {
      			$vendor_term = get_term($vendor->term_id);
      			$found_vendors[$vendor->term_id] = $vendor_term->name;
      		}
      	}
      }
      Copy

      When I log the $vendor object, it doesn’t even have a term_id property so I really have no idea what’s going on.

      In any case, which term is it looking for and why? when i’m searching for a vendor I’m essentially searching for a user…
      What should I do?

      All plugins/themes/wordpress (5.5.1) are updated to latest version.

      Thanks

    • #107726
      abhirup
      Moderator

      Hi,
      I have checked our end after heard from you but no issue found. As this is a site specific issue and looks like some vendors terms are deleted or not created due to some reasons into the database.
      Can you please share a staging site access ftp and database access for further debugging process.
      Do not forget mark as private while sharing the details.

      Thank you,

    • #107727
      odedtalmon
      Participant

      Hello and thanks for your answer.
      Do you mind explaining why I shouldn’t mark the reply as private? I’m about to send you login details to a site with a lot of user data that I do not wish to be public at any time.

      Thanks.

    • #107791
      abhirup
      Moderator
      This reply has been marked as private.
    • #107795
      odedtalmon
      Participant

      What are you talking about!?
      I really need this fixed ASAP… I cannot work with the website like this, please try to respond as soon as you can.
      Thanks

    • #107797
      odedtalmon
      Participant
      This reply has been marked as private.
    • #107798
      Fantastic Kuhu
      Keymaster

      Hi,

      Thank you for sharing the site details, team will check this and get back to you at earliest. Just to clarify the miscommunication above- Please check- we clearly mentioned not to forget and mark the thread private while sharing info. Hope, there isn’t any doubt 🙂

    • #107856
      Fantastic Kuhu
      Keymaster

      Hi,

      We checked from our end and could see you haven’t filled the vendor details, hence the respective vendors are not getting fetched in search result. Check the screenshot as reference- https://prnt.sc/uzltds , https://prnt.sc/uzm010 , https://prnt.sc/uzm2oz

      To cross verify our statement, we created a test vendor profile, filled the required details and it’s getting displayed in search result. Because the video is related to your website- I’m sharing it in the below private thread.

      Please go through the details mentioned by us and let us know your input.

      Awaiting your response.

      Regards,

    • #107857
      Fantastic Kuhu
      Keymaster
      This reply has been marked as private.
    • #107858
      odedtalmon
      Participant

      Amazing! i’ll fix the vendor creation process so this doesn’t happen in the future.

      Thank you very much for the detailed answer.

      🙂

    • #107863
      Fantastic Kuhu
      Keymaster

      Sure, will await your final confirmation before closing the thread.

    • #107868
      odedtalmon
      Participant

      Hello again,
      Something is weird, i’ll explain:
      I’m using this line of code to get the vendor store name:

      get_user_meta( 1128, '_vendor_page_title', true );
      Copy

      And i’m getting the correct name, however, when I view the Vendor in WP admin the field looks empty…

      _vendor_page_slug
      Copy

      is set to

      roeibarakgmail-com
      Copy

      Any idea why the information is not showing?

    • #107892
      abhirup
      Moderator

      Hi,
      WCMp created term id for every vendor when they register and also save the name, slug on terms table. Looks like term id is not created while vendor registration.

      Regards,

    • #107931
      odedtalmon
      Participant

      Hello, i’m looking in the code a lot but I can’t find what you’re talking about, do you mind at least letting me know in which file this is done so I can look and learn from there?

      Thanks

    • #107936
      abhirup
      Moderator

      Hi,
      Please check two files-
      dc-woocommerce-multi-vendor/admin/class-wcmp-settings-vendors.php
      line no – 357 and 361
      update_page_title() and update_page_slug() are functions
      which are located in dc-woocommerce-multi-vendor/classes/class-wcmp-vendor-details.php
      line no – 214 and 234

      Regards,

    • #108009
      odedtalmon
      Participant

      🙂

      Attachments:
    • #108051
      abhirup
      Moderator

      Hi,
      Will you please confirm before closing the thread.

      Thank You.

    • #108052
      odedtalmon
      Participant

      Problem solved, thank you very much!
      You can close this thread.

Viewing 17 reply threads

The topic ‘No matches in Vendor search (wp-admin)’ is closed to new replies.

Wish you a Happy Durga Puja!!! Try code "HAPPYPUJA2020" to get 20% discount!! Our office will be closed from 22nd - 27th Oct!!

Buy Bundle at Slashed Price