API how can I search one product with a substring of its name

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Marketplace (WooCommerce Multivendor Marketplace) API how can I search one product with a substring of its name

Viewing 4 reply threads
  • Author
    Posts
    • #64255
      Jack
      Guest

      Hi, I’m working with the API of the plug in, I’m seeing that I can search a product with the id or slug but not with a substring of product name.
      Is there any option to modify the API in order to apply the search query for a specific product or a group of products that contains a substring of their name.

      Similar with the like condition on a query like ‘%partOfProductName%’

    • #65224
      WCFM Forum
      Member

      Hi,

      Are you using this API plugin ? https://wordpress.org/plugins/wcfm-marketplace-rest-api/

      Thank You

    • #65388

      Hello,
      If you want to search for a specific part of the product name ie substring of the product names with the WooCommerce Multivendor Marketplace – REST API plugin https://wordpress.org/plugins/wcfm-marketplace-rest-api/
      use search query string in the url of the API call ie /wp-json/wcfmmp/v1/products/?search=%partOfProductName%
      For example:
      In case of our demo site to list all products with Apple as substring the api call should be made in the url http://wcfmmp.wcfmdemos.com/wp-json/wcfmmp/v1/products/?search=Apple

    • #66390
      ermandhoxha1994
      Participant

      It’s possible to search products from all vendors, not only products that belong logged user.

    • #66397

      Hello,
      When you call the Api with the vendors credentials or token it will only display products of that particular vendor and also search substring of the products of that vendor.

      Thank you.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.