Home Forums WC Vendors Pro Support Force Attribute Selection

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

  • This topic has 7 replies, 2 voices, and was last updated 7 years ago by Anna.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #61255
    Joshua Grady
    Participant

    Hi folks –

    Not sure if this has ever been answered – did a search and didnt find anything really.

    Question is:

    Is there a way to force a vendor to pick an attribute, or atleast make it so the Attribute Tab and Attributes are very apparent for them to have to choose.

    I am setting up a site with only two attributes available, Size and Carrier (phone). I want the vendors to see while adding a product that they must also choose and add those two attributes.

    Thanks in advance!

    #61301
    Anna
    Member

    @jjgrady12
    This will require a few modifications.. but here is how it can be done.
    1. Put this in your theme/child theme functions.php file:
    https://gist.github.com/fervous/db7322a7c9d04db2cca243a996402c5c

    2. Read this article on modifying templates, if you have not already modified any templates: https://www.wcvendors.com/kb/changing-vendor-templates/ (there is info there for the BuddyBoss theme also if you are using that theme..)

    Go to line 199 (approx) in your WC Vendors Pro template file product-edit.php : wp-content/plugins/wcvendors-pro/templates/dashboard/product-edit.php (or if you are using buddyboss onesocial, it’ll be in the buddyboss-marketplace folders…)

    You’ll see this line:
    <?php WCVendors_Pro_Product_Form::product_attributes( $object_id ); ?>

    Copy that line.
    Now paste it just below the price.. at approx line 96.. so it will look like this here:

    <?php WCVendors_Pro_Product_Form::prices( $object_id ); ?>
    <?php WCVendors_Pro_Product_Form::product_attributes( $object_id ); ?>
    

    Now it will show below the price under the GENERAL tab.

    Bear in mind that when you update to Pro v1.4.0 and/or you use a theme that modified our templates, you will have to re-do this modification to the product-edit.php template if it is updated.

    #61303
    Joshua Grady
    Participant

    Thanks so much! Ill give this a shot tomorrow!

    I was reading the Template Mod link, Can I assume I should be copying the buddyboss marketplace templates seeing I am using WCV PRo and One Social Marketplace?

    Thanks!

    #61310
    Anna
    Member

    @jjgrady12
    Yes- the BuddyBoss overridden templates.
    So you would copy /wp-content/plugins/buddyboss-marketplace/templates/wc-vendors/dashboard/product-edit.php

    To your child theme:
    /wp-content/themes/onesocial-child/bb-marketplace/wc-vendors/dashboard/product-edit.php

    #61312
    Joshua Grady
    Participant

    Great – Also, would the directory be /wc-vendors/ OR /wc-vendors-pro/ because I am using pro?

    Thanks!!

    #61314
    Anna
    Member

    @jjgrady12
    Nope- just bb-marketplace/wc-vendors/dashboard/product-edit.php no pro in the path. 🙂

    #61381
    Joshua Grady
    Participant

    Just an update – Works perfectly! Thank you so much!

    #61423
    Anna
    Member

    @jjgrady12
    Great! Good to know it is working for you. 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.