Created
March 15, 2024 01:24
-
-
Save 404ryannotfound/a07e235dd5ff9f33f2dc74c43a2df70c to your computer and use it in GitHub Desktop.
Shopify - Display a pdf icon on the orders of the main account page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- assign show_pdf_icon = false -%} | |
{%- for line_item in order.line_items -%} | |
{%- if line_item.product.type == "Pass" or line_item.product.type == "Firewood" or line_item.product.type == "Permit" -%} | |
{%- assign show_pdf_icon = true -%} | |
{%- break -%} | |
{%- endif -%} | |
{%- endfor -%} | |
{%- if show_pdf_icon -%} | |
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"> | |
<style>svg{fill:#d14210}</style> | |
<path d="M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM80 64h64c8.8 0 16 7.2 16 16s-7.2 16-16 16H80c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64h64c8.8 0 16 7.2 16 16s-7.2 16-16 16H80c-8.8 0-16-7.2-16-16s7.2-16 16-16zm16 96H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V256c0-17.7 14.3-32 32-32zm0 32v64H288V256H96zM240 416h64c8.8 0 16 7.2 16 16s-7.2 16-16 16H240c-8.8 0-16-7.2-16-16s7.2-16 16-16z"/></svg> | |
{%- endif -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment