Home Forums WC Vendors Pro Support price markup

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 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #49804
    sanele
    Participant

    good day.

    i would like to buy wc vendors pro plugin for an online shop and will offer service to vendors like delivery management, product listing and advertisement globally but these services will be offered for free to the vendors and NO commission fee but i want to put/increase the price they put on their product automatically.

    example: vendor (1) sells a bike for $100..
    instead of product listed as $100, i want it to include a 10% markup.
    meaning the customer will see it as $110…($100 + 10%) not $100

    and i dont want the customers to know that there was a markup… i have tried other plugins but they show the pricing in parts.

    in case you wondering why i dont want to charge commission but to charge customers..the reason is that the demand for the product is higher than the supply, so im attracting the suppliers.

    #49850
    Anna
    Member

    You could possibly achieve what you wish by enabling the handling fee in the vendor shipping, perhaps. You can put a percent value, such as 10%, for the handling fee. The custom would see the handling fee, though.
    Otherwise, I suppose this would require some custom coding to increase the amount of an added product in WooCommerce by 10%.

    I’m not quite sure I understand why you would not just charge a 10% commissions and notify the vendor that you the site admin will take a 10% cut.. . but regardless I can tell that you also have a plan in mind.

    #68363
    Scott Lengacher
    Participant

    I’m working on something like this right now. And the first issue is the need to filter the output of the _regular_price that vendors see on the product-edit form. In order to do that, there needs to be a filter for $field in the class-wcvendors-pro-form-helper.php file. I added one myself at line 110:

    } else { 
     	$field = apply_filters( 'wcv_product_input_field_modifier', $field );
    
    		if ( $field['show_label'] )

    Then, in my functions file, if I want to change the price that vendors see while editing:

    function change_price_before_display ( $field ) {
    	if ( $field['id'] == '_regular_price'  ) {
    		$field['value'] -= /*My markup value*/;
    	}
    	return $field; 
    }
    add_filter( 'wcv_product_input_field_modifier', 'change_price_before_display' );

    Now, I’m moving on to other pieces of this project. But I am wondering if, @digitalchild , you could add an input field filter like mine to the next release? Thanks.

    #68372
    Jamie
    Keymaster

    Hello,

    If you want to increase the price by 10% then who gets that fee ? If you the marketplace owner is getting that fee then that is essentially a commission. Otherwise your vendors are getting that extra 10% which doesn’t really make much sense. Why wouldn’t they just make their prices higher themselves?


    @scott

    Your filter will only change the prices for the field on the form, it won’t save the price increase. If you do save the price increase then you’ll need to do a bit more calculations.

    For reference the following code will achieve what your filter does. Your filter is not needed.

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

    This explains our form helper:

    http://docs.wcvendors.com/knowledge-base/form-helper/

    cheers,

    Jamie.

    #68395
    Scott Lengacher
    Participant

    Thank you, Jamie. I’m glad there was already a filter in place. I’m sorry I failed to notice it. This works:

    add_filter( 'wcv_product_price', 'add_product_fee' );
    add_filter( 'wcv_product_sale_price', 'add_product_fee' );
    function add_product_fee( $field ){ 
    	$value = get_post_meta( $field['post_id'], $field['id'], true );
    	$field[ 'value' ] = empty( $value ) ? '' : $value - 450 ;
    	return $field; 
    }

    Of course, I am aware that I need to save the values in the db with the markup applied, and I finished that up yesterday using this:

    add_action( 'after_setup_theme', 'markup_puppy_price' );
    function markup_puppy_price( $post ) {
    	if ( isset( $_POST[ '_regular_price' ] ) ) {
    		$_POST[ '_regular_price' ] += 450;
    	}
    	if ( isset( $_POST[ '_sale_price' ] ) && $_POST[ '_sale_price' ] !== '' ) {
    		$_POST[ '_sale_price' ] += 450;
    	}
    }

    Just to explain, we want all prices to be inclusive (no additional fees or shipping, and the buyers don’t see our fee), and we will be arranging shipping, which is why the 450 is so important. So, the 450 will be coming to us, but we don’t want our sellers to be responsible for adding our fee when they’re entering their prices. This way, the seller only needs to think about their sale price and not worry about any math or remembering to to factor in our shipping markup, etc. The seller always sees “their price” and the db always has the total price.

    Again, thanks for your help.

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