Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I'm selling a range of items that come with lots of documentation from the manufacturer. I could just download the documentation from the manufacturer website and add it to my files section but they are updated at different times and it takes a lot of work to be up to date. So I want to create a button on the product page that when clicking will open a new tab and open the PDF from the manufacturer website. I'm pretty sure I can create the link (which thankfully does not change) as a custom meta field but how do I display it ?
Solved! Go to the solution
This is an accepted solution.
Hi, Alex!
This is May from Shopify.
Those are some great suggestions from Evan! I did some testings on my test store, and found a different way to add this button to your product page. It is by editing your product description! Check out the steps below to achieve this.
1. From your admin, go to ‘Product’ and select the product you wish to put a button on.
2. Under the ‘Description’, add a text. For example: ‘Click here for PDF Manual’.
3. Highlight the text and click on the link icon (). Then, you will see this box:
4. Insert your link under ‘Link to’. Please make sure to include ‘http://’, since you will be linking a document from the manufacturer’s website. You can put the title under ‘Link title’, however, this is optional.
5. To open the link on a new window, change the dropdown ‘a new window’.
6. Click ‘Insert link’.
7. Click ‘Save’.
You have successfully created a link that links to the manufacturer’s PDF website. Now, let’s turn this into a button!
1. On your produce page, click on , located on the top right corner of the ‘Description’.
2. Locate your link, and add ‘class=”button”’ inside your <a> tag. Your <a> tag should look like:
<a class = "button" href="http://shopify.com" target="_blank" rel="noopener noreferrer">Click here for PDF manual</a>
3. On the bottom of the description content, add the styling by copying the code below:
<style>
.button {
background-color: #3f6e7c;
color: #fff;
font-size: 16px;
padding: 10px 30px;
text-align: center;
display: inline-block;
text-decoration: none;
}
.button:hover {
background: #335c68;
color: #fff;
}
</style>
4. Click ‘Save’.
After you save this, you should see a blue button on your product page like this:
You can change your button’s color, size, font color or font size by editing the code above. For reference, I used Google’s hex color picker to choose the color of the button. If you would like dive deeper into the CSS styling, please visit W3School’s website on CSS Buttons.
If this isn't quite what you were after, or if you have any questions, let us know and we can continue with our support!
Kind Regards,
May
Shopify Support
May | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi there Alex,
My name is Evan, I’m a Guru here with Shopify.
A button to bring your customer to the proper document page is a great idea! That will make for a clear process, and it means they won't have to reach out to you whenever they want the documents.
I have two options for you here! The first one requires some coding. If that's something your comfortable with you can take a look at our blog on Call-to-Action Buttons. That will walk you through the steps of creating that functionality. You can also use the BestButtonGenerator to help you create that button.
The other options are using the ShoGun App to create a custom page, or hiring a Shopify Expert to create that button and functionality for you!
While I have you here Alex, how have you been managing your products and inventory from those manufacturers? Have you come across any issues that you need a hand with? I would be more than happy to help out with any issues that have some your way! If you have any other questions or concerns, please don't hesitate to let me know! I'll be more than happy to help!
Evan | Shopify Guru
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
Hi, Alex!
This is May from Shopify.
Those are some great suggestions from Evan! I did some testings on my test store, and found a different way to add this button to your product page. It is by editing your product description! Check out the steps below to achieve this.
1. From your admin, go to ‘Product’ and select the product you wish to put a button on.
2. Under the ‘Description’, add a text. For example: ‘Click here for PDF Manual’.
3. Highlight the text and click on the link icon (). Then, you will see this box:
4. Insert your link under ‘Link to’. Please make sure to include ‘http://’, since you will be linking a document from the manufacturer’s website. You can put the title under ‘Link title’, however, this is optional.
5. To open the link on a new window, change the dropdown ‘a new window’.
6. Click ‘Insert link’.
7. Click ‘Save’.
You have successfully created a link that links to the manufacturer’s PDF website. Now, let’s turn this into a button!
1. On your produce page, click on , located on the top right corner of the ‘Description’.
2. Locate your link, and add ‘class=”button”’ inside your <a> tag. Your <a> tag should look like:
<a class = "button" href="http://shopify.com" target="_blank" rel="noopener noreferrer">Click here for PDF manual</a>
3. On the bottom of the description content, add the styling by copying the code below:
<style>
.button {
background-color: #3f6e7c;
color: #fff;
font-size: 16px;
padding: 10px 30px;
text-align: center;
display: inline-block;
text-decoration: none;
}
.button:hover {
background: #335c68;
color: #fff;
}
</style>
4. Click ‘Save’.
After you save this, you should see a blue button on your product page like this:
You can change your button’s color, size, font color or font size by editing the code above. For reference, I used Google’s hex color picker to choose the color of the button. If you would like dive deeper into the CSS styling, please visit W3School’s website on CSS Buttons.
If this isn't quite what you were after, or if you have any questions, let us know and we can continue with our support!
Kind Regards,
May
Shopify Support
May | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi May!
I just used your suggestion and it works! It's just in my case I wanted to add a button which takes clients to my none commercial website. But actually I'm still facing a problem... So I've inserted the link and the button and it works perfectly, but when I try to apply the styling it works in the editor but not the product page. I mean I do have a button which works, but it doesn't look like the same as in the editor. It looks like my "add to cart" button that already exist on the page.Do you have any idea why this is happening?
Thank you very much!
Hey
I want to make the exact same button set (1 -pack 2 pack etc) for my store could you please explain how to as in the screenshot?
May
I just tried this and it works - thank you!
I am wondering if I can use this same method to create a button that opens a form or email window. I am trying to set up a site that sells product but also offers customization. So I need two buttons on each product- one 'add to cart' and one 'contact us for a quote on customization'.
Do you know how I could insert a link that would offer either a form that sends us an email, or opens their own email provider.
thank you!
hi could you help me find the content under the description to paste the second code copy
i am having trouble finding where to paste the code below the description
Hi,
Originally, I had that in my description after clicking the <> button:
<p>This women's backpack has a glam look, thanks to a faux-leather build with an allover fur print. The front zip pocket keeps small things within reach, while an interior divider reins in potential chaos.</p>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<p><a href="http://manuals.org/" target="_blank" title="Get PDF Manual" rel="noopener noreferrer"><span>Click here for PDF Manual</span></a></p>
Then after the copy I get that:
<p>This women's backpack has a glam look, thanks to a faux-leather build with an allover fur print. The front zip pocket keeps small things within reach, while an interior divider reins in potential chaos.</p> <style> .button { background-color: #3f6e7c; color: #fff; font-size: 16px; padding: 10px 30px; text-align: center; display: inline-block; text-decoration: none; } .button:hover { background: #335c68; color: #fff; } </style> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <p><a class="button" href="http://manuals.org/" target="_blank" title="Get PDF Manual" rel="noopener noreferrer"><span>Click here for PDF Manual</span></a></p>
Don't forget to add the class="button" attribute to your link !
does this trick apply to a single product page or ALL product pages?
Hi,
i used the code indicated and i have added successfully the button but the size of the button is too big, as the entire page. how can i make it shorter?
Hi May,
Thanks for the code. It was helpful in creating my button, however, it won't accept my css styling. More specifically, I added css to make the button yellow, and turn blue on hover to match the rest of the buttons on the store - but instead, I just have a white box with a black border that doesn't change on hover. What might be the problem?
Thanks in advance,
Rosemary
What should add to this code if you want the "Click here to PDF manual" to the center of the page?
Hello,
I know this can be done on a product page, but can it be added to a content page? I have a couple of pages of text on my site that I'd like to add a call to action button on. I can't seem to find a way to do this at all.
Many thanks,
Emma
Hi Emma I’m wondering if you got an answer to this as this is exactly what my looking to do right now and really stuck! I’ve created it no problem hut was hoping to add it to a page as not sure how I can move it out of the descriptions xxx
Hi May
I used your advice to add a linked button to one of my Pages in Shopify to great effect, except that the vertical alignment for the text in my button is off, and I can't work out how to fix it. Can anyone advise? Here what it looks like:
Here's what I used:
Many thanks
This was super helpful thank you! We wanted to add a feature to direct people to different external windows for different wholesale platforms we're a part of. And this added the aesthetic we needed instead of just doing a hyperlink.
Hi May,
This was really helpful thank you! I have followed your instructions and was able to add buttons to my listing description. I added 3 buttons but I was hoping to have different colours for each button. What change to the html would be needed so that I can specify different colours for each button?
Thanks, Renee
Hi May, I would like to implement your solution. However, the directions on where to paste the text are not clear. I've tried it in 6 different places. None work. Can you provide a more comprehensive look at the code in it's entirety when the pasting is complete?
Thanks will have a look.
May, This is even better! Thank you so much 🙂 I think I will even integrate the links with the bit.ly link management dashboard to easily update whenever manufacturers update their manuals/product specs!
Hi again, Alex!
Thank you for keeping us in the loop. It's my pleasure! That is so awesome to hear! I'm happy to know that you can even integrate this with Bitly for easier updates of the PDF manual.
Let me know if you have any other questions. Feel free to reply back to this thread or contact our 24/7 support, and we’ll happily help.
Cheers,
May
May | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi @AlexOnShopify,
I've got a great suggestion for you to make managing your documentation files on your product pages a whole lot easier. Instead of just adding a text or button link to your product description, why not try using the Free Ease Product Attachments app?
This app is perfect for uploading, managing, and updating all kinds of files, and it's super easy to use. You can upload unlimited files in different formats and assign them to specific products, product groups, or even all products. And if you ever need to update a file, just edit the attachment - it's as simple as that!
On the frontend, your files will be displayed in a separate section that's separate from the product description, so your customers won't miss it. And when they click on a file, they can easily preview and download it in a new tab.
Best of all, the app is totally free and doesn't require any coding knowledge to use. I really think it could be a game-changer for your business, so give it a try and see how it works for you!
Thank you I used this code it worked great! Plus I was able to customize my button to match my existing buttons. Thank you soo much