• Resolved beauchicmy

    (@beauchicmy)


    Hi,
    checked out the plugin and is great, but i have a question below:
    can the admin set by default allowed only 30% payment using e-wallet from customer?
    example:
    customer bought a services item for RM100 and paid to us, then system auto add RM100 into their wallet. (this is what they earned from purchasing).
    Then next time when customer purchase other item is RM100, they can use wallet 30% (RM30) from wallet as payment, the balance RM70 will be pay by other method.

    can this plugin be set like this?
    please advise with thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    @beauchicmy Please use the attached code in the theme function.php file.

    add_filter('is_enable_wallet_partial_payment', '__return_true');
    add_filter('is_valid_payment_through_wallet', '__return_false');
    add_filter('woo_wallet_partial_payment_amount', 'woo_wallet_partial_payment_amount_callback', 10);
    
    function woo_wallet_partial_payment_amount_callback($amount) {
        if (sizeof(wc()->cart->get_cart()) > 0) {
            $cart_total = get_woowallet_cart_total();
            $partial_payment_amount = ($cart_total * 30) / 100;
            if ($amount >= $partial_payment_amount) {
                $amount = $partial_payment_amount;
            }
        }
        return $amount;
    }

    file location?

    Hi,
    checked out the plugin and is great, but i have a question below:
    can the admin set by default allowed only 30% payment using e-wallet from customer?
    example:
    customer bought a services item for RM100 and paid to us, then system auto add RM100 into their wallet. (this is what they earned from purchasing).
    Then next time when customer purchase other item is RM100, they can use wallet 30% (RM30) from wallet as payment, the balance RM70 will be pay by other method.

    can this plugin be set like this?
    if yes please tell me file location and what to edit

    please advise with thanks.

    Hi,
    checked out the plugin and is great, but i have a question below:
    can the admin set by default allowed only 30% payment using e-wallet from customer?
    example:
    customer bought a services item for RM100 and paid to us, then system auto add RM100 into their wallet. (this is what they earned from purchasing).
    Then next time when customer purchase other item is RM100, they can use wallet 30% (RM30) from wallet as payment, the balance RM70 will be pay by other method.

    can this plugin be set like this?

    tell me file location
    please advise with thanks.

    Thread Starter beauchicmy

    (@beauchicmy)

    Hi @subratamal

    Thank you for the code, i have followed your instruction, but seems like the cashback value calculation is incorrect. As mentioned below example:
    example:
    customer bought a services item for RM100 and paid to us, then system auto add RM100 into their wallet. (this is what they earned from purchasing).
    Then next time when customer purchase other item is RM100, they can use wallet 30% (RM30) from wallet as payment, the balance RM70 will be pay by other method.

    The code you provided it works for the auto deduction of 30% in cart from their ewallet.
    But the cashback value calculation is incorrect.
    If:
    customer purchased RM100 – RM30(30%) = RM70 (this is the balance amount to be pay, the cashback value should be based on the RM70. But right now is calculate based on the RM100.

    please advise with thanks.

    Plugin Author Subrata Mal

    (@subratamal)

    @beauchicmy The cashback calculation is calculated upon cart total not on what paid via wallet.

    Thread Starter beauchicmy

    (@beauchicmy)

    Hi @subratamal ,
    ok, understand, in this case, is there a way to change to calculate based on amount paid?

    thank you

    Thread Starter beauchicmy

    (@beauchicmy)

    Hi @subratamal

    please advise from my previous question would be appreciated.
    “in this case, is there a way to change to calculate based on amount paid?”

    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Set 30% of partial payment allow for Customer’ is closed to new replies.