Solved

Narrative Theme - Add a "Buy" button in the Header

Bastien-AL
Tourist
8 1 1

Hello the Shopify community!

 

Hope you are all doing well 🙂

 

I'm using the Narrative Theme, and would like to add a "Buy" button directly in the top right of the Header, next to the basket icon (if possible on Mobile and Desktop), as you can see here on the Apple website :

Capture d’écran 2020-06-20 à 12.53.57.png

My content is quite long on my Homepage (I sell 1 product, so I will only use the Homepage), and it would be great if my customers could buy from everywhere on my page through the sticky Header.

 

Do you know how I could do that?

I already had a look at the other topics, but could find any solution working on this theme.

 

Many thanks for your help, and do not hesitate to get back to me if you need more information 🙂

 

Have a great day,

 

Bastien

 

Accepted Solution (1)

robin_ca
Shopify Partner
56 8 13

This is an accepted solution.

There are couple of ways with which you can achieve it. 

1. Using edit code in theme, If you are comfortable with editing your theme code then I can help you to add Buy button directly to theme 

2. Using Navigation, add last as Buy Link, Later with CSS we can add code to highlight and pop that as a button.

Added button with solution 1Added button with solution 1
Code added : 

      <a href="#" class="button btn">BUY</a>

I have added this code to header.liquid 
Line Number : 217, if you haven't edited this file then it will be there.

 

image.png

 

Let me know if you face any issue with it.

You can always play with css for button styling. 

Regards
Robin

if this solution solve your problem, you can mark it selected 😉 

If helpful then please Like & Accept Solution. | Buy me a coffee
Customizing Store or upgrading with custom functionality - Hire Me

Feel free to contact me on rrrobin@yahoo.com regarding any help regarding
Shopify Customization | Automation of Tasks | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Functions into Shopify.

View solution in original post

Replies 10 (10)

robin_ca
Shopify Partner
56 8 13

This is an accepted solution.

There are couple of ways with which you can achieve it. 

1. Using edit code in theme, If you are comfortable with editing your theme code then I can help you to add Buy button directly to theme 

2. Using Navigation, add last as Buy Link, Later with CSS we can add code to highlight and pop that as a button.

Added button with solution 1Added button with solution 1
Code added : 

      <a href="#" class="button btn">BUY</a>

I have added this code to header.liquid 
Line Number : 217, if you haven't edited this file then it will be there.

 

image.png

 

Let me know if you face any issue with it.

You can always play with css for button styling. 

Regards
Robin

if this solution solve your problem, you can mark it selected 😉 

If helpful then please Like & Accept Solution. | Buy me a coffee
Customizing Store or upgrading with custom functionality - Hire Me

Feel free to contact me on rrrobin@yahoo.com regarding any help regarding
Shopify Customization | Automation of Tasks | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Functions into Shopify.
Bastien-AL
Tourist
8 1 1

Perfect, thanks a lot Robin, it looks great !

robin_ca
Shopify Partner
56 8 13

If its good you can mark it as Solved 😉 

If helpful then please Like & Accept Solution. | Buy me a coffee
Customizing Store or upgrading with custom functionality - Hire Me

Feel free to contact me on rrrobin@yahoo.com regarding any help regarding
Shopify Customization | Automation of Tasks | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Functions into Shopify.
47985924
Tourist
10 0 6

Hi there,

What if I wanna add the buy bottom on product detail page instead of the home page? I have multiple products that I want to add to the product detail page but not home page. Could you help me on that?

Dylan13
Excursionist
16 0 4

Hey thanks for the solution it helped me too! Is there anyway I can make the button a bit smaller on mobile? I would like to edit the dimensions.

 

Thanks!!

Alia_Makarem
Shopify Partner
63 0 18

This worked great!

Just want to see if it is possible to change the sizing of the button, specially for mobile, without affecting the other buttons.

I don't know how to work with CSS.

Thank you.

unlimited1q
Visitor
1 0 0

HOW to do this on  Debutify 3.0.2

 
 
 
fangbaby123
Tourist
6 0 3

hi there, any idea how to add this button on nav only show it on desktop but not on mobile?

salim-thr
Tourist
3 0 0

Bonjour Robin,

 

Peux tu m'aider stp à ajouter un bouton dans mon header ?

 

J'aimerai offrir un guide à télécharger à mon audience pour récupérer des mails pour ma solution e-mailing.

 

Dois-je télécharger une application sur shopify qui me permet de garder les mails ?

 

je t'envoi un exemple du bouton que j'aimerai mettre en place.

 

Merci d'avance pour ton aide,

Salim

EnowA
Visitor
1 0 0

Didn’t serve