キャンペーン割引というタイトルの変更

フォーラム テンプレート(テーマ) キャンペーン割引というタイトルの変更

  • このトピックには3件の返信、2人の参加者があり、最後にtsegにより6年、 3ヶ月前に更新されました。
4件の投稿を表示中 - 1 - 4件目 (全4件中)
  • 投稿者
    投稿
  • #84827
    tseg
    参加者

    ——————————————-
    WordPress のバージョン:(例 WordPress 4.9.1)
    Welcart のバージョン:(例 1.9.6)
    Welcart専用の拡張プラグイン:
    ご利用のテーマ:Welcart Default Themeバージョン: 1.3
    症状を確認したブラウザ:chrome
    サーバー:ローカル
    SSLの利用:なし
    WordPress のパーマリンク設定:(例 /archives/%post_id%/)
    ——————————————–
    お世話になります。
    カスタム・メンバーフィールドの内容で割引を下記のコードで行ってみました。
    /*スクール生は5%オフ、ネットワークの人は7%オフ*/
    add_filter(‘usces_order_discount’, ‘special_member_order_discount’, 10, 2);
    function special_member_order_discount($discount, $cart){
    global $usces;
    $entry = $usces->cart->get_entry();
    $total_items_price = $usces->get_total_price();
    if( usces_is_login() ){
    $custom_arr = usces_memberinfo(‘custom_member’, ‘return’);

    if( $custom_arr[‘member’] == ‘スクール生徒’){
    $discount = ceil($total_items_price * 0.05 * -1);
    } elseif ( $custom_arr[‘member’] == ‘ネットワーク’){
    $discount = ceil($total_items_price * 0.07 * -1);
    }
    }
    return $discount;
    }
    これで内容確認画面で割引されたのですが
    ここのタイトルが「キャンペーン割引」となっているのを「会員割引」という文字に変更したいのですがどこを変更すればよろしいでしょうか。
    usc-e-shop/classes/usceshop.class.phpの「usces_order_discount」なのかと思うのですが。
    よろしくお願いいたします。

    #84828
    tseg
    参加者

    フォーラムを見ていて似たような質問があったので参考にしてfunction.phpに下記のように記述してみましたが変わりませんでした。スミマセン。よろしくお願いいたします。

    add_filter( ‘usces_filter_disnount_label’, ‘special_member_discount_label’, 10, 2 );
    function special_member_discount_label( $label, $data ) {
    global $usces;
    $custom_arr = usces_memberinfo(‘custom_member’, ‘return’);
    $status_name = $custom_arr[‘member’];
    $member_status = array( ‘スクール生徒’, ‘ネットワーク’);
    if( in_array($status_name, $member_status) ) {
    $text = “会員割引”;
    } else {
    $text = __(‘Campaign disnount’, ‘usces’);
    }
    return $text;
    }

    #84831
    yskysmr
    キーマスター

    こんにちは。

    usces_filter_disnount_label は PDF 出力時のフィルターフックです。usces_confirm_discount_label をご利用ください。

    #84835
    tseg
    参加者

    ありがとうございます!

4件の投稿を表示中 - 1 - 4件目 (全4件中)
  • このトピックに返信するにはログインが必要です。