• Resolved Picflick

    (@picflick)


    Good day,

    The issue we are facing is that when an order is placed, the commission is calculated on the grand total of their order (uploaded product + selected option). We only want the commission to be calculated on the ORIGINAL product’s price which was uploaded, and NOT the added prices from which the users selects on the PPOM meta category dropdowns.

    EXAMPLE: I purchase a picture for $100 and select printing of $20. We only want the commission to be calculated on the $100 (for the vendor) and not the $20

    Will your plugin be able to satisfy our requirements. If so, please advise via some instructions on how we can achieve this.

    Thank you!

    PicFlick

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Hi,

    Thanks for get in touch with us.

    This is off course possible but have to add a small code snippet in your site.

    If you want I can send you that.

    Please know me your thoughts!

    Thank You

    Thread Starter Picflick

    (@picflick)

    Good day,

    Thank you for the speedy response.

    Yes please can you send through the code and please can you tell us which PHP file to insert into and what line numbers?

    Thank you

    Plugin Author WC Lovers

    (@wclovers)

    Hi,

    Hope you have already updated WCFM Marketplace 1.0.3

    Kindly add this code in your site’s child theme functions.php –

    function wcfmmp_order_custom_item_price( $item_price, $product_id, $variation_id, $quantity, $vendor_id ) {
    	if( $variation_id ) {
    		$product    = wc_get_product( $variation_id );
    		$item_price = $product->get_price() * $quantity;
    	} elseif( $product_id ) {
    		$product    = wc_get_product( $product_id );
    		$item_price = $product->get_price() * $quantity;
    	} 
    	return $item_price;
    }
    add_filter( 'wcfmmp_order_item_price', 'wcfmmp_order_custom_item_price', 50, 5);

    No need to edit any plugin’s core files.

    Thank You

    Plugin Author WC Lovers

    (@wclovers)

    Hi,

    Is this code works for you?

    Thank You

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Vendor commission calculated only on uploaded product’ is closed to new replies.