Instantly share code, notes, and snippets.
shopifydavid
/ related-articles.liquid
Created
January 12, 2023 21:48
— forked from atikju/related-articles.liquid
Show related articles based on article tags - Shopify
This file contains hidden or 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
<div class='relatedArticles'> | |
{% for tag in article.tags %} | |
{% assign counter = 0 %} | |
{% assign skip_articles = article.handle | split: '.....' %} | |
{% for related_article in blog.articles %} | |
{% if related_article.tags contains tag and counter < 6 %} | |
{% unless skip_articles contains related_article.handle %} | |
{% assign counter = counter | plus: 1 %} | |
{% assign temp = related_article.handle | split: '.....' %} |
shopifydavid
/ reset-button.css
Created
May 27, 2023 21:31
— forked from MoOx/reset-button.css
This file contains hidden or 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
%reset-Button { | |
border: none; | |
margin: 0; | |
padding: 0; | |
width: auto; | |
overflow: visible; | |
background: transparent; | |
/* inherit font & color from ancestor */ |
shopifydavid
/ shopfiy_translate_buy_now_button.html
Created
July 23, 2025 21:20
— forked from vvkh/shopfiy_translate_buy_now_button.html
Translate "buy now" button in Shopify
This file contains hidden or 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
<script> | |
// Add this snippet to the page with the "buy now" button. | |
// If you need dynamic translation to different languages, | |
// add products.product.buy_now translation to the locales file. | |
// Otherwise replace {{'products.product.buy_now' | t }} with desired translation. | |
const intervalTime = 100; | |
function updateButton() { | |
const paymentButton = document.querySelector('[data-testid="Checkout-button"]'); | |
if (paymentButton !== null) { |