Support » Plugin: Best WooCommerce Multivendor Marketplace Solution - WC Marketplace » How is the vendor for each product stored?

  • Resolved Barn2Plugins

    (@barn2media)


    Hi, I’m trying to use the WooCommerce Product Table plugin to list the products for each vendor in a table layout. Please could you let me know how the Vendor is stored for each product so that I can do this.

    For example, is it saved as a custom field or taxonomy on the ‘Products’ post type, and if so what is the correct slug for the custom field or taxonomy? I can see the Vendor dropdown on the Edit Product page, and just need to know what this is please.

    Thank you very much

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Dualcube

    (@dualcube)

    Vendor role is a taxonomy, we use the same product-taxonomy relation to associate a vendor with a product just lie category is assigned to a product.
    Hence each vendor is taxonomy term.

    Let us know if you have any further query.

    Thanks for your reply. Please could you tell me the name/slug of the taxonomy. I have tried to call it using ‘vendor’ but that doesn’t do anything, so the slug must be something else. Thank you very much

    Plugin Author Dualcube

    (@dualcube)

    @barn2media ‘dc_vendor_shop’ is our taxonomy name like ‘product_cat’ and each vendor is a just a term like ‘hoodies’, ‘t-shirt’ etc

    Please do let us know if you need any further assistance.

    Thanks for your reply. Are you sure this is correct? I’m using our WooCommerce Product Table plugin to display the products in a table with a Vendors column. I am trying to call the vendor name using our method for displaying a custom taxonomy, and dc_vendor_shop isn’t working.

    Is the vendor taxonomy stored against the WooCommerce product or the user?

    Plugin Contributor Khokan Sardar

    (@itzmekhokan)

    @barn2media Yes, we are 100% sure of it, our vendors are being store in a product – taxonomy relationship. We dont know why your codes isn’t working in vendor column.
    To display product taxonomy for a product follows this code snippet-
    $vendors_terms = wp_get_post_terms($product_id, 'dc_vendor_shop');

    For further ref. – https://codex.wordpress.org/Function_Reference/wp_get_post_terms
    Or you can simply use our core function to get product’s vendor –
    $vendor = get_wcmp_product_vendors($product_id);

    Hi Khokan

    Thanks, you’re right and I have got it working now.

    I have just published a tutorial about how to use WC Marketplace with our WooCommerce Product Table Plugin. It would be great if you could link to this from your plugin page or website and share on social media.

    Also, would you like me to write a unique post about using the two plugins together for you to publish on your own blog? I’d be happy to do this for you if you’re interested.

    [ Signature deleted ]

    Plugin Author Dualcube

    (@dualcube)

    Hello Katie,

    Thanks for your tutorial. That would be a really helpful for the people.

    Regarding the other part, can you please get in touch with us via our contact form – https://wc-marketplace.com/contact-us/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How is the vendor for each product stored?’ is closed to new replies.