Skip to content

Instantly share code, notes, and snippets.

View shopifydavid's full-sized avatar

David shopifydavid

View GitHub Profile
@shopifydavid
shopifydavid / related-articles.liquid
Created January 12, 2023 21:48 — forked from atikju/related-articles.liquid
Show related articles based on article tags - Shopify
%reset-Button {
border: none;
margin: 0;
padding: 0;
width: auto;
overflow: visible;
background: transparent;
/* inherit font & color from ancestor */
<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) {