# フロントにて顧客情報を変更できるようにカスタマイズしたい。

**URL:** <https://community.shopify.com/t/topic/11605>\
**Category:** 技術的なQ＆A\
**Created:** [April 23, 2020, 6:26am UTC](https://community.shopify.com/t/topic/11605 "2020-04-23T06:26:06Z")\
**Posts on this page:** 3\
**Page:** 1

## AI-generated summary

フロントのマイアカウント画面で、顧客自身が氏名・メールアドレス・パスワードを編集できるようにしたいが、更新ボタンを押しても情報が保存されないという相談。reCAPTCHA（ロボットではない確認）後にアカウント画面へ戻るものの、氏名は変更されず、エラー表示も出ていない。画像は画面構成とLiquidコードの確認に使われている。

実装内容としては、`page.edit_name.liquid` を作成し、`{% form 'customer' %}` と `name="customer[first_name]"` などを指定。`template/register.liquid` を参考にしたが、登録用フォームの流用では更新処理になっていない可能性が示唆されている。

回答では、同様機能を持つShopifyアプリの利用提案があり、ブラウザでその編集フォームの実装を確認すると手がかりになるとの助言があった。特に、フォームは `/account` へPOSTしているようだという指摘がある。

結論は未解決で、次の調査対象は「アカウント更新用フォームの正しいPOST先と実装方法」の確認。

<div class="post-metadata">

**Author:** ![momoko](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@momoko](https://community.shopify.com/u/momoko)\
**Post date:** [April 23, 2020, 6:26am UTC](https://community.shopify.com/t/topic/11605/1 "2020-04-23T06:26:06Z")

</div>

ユーザー自身が氏名、メールアドレス、パスワードを変更できるようにフロントを変更したいのですが、  
うまくデータが変更されません。

 ![キャプチャ_アカウント.JPG](https://canada1.discourse-cdn.com/shopifyforum/original/3X/f/2/f2042a95333fb7fea043a5ef365e10430ac71f84.jpeg)

マイアカウントページのアカウントの詳細に氏名、メールアドレス、パスワードを設置し、編集ボタンで更新画面に遷移はできました。

 ![キャプチャ_氏名変更.JPG](https://canada1.discourse-cdn.com/shopifyforum/original/4X/4/4/7/44703da673856bdd2aef2de0396287e6832affad.jpeg)

このページで変更するボタンを押しても顧客情報がへんこうできません。

ロボットではないチェック画面にはいくのですが、その後アカウント画面に遷移し、氏名が変わっていません。

エラーも発生していません。

 ![キャプチャ_ソース.JPG](https://canada1.discourse-cdn.com/shopifyforum/original/3X/7/2/728384889abe81b57bcc9dcc2522172a8e9ced22.jpeg)

liquidソースでは、page.edit\_name.liquidを作成し、  
{% form ‘customer’, id: formId, novalidate: ‘novalidate’ %}  
formにcustomerを指定しています。

name=“customer[first\_name]”  
value=“{{ form.first\_name }}”  
で変更できると考えたのですが、できませんでした。

このソースはtemplate/register.liquidを参考に作成しました。

どのあたりを変えたら顧客情報を変更できるか教えていただけると幸いです。

宜しくお願い致します。

---

<div class="post-metadata">

**Author:** ![junichiokamura](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/junichiokamura/32/299737_2.png) [@junichiokamura](https://community.shopify.com/u/junichiokamura)\
**Post date:** [April 27, 2020, 7:50am UTC](https://community.shopify.com/t/topic/11605/2 "2020-04-27T07:50:34Z")

</div>

こちらのアプリを使えば同様のことが可能です。

[https://apps.shopify.com/customr?locale=ja&surface\_detail=custom%20fileds&surface\_inter\_position=1&surface\_intra\_position=9&surface\_type=search](https://apps.shopify.com/customr?locale=ja&surface_detail=custom%20fileds&surface_inter_position=1&surface_intra_position=9&surface_type=search)

このアプリが追加している編集部分のソースをブラウザでみると検討がつくと思います。  
見たところ、お考えのように、form action = /account に同様にPOSTしているようです。

 ![Screen Shot 2020-04-27 at 4.47.14 PM.png](https://canada1.discourse-cdn.com/shopifyforum/original/4X/0/7/5/07578050f91f7c108adf70b44385c85800df3332.png)

---

<div class="post-metadata">

**Author:** ![momoko](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@momoko](https://community.shopify.com/u/momoko)\
**Post date:** [April 27, 2020, 9:27am UTC](https://community.shopify.com/t/topic/11605/3 "2020-04-27T09:27:53Z")

</div>

junichiokamura様

ありがとうございます。

確認してみます。
