• Resolved dalaldhairya

    (@dalaldhairya)


    Hi,
    I love this wallet. Its truly awesome.
    I have a question. Suppose if I purchase product of Rs. 200 and I have used 10% discount coupon so I pay only Rs. 180. I have set cashback method of 1% of cart. So he gets cashback of Rs. 2. But I want to set it in a way that he gets 1% of Rs. 180 (i.e, the amount paid) which is Rs. 1.80. Is there any solution?

    Please help me out with a code!

    • This topic was modified 4 years, 6 months ago by dalaldhairya.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter dalaldhairya

    (@dalaldhairya)

    Hi again,
    Ive got the code in your PHP file:

    if (woo_wallet()->settings_api->get_option(‘min_cart_amount’, ‘_wallet_settings_credit’, 10) != 0 && WC()->cart->get_subtotal(‘edit’) >= woo_wallet()->settings_api->get_option(‘min_cart_amount’, ‘_wallet_settings_credit’, 0)) {
    if (‘percent’ === self::$global_cashbak_type) {
    $percent_cashback_amount = wc()->cart->get_subtotal(‘edit’) * ( self::$global_cashbak_amount / 100 );
    if (self::$max_cashbak_amount && $percent_cashback_amount > self::$max_cashbak_amount) {
    $cashback_amount += self::$max_cashbak_amount;
    } else {
    $cashback_amount += $percent_cashback_amount;
    }
    } else {
    $cashback_amount += self::$global_cashbak_amount;
    }
    }
    break;
    }
    return apply_filters(‘woo_wallet_form_cart_cashback_amount’, $cashback_amount);

    If I change the subtotal to total its working perfectly fine. But this will be overwridden by update. Can you suggest an alternative?

    Plugin Author Subrata Mal

    (@subratamal)

    @dalaldhairya Using filter woo_wallet_form_cart_cashback_amount you can customise cashback calculation.

    Thread Starter dalaldhairya

    (@dalaldhairya)

    Could you help me with code?

    This is my problem as well. I appreciate if anyone can help.

    There is even another related scenario.

    product price: 100$
    credit already on customer wallet: 10%
    real money paid by customer: 90%
    cashback: 15% on 90$ paid

    currently cashback is set for 100$ which is the product price not the money paid by the customer.

    Hi,

    @teacherbahrami @dalaldhairya did you guys manage to set the cashback as per the amount paid by the customer?

    Hi @roberto22
    I employed a programmer and he fixed the issue.

    @teacherbahrami

    Can you please help me with the details of the developer?

    I need to solve this. Thanks in advanced!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cash back percentage on amount paid after coupon discount’ is closed to new replies.