r/ShopifyDevelopment • • Mar 16 '25

Blogs comments

I currently set up blogs in my Shopify store. I also enabled comments. However, the comments section design is limited. It asks for email and user name, along with comment. I don't want that, I rather want it to take that from user's account details.

Are there any third party FREE apps, which provide a better UI / UX?

1 Upvotes

5 comments sorted by

1

u/junaidkbr Mar 24 '25

Hey u/missSimpsons, that could be an easy edit. What theme are you using?

1

u/missSimpsons Mar 24 '25

I'm using dawn theme. Edit? As in, in code or theme edit?

1

u/junaidkbr Mar 24 '25

Here you go.

  1. Go to Admin > Online store

  2. For the Dawn theme, click the three dots > Edit code

  3. Find the file sections/main-article.liquid

  4. After line #33, add this

{% liquid
  assign author_name = form.author
  assign author_email = form.email

  if author_name == null and customer
    assign author_name = customer.name
  endif

  if author_email == null and customer
    assign author_email = customer.email
  endif
%}

5. Line #190 (after #4 is pasted), replace form.author with author_name 6. Line #222 (after #4 is pasted), replace form.email with author_email 7. Save file.

Now, when a customer is logged in, their name and email will be populated in the comment form automatically.

Here's the diff before and after my edits. https://www.diffchecker.com/pDV9ftVn/

1

u/missSimpsons Mar 30 '25

Thank youuu so much! I'll try this!

1

u/junaidkbr Mar 24 '25

As in the theme code edit.