How to add vendor info to sidebar on single product page

If you have a site in the marketplace model, there are multiple vendors in the system. More than one vendor may sell the same product.

When customers come to your site, they want to know which vendor belongs to that product. The product page also includes a vendor tab after product descriptions, but not every customer may open or see this tab. So you may want to add the vendor information to the sidebar.

Add Vendor Info To Sidebar On Single Product Page (WC Marketplace)

  1. Go to Appearance -> Customize
  2. Click Sidebar and Add a Widget button
  3. Select WCMp: Vendor’s Quick Info from the drop-down menu.

woocommerce wc marketplace multi vendor add vendor info to sidebar on single product page

The vendor information will now appear in the sidebar on the single product page. By default, the number of characters in this widget is 250. If you want to increase the number of characters, follow the instructions below:

  1. Go to /your-child-theme/dc-product-vendor/widget/ directory.
  2. Open vendor-info.php with n++ or different editor.
  3. Go to 18.line or find the following code:
    if (strlen($description) > 250) {
            // truncate string
            $stringCut = substr($description, 0, 250);
            // make sure it ends in a word so assassinate doesn't become ass...
            $description = substr($stringCut, 0, strrpos($stringCut, ' ')).'...';
  4. Replace 250 numbers with the number you want. (I usually use 400.)

If you have a question, please comment! I always want to help.

That’s All!

Leave a Reply

Your email address will not be published. Required fields are marked *