Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sections to customer pages #543

Closed
tyleralsbury opened this issue Sep 1, 2021 · 7 comments · Fixed by #1640
Closed

Add sections to customer pages #543

tyleralsbury opened this issue Sep 1, 2021 · 7 comments · Fixed by #1640
Assignees
Labels
Category: Enhancement New feature or request Effort: Low Severity: 2 High Severity
Milestone

Comments

@tyleralsbury
Copy link
Contributor

tyleralsbury commented Sep 1, 2021

Describe the enhancement you'd like

Allow the customer templates to have sections added to them. The following templates would be affected:

  • account.liquid
  • addresses.liquid
  • order.liquid
  • login.liquid
  • register.liquid

Along with the general benefits of having sections in more places, this would also allow merchants to add a custom Liquid section onto the page, which would allow for apps to be integrated onto those pages without the need for code edits. Some potential types of apps that would benefit from this include subscriptions as well as loyalty program apps.

Describe alternatives you've considered

The following templates could also be converted, but the value of having sections on them is much lower since they are much more action focused templates:

  • activate_account.liquid
  • reset_password.liquid
@tyleralsbury tyleralsbury added this to To be triage in Dawn: Iterations Roadmap Sep 1, 2021
@tyleralsbury tyleralsbury added the Severity: 2 High Severity label Sep 13, 2021
@camelmasa
Copy link

camelmasa commented Oct 1, 2021

HI @tyleralsbury,

We are providing a Subscription App on Shopify App Store. I think this feature sounds good! UX is better for customers.

For now, We need to avoid showing a customer portal on the account page.

On developer docs,

Rendering sensitive information or exposing controls using Liquid isn't safe because untrusted JavaScript can read the information on the page or act on behalf of the customer. Liquid forms are also vulnerable to attacks such as CSRF.

Ref: https://shopify.dev/apps/subscriptions/customer-portal#liquid-code-in-the-shop-s-theme

Also,

You should not render the login link on the shop's storefront because untrusted JavaScript in themes and apps can read and steal information.

Ref: https://shopify.dev/apps/subscriptions/customer-portal#1-expose-an-action-to-send-an-email

If we can use the feature secure, We'd like to create a theme extension for the customer portal!

@tyleralsbury tyleralsbury changed the title Add sections to customer portal Add sections to customer pages Oct 1, 2021
@tyleralsbury
Copy link
Contributor Author

If we can use the feature secure, We'd like to create a theme extension for the customer portal!

Thanks for the comment, @camelmasa .

This proposal isn't really going to address those security concerns, unfortunately. It's simply to allow the option for app developers to use those sections to provide Liquid installation instructions without the need to edit theme files. Given the risks associated with doing this, we are still not recommending it until those can be addressed.

@gregjotau
Copy link

#654 duplicates this.

With regards to the login we need it to display extra information. Many customers do NOT understand they need to create an account.

So we added an ugly warning: https://fammesportswear.com/account/login

Which could more easily be made nicer with sections @tyleralsbury

@tyleralsbury
Copy link
Contributor Author

#654 duplicates this.

With regards to the login we need it to display extra information. Many customers do NOT understand they need to create an account.

So we added an ugly warning: https://fammesportswear.com/account/login

Which could more easily be made nicer with sections @tyleralsbury

I've updated the issue to include login and register - that's a very good point. Thanks @gregjotau

@nicklepine nicklepine moved this from To be triage to In review in Dawn: Iterations Roadmap Jan 11, 2022
@nicklepine nicklepine moved this from In review to Severity: 1 Bugs 🐜 (Pick Here) in Dawn: Iterations Roadmap Jan 11, 2022
@nicklepine nicklepine moved this from Severity: 1 Bugs 🐜 (Pick Here) to New features 🆕 in Dawn: Iterations Roadmap Jan 11, 2022
@PaulvdDool
Copy link

I'd love to see this happen. I'm currently trying to convert the customer/account page myself but I'm not good at it and running into issues 😇
If my comment helps push the task up, great. If not, at least I'm subscribed on the issue.
👋

@PaulvdDool
Copy link

I've tried two other 2.0 themes that allow you to add app blocks to account pages but they have the same behaviour that I see when converting the customer/account page myself.
It renders default blocks just fine, but as soon as a custom block is added it won't render and all other added blocks disappear.
The custom app block renders just fine on other pages.
I'm starting to wonder if it's not a problem with the custom app block or how I converted the customer/account page but more a deeper problem.

Custom theme app extension
Dawn theme with customized account page

@nicklepine nicklepine moved this from New features 🆕 to Enhancements ✨ in Dawn: Iterations Roadmap Feb 22, 2022
@nicklepine nicklepine added this to the Q1-C2-2022 milestone Feb 22, 2022
@nicklepine nicklepine moved this from Pebbles (Enhancements) ✨ to Q1-C2-2022 in Dawn: Iterations Roadmap Feb 22, 2022
@nicklepine nicklepine added the Category: Enhancement New feature or request label Mar 31, 2022
@nicklepine nicklepine moved this from 🚀 Q1-C2-2022 [Pick here] to In progress in Dawn: Iterations Roadmap May 12, 2022
@PaulvdDool
Copy link

I've tried two other 2.0 themes that allow you to add app blocks to account pages but they have the same behaviour that I see when converting the customer/account page myself. It renders default blocks just fine, but as soon as a custom block is added it won't render and all other added blocks disappear. The custom app block renders just fine on other pages. I'm starting to wonder if it's not a problem with the custom app block or how I converted the customer/account page but more a deeper problem.

Custom theme app extension Dawn theme with customized account page

This was due to an issue in the Theme Editor and is since resolved.

Additionally, I've noticed that as of recently you get an issue in the code editor inside the Shopify Admin when you try to create an account template with JSON.
This makes me think Shopify might put restrictions on making account templates support sections and app extensions.

Screenshot 2022-07-06 at 22 06 22

Dawn: Iterations Roadmap automation moved this from In progress to Done Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Enhancement New feature or request Effort: Low Severity: 2 High Severity
Development

Successfully merging a pull request may close this issue.

5 participants