diff --git a/locales/en.default.schema.json b/locales/en.default.schema.json index b30aeb86f2d..7fa7d7ce3da 100644 --- a/locales/en.default.schema.json +++ b/locales/en.default.schema.json @@ -1172,6 +1172,14 @@ "options__2": { "label": "Left" } + }, + "header__7": { + "content": "Customer accounts log in", + "info": "To manage customer accounts, go to your [customer accounts settings](/admin/settings/customer_accounts)." + }, + "enable_customer_avatar": { + "label": "Show avatar", + "info": "Customers will only see their avatar when they're signed in with Shop" } } }, diff --git a/sections/footer.liquid b/sections/footer.liquid index 171a3017874..066f1322312 100644 --- a/sections/footer.liquid +++ b/sections/footer.liquid @@ -232,10 +232,7 @@ {%- if shop.features.follow_on_shop? and section.settings.enable_follow_on_shop -%} {%- endif -%} diff --git a/sections/header.liquid b/sections/header.liquid index dbbf0fb269a..6e0bbd7292f 100644 --- a/sections/header.liquid +++ b/sections/header.liquid @@ -256,13 +256,17 @@ {%- if shop.customer_accounts_enabled -%} - - {%- if customer and customer.has_avatar? -%} - {{ customer | avatar }} - {%- else -%} - {% render 'icon-account' %} - {%- endif -%} - + {%- if section.settings.enable_customer_avatar -%} + + {%- if customer and customer.has_avatar? -%} + {{ customer | avatar }} + {%- else -%} + {% render 'icon-account' %} + {%- endif -%} + + {%- else -%} + {% render 'icon-account' %} + {%- endif -%} {%- liquid if customer @@ -586,6 +590,18 @@ "default": true, "label": "t:sections.header.settings.enable_language_selector.label" }, + { + "type": "header", + "content": "t:sections.header.settings.header__7.content", + "info": "t:sections.header.settings.header__7.info" + }, + { + "type": "checkbox", + "id": "enable_customer_avatar", + "default": true, + "label": "t:sections.header.settings.enable_customer_avatar.label", + "info": "t:sections.header.settings.enable_customer_avatar.info" + }, { "type": "header", "content": "t:sections.header.settings.mobile_layout.content" diff --git a/snippets/header-drawer.liquid b/snippets/header-drawer.liquid index 314962b2266..ddc1ea6b529 100644 --- a/snippets/header-drawer.liquid +++ b/snippets/header-drawer.liquid @@ -129,13 +129,17 @@ href="{%- if customer -%}{{ routes.account_url }}{%- else -%}{{ routes.account_login_url }}{%- endif -%}" class="menu-drawer__account link focus-inset h5 medium-hide large-up-hide" > - - {%- if customer and customer.has_avatar? -%} - {{ customer | avatar }} - {%- else -%} - {% render 'icon-account' %} - {%- endif -%} - + {%- if section.settings.enable_customer_avatar -%} + + {%- if customer and customer.has_avatar? -%} + {{ customer | avatar }} + {%- else -%} + {% render 'icon-account' %} + {%- endif -%} + + {%- else -%} + {% render 'icon-account' %} + {%- endif -%} {%- liquid if customer echo 'customer.account_fallback' | t