Support » Plugin: Japanized For WooCommerce » COD(代金引換) Plugin Support Issues

  • Resolved Cody

    (@codybaldwin)


    Thank you guys for your hard work on this plugin. We’ve been using it for our 自社サイト for about 2 years now, and it’s been pretty good. We’ve saved a lot of money vs on ec sites (like カラーミーショップ).

    Our COD(代金引換) payment method custom checkout fees are broken.

    For ヤマト運輸 there are several pricing scales for 代金引換
    [ <1万円 = ¥324(税込み), >1万円 = ¥432(税込み), >3万円 = ¥648(税込み), and >100万円 = ¥648(税込み) ]
    I think this is pretty standard practice for nearly all shipping companies in Japan (Sagawa, Yubinkyoku, etc.)
    We use a premium version of this plugin to add the custom checkout fee functionality:
    https://wordpress.org/plugins/woo-conditional-product-fees-for-checkout/
    Recently, that plugin stopped being able to recognize the 代金引換 payment method, so I tried a different plugin:
    https://wordpress.org/plugins/wc-smart-cod/
    Here I realized there are conflicting rules for additional fees at checkout between the two plugins, and they don’t play well together. It may be nice to offer native support for this plugin for the Japanese version of Woocommerce since COD is such a common method of payment in Japan, but in the meantime perhaps you could help identify why the payment method isn’t playing nicely with other plugins now.

    Again, thank you for your work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Cody

    (@codybaldwin)

    Ended up just disabling the other plugins and adding this to functions.php

    /**
     * Add a custom fee to COD based on card total
    **/
    add_action( 'woocommerce_cart_calculate_fees', 'custom_COD_fee', 10, 1 );
    function custom_COD_fee ( $cart ) {
        if ( is_admin() && ! defined( 'DOING_AJAX' ) )
            return;
    
        if ( 'cod' === WC()->session->get('chosen_payment_method') ) {
    		$cart_total = $cart->cart_contents_total;
    		$current_shipping_cost = WC()->cart->get_shipping_total();
    		$subtotal = $cart_total + $current_shipping_cost;
    		$fee = 300;
    		if ( $subtotal > 10000 ) {
    			$fee += 100;
    		}
    		if ( $subtotal > 30000 ) {
    			$fee += 200;
    		}
    		if ( $subtotal > 100000 ) {
    			$fee += 400;
    		}
    
            $cart->add_fee( '代金引換 手数料', $fee, true );
        }
    }
    • This reply was modified 1 year, 3 months ago by Cody.
    Plugin Author shohei.tanaka

    (@shoheitanaka)

    ご返答が遅くなりました。
    次のバージョンでPRO版としてこの機能を実装予定です。

    8月中にはリリースいたします。

    こちら、解決済みとさせて頂きます。

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘COD(代金引換) Plugin Support Issues’ is closed to new replies.