How to add account login to a button

How to add account login to a button

Arielle
New Member
11 0 0

This is a rich text and i would like to have customers be redirected to the account login if they click on this button. Is there any way to make that happen? 

 

 

login.JPG

Replies 4 (4)

Huptech-Web
Shopify Partner
1169 234 264

Hello! @Arielle  ,Please follow these steps to add this CSS code:

 

  1. Go to your Online Store and click Themes.
  2. Select Edit code.
  3. Find the section with your old code.
  4. Replace it with the updated code using richtext and add the section schema.
  5. After saving, go to your Theme Editor.
  6. Find the section you just edited, and you’ll see an option to add a link to the label URL. Use that to add your desired link.

    Here is the code and also there is a screenshot for your reference.

    <a href="{{ section.settings.url }}" role="link" aria-disabled="true" class="button button--primary">
    {{- section.settings.description -}}
    </a>

    {% schema %}
    {
    "name": "Business Account Link",
    "settings": [
    {
    "type": "url",
    "id": "url",
    "label": "URL",
    },
    {
    "type": "text",
    "id": "description",
    "label": "Button Text",
    "default": "Lag en bedriftskonto her"
    }
    ]
    }
    {% endschema %}

    button-link.png

    If you found this response helpful, please do like and accept the solution, and also if you have any questions please don't hesitate to ask.
    (S.P)

         

 

 




 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Arielle
New Member
11 0 0

Which section of code do I put this in? I'm using the dawn theme

Huptech-Web
Shopify Partner
1169 234 264

Hey, @Arielle , go to your Theme Editor, find the Richtext section, and then follow the steps I’ve sent you in the screenshots.

Screenshot_2.pngScreenshot_3.png

If you found this response helpful, please do like and accept the solution, and also if you have any questions please don't hesitate to ask.
(S.P)

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Arielle
New Member
11 0 0

it does not work, page doesn't save