Hi,
I want to add a button that says Login to my header instead of the cart on the homepage
just a 1px outline black button.
my site is https://lux360.net
A user wants to replace the cart icon in their Shopify theme header with a simple “Login” button featuring a 1px black outline on the homepage.
Initial Request:
Solution Provided:
The helper suggested modifying the header.liquid file by:
<button> or <a> tag containing “Login” textborder: 1px solid black; padding: 5px 10px)Current Status:
The user shared their existing cart code snippet (containing {{ routes.cart_url }} and cart icon logic). The helper’s follow-up responses appear corrupted/reversed in the thread, making the final implementation details unclear. The discussion remains open with the user seeking specific guidance on which exact code to replace in their provided snippet.
Note: Some responses contain garbled/reversed text, suggesting potential encoding or display issues in the original thread.
Hi,
I want to add a button that says Login to my header instead of the cart on the homepage
just a 1px outline black button.
my site is https://lux360.net
To add a black, 1px outlined “Login” button in place of the cart icon on your homepage header in Shopify, follow these steps:
Login
If you have other questions, I am willing to answer them more.
Best regards,
Daisy
<a href=“{{ routes.cart_url }}”
class=“navlink navlink–cart”
data-drawer-toggle=“drawer-cart”>
{% if section.settings.use_icons %}
{{ cart_icon }}
{{ ‘layout.cart.title’ | t }}
{{ cart_status }}
{% else %}
{{ ‘layout.cart.title’ | t }}
{{ cart_status }}
{% endif %}
this is my code. Can you let me know what to replace thank you
Any colitis for this?
Based on your provided code, if you need to replace the href attribute with a specific cart URL, you can substitute {{ routes.cart_url }} with your actual cart URL. Here’s how you can do it:
<a href=“https://yourwebsite.com/cart”
class=“navlink navlink–cart”
data-drawer-toggle=“drawer-cart”>
{% if section.settings.use_icons %}
{{ cart_icon }}
{{ ‘layout.cart.title’ | t }}
{{ cart_status }}
{% else %}
{{ ‘layout.cart.title’ | t }}
{{ cart_status }}
{% endif %}
If your cart URL is https://example.com/cart, update the href like this:
<a href=“https://example.com/cart”
class=“navlink navlink–cart”
data-drawer-toggle=“drawer-cart”>
Testing: Always test the updated link to confirm it directs users to the correct cart page without issues.