会員登録の必須項目
- 
		投稿者投稿
- 
		
			
				
2015年11月8日 3:39 PM #76346jasrevory 参加者——————————————- 
 WordPress のバージョン: 4.3.1
 Welcart のバージョン:1.61
 ご利用のテーマ:マテリアルバージョン: 2.7.1
 症状を確認したブラウザ:
 サーバー(会社名、サービス名):
 SSLの利用: なし
 WordPress のパーマリンク設定:なし
 ——————————————–
 こんにちは
 お世話になっております。
 会員登録の必須項目を変更したく以下を追記しましたが機能しませんアスタリスクの解除 
 テーマのfunctionに
 ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
 /***入力必須の変更****/
 add_action(‘usces_action_essential_mark’,’my_action_essential_mark’,10,2);
 function my_action_essential_mark($data,$field){
 global $usces_essentialmark;
 $essential=array(‘zipcode’,’country’,’states’,’address1′,’address2′,’address3′,’tel’,’fax’);
 if(in_array($field,$essential) ){
 $usces_essential_mark[$field]=”;
 }
 }
 ーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
 と追記しました
 usc-e-shop/function/function.phpの
 ーーーーーーーーーーーーーーーーーーー
 function usces_get_essential_mark( $fielde, $data = NULL ){
 global $usces_essential_mark;
 do_action(‘usces_action_essential_mark’, $data, $fielde);
 return $usces_essential_mark[$fielde];
 }
 ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
 は変更が必要だったりしますか必須条件の変更 
 こちらもテーマのfunctionに追記しましたが機能しません
 ーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
 /*****必須条件変更****/
 ///add_filter(‘usces_filter_customer_check’,’my_filter_customer_check’);
 function my_filter_customer_check($mes){
 $mes=”;if ( !is_email($_POST[‘customer’][‘mailaddress1’]) ||trim($_POST[‘customer’][‘mailaddress1’])==” || trim($_POST[‘customer’][‘mailaddress2’])==” || trim($_POST[‘customer’][‘mailaddress1’]) != trim($_POST[‘customer’][‘mailaddress2’]) ) 
 $mes .= __(‘e-mail address is not correct’, ‘usces’) . “<br />”;
 if (trim($_POST[“customer”][“name1″])==””)
 $mes .= __(‘Name is not correct’, ‘usces’) . “<br />”;
 // if ( trim($_POST[“customer”][“name3”]) == “” && USCES_JP )
 // $mes .= __(‘Invalid CANNAT pretend.’, ‘usces’) . “<br />”;
 // if (trim($_POST[“customer”][“zipcode”])==”” )
 // $mes .= __(‘postal code is not correct’, ‘usces’) . “<br />”;
 // if ( $_POST[“customer”][“pref”] == __(‘– Select –‘, ‘usces’) )
 // $mes .= __(‘enter the prefecture’, ‘usces’) . “<br />”;
 // if ( trim($_POST[“customer”][“address1″]) ==””)
 // $mes .= __(‘enter the city name’, ‘usces’) . “<br />”;
 // if ( trim($_POST[“customer”][“address2″])==”” )
 // $mes .= __(‘enter house numbers’, ‘usces’) . “<br />”;
 // if (trim($_POST[“customer”][“tel”])==”” )
 // $mes .= __(‘enter phone numbers’, ‘usces’) . “<br />”;
 // if(trim($_POST[‘customer’][“tel”]) && preg_match(“/[^\d-]/”, trim($_POST[“customer”][“tel”])) )
 // $mes .= __(‘Please input a phone number with a half size number.’, ‘usces’) . “<br />”;
 return $mes;
 }
 ーーーーーーーーーーーーーーーーーーーーーーー
 こちらもusc-eshop/classes/usceshop.class.phpに変更が必要だったりするのでしょうか条件変更のコードは小さなECサイトのWordpress+welcart導入・設定ガイドを参照にしましたがどちらとも機能せず会員登録の必須項目が変更できていない状況です 
 ご教授願います- 
		このトピックは nanbuが9年、 11ヶ月前に変更しました。 nanbuが9年、 11ヶ月前に変更しました。
 2015年11月11日 10:55 AM #76363 yskysmrキーマスター yskysmrキーマスターこんにちは。 まず、文字列を括るのは全てシングルクウォート '(もしくはダブルクウォート")にしてください。
 また、my_action_essential_markの中で、変数名が違っています。✕ global $usces_essentialmark; ○ global $usces_essential_mark;また、 my_filter_customer_checkでは、///add_filter('usces_filter_customer_check','my_filter_customer_check');がコメントアウトされています。
 「会員登録時の必須チェック」を変更したいのであれば、フィルターフック'usces_filter_member_check'をご利用ください。最後に、プラグイン配下のソースファイル usc-e-shop/function/function.phpusc-e-shop/classes/usceshop.class.phpは、改変しないようにしてください。2015年11月11日 11:23 AM #76368jasrevory 参加者返信有り難うございます。 
 どちらもできるようになりました。2015年11月11日 11:47 AM #76370jasrevory 参加者度々申し訳ありませんが必須項目が必要なくなったので新規入会ページの住所欄を消したいのですがどうすればよろしいでしょうか 
- 
		このトピックは
- 
		投稿者投稿
- このトピックに返信するにはログインが必要です。
 PAGE TOP
PAGE TOP