shopify-article-product-card
v0.1.0
Published
A web component for pulling product cards into shopify articles
Readme
Shopify Article Product Card

Note: this has only been tested with custom themes that mirror Dawn's architecture. You can customize the templates to work with your theme.
Installation
- Add
article-product-card.jsto yourassetstheme folder - Open
sections/main-article.liquidand add the following code at the top:
<script src="{{ 'blog-product-card.js' | asset_url }}" defer></script>- You may also need to add the following code at the top of your
main-article.liquidfile as well to include product card and price styles:
{{ 'component-card.css' | asset_url | stylesheet_tag }}
{{ 'component-price.css' | asset_url | stylesheet_tag }}Usage
- Find the product handle of the product you'd like to embed in your article (e.g.
awesome-product) - Switch the editor to HTML view
- Paste in the
article-product-cardcode:
<article-product-card handle="awesome-product"></article-product-card>- When rendered, this will be replaced with a product.
Options
You may also include show-price="true/false" and show-vendor="true/false" attributes to turn those options on/off
