How to include shipping in profit calculations?

Top WooCommerce & WordPress Plugins Forums Cost of Goods for WooCommerce How to include shipping in profit calculations?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #89340
    blankChris Fontes
    Guest

    It doesn’t appear that the profit calculation is adding what we’ve captured for shipping.

    We charge a flat $3.99 for shipping. Sometimes we make money, sometimes we lose, but the $3.99 was captured and needs to be added to total profit.

    Also, is there a way to have the Woocommerce shipping services functionality auto update the shipping cost on an order?

    #89341
    blankChristopher Fontes
    Participant

    It looks like if you add the following line to incudes/tools/class-alg-wc-cost-of-goods-core.php in between line 573 and 574 (create a new line):

    $profit += $order->get_shipping_total();

    that is all it needs. You may want to make this an option though (EG, “Add shipping total as profit” in shipping settings)

    #89342
    blankChristopher Fontes
    Participant

    sorry that file location was incorrect – it is just:

    includes/class-alg-wc-cost-of-goods-core.php after line 573

    #89343
    blankTye
    Guest

    Hi

    Was this fixed – I’m testing the plugin, and noticed that its the only thing missing as we do the same an calculate Sales revenue including the shipping price.

    #89344
    blankTom Anbinder
    Moderator
    Plugin Support

    Hi,

    Sorry for the late reply.

    Generally, shipping shouldn’t be included in profit calculations, as profit = items price – items cost, so as shipping is not included in “items cost”, it shouldn’t be included in “items price”. However, I can see that this could be a useful feature for some of our plugin users, so please give me a couple of hours to add it to the plugin. As suggested, I’m going to make it optional. Will get back to you shortly…

    #89345
    blankTom Anbinder
    Moderator
    Plugin Support

    Hi again,

    As promised, we’ve just released new plugin v2.0.0, where I’ve added new “Shipping to profit” checkbox option to “WooCommerce > Settings > Cost of Goods > Orders > General Options”. Please give it a try and let me know if there are any issues. By the way, I’ve realized that this could be done even with a previous plugin version. It’s a bit of a workaround though – you could set “Fixed cost” option(s) in “WooCommerce > Settings > Cost of Goods > Extra Costs: Shipping Methods” to a negative value, e.g. -3.99.

    Please let me know if you have any questions. And if you like the plugin, please consider leaving me a rating.

    #89346
    blankChris Fontes
    Guest

    “Generally, shipping shouldn’t be included in profit calculations, as profit”

    It definitely needs to be for a lot of use cases, but I see you are adding this in as an option, so problem solved!

    #89347
    blankChris Fontes
    Guest

    “…so as shipping is not included in “items cost”, it shouldn’t be included in “items price”.”

    We actually add the cost of shipping to our order cost via the override. Our store offers free shipping above a threshold, and dynamic shipping below, so we need to know what our total profit per order was.

    In fact, I would LOVE LOVE LOVE LOVE if you would include an option to take the shipping costs from Woocommerce Services (when you print a label with them) and auto-add it to the order shipping cost automatically.

    #89348
    blankChris Fontes
    Guest

    “… you could set “Fixed cost” option(s) in “WooCommerce > Settings > Cost of Goods > Extra Costs: Shipping Methods” to a negative value, e.g. -3.99.”

    We actually were thinking of doing just that, but what we charge is dynamic (free over a threshold), so it doesn’t apply across the board.

    And the actual cost varies as well, hence the request for Woocommerce Services shipping label cost to auto-add to the order fixed cost override meta.

    Thanks!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.