Home Forums WC Vendors Pro Support Need to make sure that the vendors don't see ALL the fields.

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!

 

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #16762
    Nick
    Participant

    The vendors I will be signing up are not computer savvy and need just the bare minimum of fields to populate:

    Product Name
    Short Description
    Long Description
    File Upload

    I went into the product-edit.php file and commented out all the fields I did not need, and nothing came up at all. Blank screen.

    What do I need to do to make sure all my vendors see just the fields I’ve listed above (if at all possible)

    #16769
    WC Vendors Support
    Participant

    If you edited it and it turned blank, that means you edited it wrong. ๐Ÿ™‚ Just delete lines one at a time and reload them each time you change something rather than doing it all at once. Small steps, not giant leaps! ๐Ÿ™‚

    #16793
    Nick
    Participant

    OK… I deleted one set of lines and I still got a blank page.
    Removed the following out as I have WooCommerce automagically setting the SKU:

    <div class=”hide_if_grouped”>
    <?php WCVendors_Pro_Product_Form::sku( $object_id ); ?>
    </div>

    What am I doing wrong?

    #16835
    WC Vendors Support
    Participant

    Not sure without seeing it, but let’s tweak it in a different way. Instead of deleting those three lines, change them so that you are just commenting out the PHP. You comment out a line of PHP with // in front of the code. So, it would become:

    <div class=โ€hide_if_groupedโ€>
    <?php // WCVendors_Pro_Product_Form::sku( $object_id ); ?>
    </div>

    If you still get a white screen, look in your websites error_log and see what the error being presented is and we can check it out from there.

    We will be adding an admin panel to enable/disable each Product form field in a future release but for now it’s all template based.

    #16996
    Nick
    Participant

    Ok… So commenting out the fields did a lot better, but unfortunately, one of the fields I commented out

    <?php WCVendors_Pro_Product_Form::product_type( $object_id ); ?>

    busted the functionality of the page. So Plan B is to go ahead and assign the fields with a pre-filled value & lock the fields so they can’t be entered. Is Plan B Feasible? If so, (PHP is rusty and I think I know how to do it, but don’t want to break things further.) I THINK I have to pre-set the values in MySQL and have it populate from there, right?

    #16997
    WC Vendors Support
    Participant

    Yea, that’s an important one. ๐Ÿ™‚ It tells WooCommerce what type of a product it is and that’s kindof important. ๐Ÿ™‚

    Edit the /wc-vendors-pro/public/forms/class-wcvendors-pro-product-form.php file and look for “apply_filters”. Any time you see that, you can create a filter to override even more of the settings. You can find a ton of filter sample code on our KB or on gist.github.com/bentasm1/ where there are even more.

    #16999
    Nick
    Participant

    Thank you VERY much @ben! I appreciate the time you take to hale me out of my jam… ๐Ÿ˜€

    #17096
    Nick
    Participant

    Ok… got MOST of the customizing done, for the life of me, I can’t find where to put in a default for the prices.

     
    /**
    	 *  Output product price 
    	 * 
    	 * @since    1.0.0
    	 * @param 	 int 	$post_id  post_id for this meta if any 
    	 */
    	public static function price( $post_id ) {
    
    		WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_product_price', array( 
    			'post_id'		=> $post_id, 
    			'id' 			=> '_regular_price', 
    			'label' 		=> __( 'Regular Price', 'wcvendors-pro' ) . ' (' . get_woocommerce_currency_symbol() . ')', 
    			'data_type' 	=> 'price', 
    			'wrapper_start' => '<div class="wcv-cols-group wcv-horizontal-gutters"><div class="all-50 small-100">', 
    			'wrapper_end' 	=>  '</div>'
    			) )
    		);
    	} 
    
    	/**
    

    I’m thinking I need to be adding a custom_attribute but the last time I really climbed through PHP, I think it was on 3.x so a small refresher would be awesome!! Thanks again!

    #17097
    Jamie
    Keymaster

    Hi Nick,

    Do you just want to set a default or do you want a drop down of prices? We can do either, just let me know what kind you want and I’ll give you the code you need.

    cheers,

    Jamie.

    #17120
    Nick
    Participant

    A Drop down would be awesome!!! Just three prices. Lets name them $1.00, $2.00 and $3.00 for now because I know that there’s going to be price changes by the time this gets live.

    #17181
    Nick
    Participant

    @digitalchild A Drop down would be awesome!!! Just three prices. Lets name them $1.00, $2.00 and $3.00 for now because I know that thereโ€™s going to be price changes by the time this gets live.

    #17338
    Nick
    Participant

    I don’t mean to sound pushy but how are we coming along with the code for the drop down? I was kind of hoping to deliver this product next week. If we can’t do a drop down, can I at least get a code snippet for a set price? I can always have the admins change the prices if needed.

    I’m also willing to throw a couple of bucks at this if need be…

    #17479
    WC Vendors Support
    Participant

    @digitalchild is finishing up moving his home right now, heโ€™ll get back to you shortly.

    #17482
    Nick
    Participant

    I kind of thought that there was something epic going on because both you @ben and @digitalchild are WAY responsive. Thank you VERY much for the explanation on this one and Keep up the awesome work guys! Glad to be a member of this crew!

    Oh and Best of luck to you @digitalchild in your new digs!!

    #17907
    Jamie
    Keymaster

    Hello,

    Apologies for the delay, here is the code to do as requested.

    https://gist.github.com/digitalchild/b8cb082f777afa50580f

    cheers,

    Jamie.

    #17908
    Nick
    Participant

    You are AWESOME!!! Thanks and hope you’re having a great time in your new home!!!!
    Enjoy the day and thanks again!!

    #18764
    Nick
    Participant

    Ugh… I really hate to do this, but it looks like the new update broke the dropdown price list.. Everything else works awesome, it’s just this piece of code that does not work well.

    #18765
    Nick
    Participant

    Feel free to tell me how I messed things up…. ๐Ÿ˜€

    #18767
    Nick
    Participant

    For some reason, it won’t let me upload the code or the a zip file with the code… Let me know how I can get you my code on the Product-edit.php file as is so you can see how I messed up… ๐Ÿ˜€

    #18771
    Jamie
    Keymaster

    Hello,

    Can you paste your template to pastebin.com or something like that ?

    cheers,

    Jamie.

    #18772
    Nick
    Participant

    http://pastebin.com/HPfhxY3C

    I hope that’s how you do it…

    #18773
    WC Vendors Support
    Participant

    Line 84 you didn’t include the <?php opening tag. That will produce HTML, not PHP.

    #18774
    WC Vendors Support
    Participant

    And line 103 you’ll need a ?>

    #18775
    Nick
    Participant

    Crap…. Thanks!!! I’m so sorry to have bothered you..

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