Dokan - WooCommerce Multivendor Marketplace plugin integration overview. Know more about how to display Dokan related data inside labels and how to create labels display conditions based on Dokan vendor data.
Dokan plugin is a great choice for your multi vendor marketplace. It has many great features that can help to cover almost every need.
And most exciting here is that Advanced Woo Labels (AWL) has tight integration with this plugin.
You can show various Dokan related information right inside text labels with the help of text variables. Additionally you can set labels display conditions based on Dokan vendors data.
Some examples of possible use cases:
Display Sold by
badge for all products that are sold by Dokan vendors. Such a badge includes information like vendor shop name, logo, average rating, reviews count and the link to the shop page.
To display such a badge inside a label just use the {DOKAN_SHOP_BADGE}
text variable.
Steps to display this text variable:
1. Open label edit page of a label that needs to be changed.
2. Find Label text option ( available only for Shape with text label type ) and set {DOKAN_SHOP_BADGE}
inside it. It is better not to add any other text inside this field otherwise this can break label text markup.
You can use this text variable together with display conditions like Is product sold by any vendor to make sure that the shop badge will be shown only for products that are selling by Dokan vendors.
Show label of the Dokan current product vendor. Will show the default Dokan logo if the vendor doesn't have its own. Displayed empty string if the product is not sold by any vendor.
To display such a badge inside a label just use the {DOKAN_SHOP_LOGO}
text variable.
Steps to display this text variable:
1. Open label edit page of a label that needs to be changed.
2. Find Label text option ( available only for Shape with text label type ) and set {DOKAN_SHOP_LOGO}
inside it.
Use this text variable together with display conditions like Is product sold by any vendor or Product is sold by X vendor to make sure that the label will be shown only for products that are selling by Dokan vendors.
Show Dokan store name for the current product inside AWL label. Will show an empty string if the product is not sold by any vendor.
To display such a badge inside a label just use the {DOKAN_SHOP_NAME}
text variable.
Steps to display this text variable:
1. Open label edit page of a label that needs to be changed.
2. Find Label text option ( available only for Shape with text label type ) and set {DOKAN_SHOP_NAME}
inside it.
Additionally you can add some label display conditions for this label to customize label appearance or make sure that it is displayed only for Dokan vendor products.
Show vendor shop link inside label for the current product.
To display such a badge inside a label just use the {DOKAN_SHOP_LINK}
text variable.
Steps to display this text variable:
1. Open label edit page of a label that needs to be changed.
2. Find Label text option ( available only for Shape with text label type ) and set {DOKAN_SHOP_LINK}
inside it.
Shop link as plain text is not very useful. Much better is to give users options to click on labels and navigate to the vendor shop page.
Good news is that it can be done. And currently there are two ways to do that.
1. Use html markup inside the label. We can place {DOKAN_SHOP_LINK}
text variable as a href value for an a html tag. Also lets add {DOKAN_SHOP_NAME}
text variable to display shop name.
So inside Label text it is need to add following value:
<a href="{DOKAN_SHOP_LINK}">{DOKAN_SHOP_NAME}</a>
2. Use label Link option. Just open the label edit page and find Link metabox on the right sidebar. Add inside it {DOKAN_SHOP_LINK}
value to create a label link that will lead to the vendor shop page.
Additionally for Label text option you can set the value to {DOKAN_SHOP_NAME}
to display the vendor name inside the label.
Display vendor average store rating inside the label for current WooCommerce products.
To display such a badge inside a label just use the {DOKAN_SHOP_RATING}
text variable.
Steps to display this text variable:
1. Open label edit page of a label that needs to be changed.
2. Find Label text option ( available only for Shape with text label type ) and set {DOKAN_SHOP_RATING}
inside it.
Additionally you can use label display conditions for that label. For example, use Average store rating condition to display the label with store rating only for top rated stores ( as example - to those who have an average score >= 4.5 of 5 ).
Display vendor store reviews number inside the label for current WooCommerce products.
To display such a badge inside a label just use the {DOKAN_SHOP_REVIEWS_NUM}
text variable.
Steps to display this text variable:
1. Open label edit page of a label that needs to be changed.
2. Find Label text option ( available only for Shape with text label type ) and set {DOKAN_SHOP_REVIEWS_NUM}
inside it.
Use this label together with some label display conditions. For example - with Store reviews count condition rule to display the label with reviews count only for stores with more than X reviews.
Display the number of views of each product inside the label.
To display such a badge inside a label just use the {DOKAN_PRODUCT_VIEWS_NUM}
text variable.
Steps to display this text variable:
1. Open label edit page of a label that needs to be changed.
2. Find Label text option ( available only for Shape with text label type ) and set {DOKAN_PRODUCT_VIEWS_NUM}
inside it.
Combine this text variable together with Product views number display condition to show the label only for products that have less/more than X views.
Display the label only for products that are sold by Dokan vendors. Or, in other way, show the label only for products that are NOT sold by any Dokan vendor.
Such conditions can be set via Is product sold by any vendor
label display condition.
Steps to set this label display condition:
1. Open the label edit page and find Label Conditions box.
2. Set new condition - Is product sold by any vendor. Also specify compare operator and value ( true
or false
) depending on your needs.
Show the label only for products that are sold by specific Dokan vendors. Or, in other way, show that label for all products that are sold by Dokan vendors excluding specific vendor shops.
Such conditions can be set via Product sold by
label display condition.
Steps to set this label display condition:
1. Open the label edit page and find Label Conditions box.
2. Set new condition - Product sold by. Also specify the compare operator and value ( vendor name ) depending on your needs.
Display the label only inside the Dokan vendor shop page. Or display it everywhere except this shop page.
Such conditions can be set via Is store page
label display condition.
Steps to set this label display condition:
1. Open the label edit page and find Label Conditions box.
2. Set new condition - Is store page. Also set compare operator and value ( true
or false
) depending on your needs.
Show/hide labels for products that are sold by Dokan featured stores.
Such conditions can be set via Is store featured
label display condition.
Steps to set this label display condition:
1. Open the label edit page and find Label Conditions box.
2. Set new condition - Is store featured. Also set compare operator and value ( true
or false
) depending on your needs.
Display label for current product based on average Dokan vendor store.
Such conditions can be set via Store rating
label display condition.
Steps to set this label display condition:
1. Open the label edit page and find Label Conditions box.
2. Set a new condition - Store rating. Choose the needed compare operator ( equal to
, not equal to
, greater or equal to
, less or equal to
) and value of rating to compare with.
Hide/show label based on current product vendor store reviews count.
Such conditions can be set via Store reviews count
label display condition.
Steps to set this label display condition:
1. Open the label edit page and find Label Conditions box.
2. Set a new condition - Store reviews count. Choose the needed compare operator ( equal to
, not equal to
, greater or equal to
, less or equal to
) and value of reviews count to compare with.
Hide/show label based on current product vendor store sales number.
Such conditions can be set via Store total sales count
label display condition.
Steps to set this label display condition:
1. Open the label edit page and find Label Conditions box.
2. Set new condition - Store total sales count. Choose the needed compare operator ( equal to
, not equal to
, greater or equal to
, less or equal to
) and value of sales to compare with.
Hide/show label based on current product views number.
Such conditions can be set via Product views
label display condition.
Steps to set this label display condition:
1. Open the label edit page and find Label Conditions box.
2. Set a new condition - Product view. Choose the needed compare operator ( equal to
, not equal to
, greater or equal to
, less or equal to
) and value of product views to compare with.