• Resolved hempion1

    (@hempion1)


    Hello,

    first of all thanks for your great plugin.

    I have an issue with the profit calculation of orders that include a gift card made with the plugin Yith Woocommerce Gift Cards.

    Orders with gift cards display a profit, even though the customers weren’t making any payment. Instead the customers used their gift card balance, similar to applying a coupon to your order.
    What I would like to see in the order is a negative profit, since I am making no money with gift cards order (they have been purchased previously in a seperate order).

    Would it be possible for you to suggest a soultion for this issue?

    Thanks in advance!

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

    (@wpcodefactory)

    Hello @hempion1 ,

    Thanks ??

    I just tested the YITH plugin here and it seems they’re setting a meta on the order. In that case, please try to use our option:
    – Orders > Extra Costs: From Meta > Meta keys

    And set its value as:
    _ywgc_applied_gift_cards_totals

    Thread Starter hempion1

    (@hempion1)

    Hi,

    thank you for your suggestion. I tried it, but it didn’t solve the problem, because like this the total cost value and the profit value are incorrect.

    I have made some screenshots explaining the whole issue again:
    Cost calculation without meta key extra costs (wrong profit)
    https://hempions.com/wp-content/uploads/Incorrect-profit-calculation-with-gift-voucher.png
    Cost calculation with meta key extra costs (wrong costs & profit)
    https://hempions.com/wp-content/uploads/Cost-calculation-using-meta-fees.png

    The meta key “_ywgc_applied_gift_cards_totals” is actually no cost, it is a voucher. So the cost value should stay the same and only the profit value should be negative, similar to an order where no revenue was made. This could be achieved by not substraction the item costs from the order subtotal before discount, but from the order total after the voucher was applied.
    Maybe this could be achived with a custom filter that is chaging the calculation mode if a gift card is applied to an order.

    Hope it helps!

    Plugin Author WPFactory

    (@wpcodefactory)

    Hi,

    Maybe I’m wrong but couldn’t the voucher be considered as a cost?
    And in that case, although the costs would be higher because of the voucher, the profit calculation would be correct, wouldn’t it?

    Can you please show me an example with numbers of what you’d like to be the final result of cost and profit?

    Thread Starter hempion1

    (@hempion1)

    Hi,

    thanks for your suggestion. Basically would work like this, but in my case both metrics have to be correct, because the cost is also an important number in my accounting and has to be perfectly correct.

    The correct number for me is actually very simple: the profit is the negative costs – similar to an order where I give away the products for free, I only have to costs that lead to a negative profit.
    In this screenshot I have set up how I would want to have it:
    https://hempions.com/wp-content/uploads/Correct-profit-calculation-with-gift-voucher.png

    Thanks!

    • This reply was modified 4 years ago by hempion1.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Issue with gift cards plugin’ is closed to new replies.