All things Shopify and commerce
i want to welcome my customer to show as a "Welcome, [customer name]" how can I do this? Can anyone help me with this?
Solved! Go to the solution
This is an accepted solution.
Hello! @timoo23 Please follow these steps to add code:
1. Go to your Online Store
2. Click on "Themes"
3. Select "Edit code"
4. Open main-account.liquid file
Replace the H1 tag with the following code for customer__title.
{% if customer %}
<h1>Welcome {{ customer.first_name }}!</h1>
{% endif %}
If you need further assistance, please let me know. If you found my help useful, consider liking this message and marking it as the solution.
Best regards
K.K
This is an accepted solution.
sure @timoo23 Allow me a couple of minutes.
This is an accepted solution.
Please try this code @timoo23
document.querySelector('#my-form').addEventListener('submit', function(event) {
const email = document.querySelector('#email').value;
if (!email.includes('@')) {
event.preventDefault();
alert('Please enter a valid email address.');
}
});
Please replace the #my-form with your form id and #email with your email input id.
Best regards
K.K
This is an accepted solution.
Hello! @timoo23 Please follow these steps to add code:
1. Go to your Online Store
2. Click on "Themes"
3. Select "Edit code"
4. Open main-account.liquid file
Replace the H1 tag with the following code for customer__title.
{% if customer %}
<h1>Welcome {{ customer.first_name }}!</h1>
{% endif %}
If you need further assistance, please let me know. If you found my help useful, consider liking this message and marking it as the solution.
Best regards
K.K
Thank you @Huptech-Web working😍
i need one more thing. I need to validate the email in the account page. How can I do that? Can you please help me?
This is an accepted solution.
sure @timoo23 Allow me a couple of minutes.
This is an accepted solution.
Please try this code @timoo23
document.querySelector('#my-form').addEventListener('submit', function(event) {
const email = document.querySelector('#email').value;
if (!email.includes('@')) {
event.preventDefault();
alert('Please enter a valid email address.');
}
});
Please replace the #my-form with your form id and #email with your email input id.
Best regards
K.K
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024