Skip to content

Instantly share code, notes, and snippets.

@odessy
odessy / gist:86de239e881e3499a50f8ecedfaab040
Created September 18, 2025 15:17
Cart taxes included
{%- if cart.taxes_included -%}
<p class="taxes-included-message" style="padding-bottom: 10px;">
{{ 'cart.general.shipping_at_checkout' | t }}
</p>
{%- endif -%}
@odessy
odessy / gist:a44b9b9de4984c61f2b3cec9a94eed9a
Last active September 11, 2025 15:39
Shopify metaobject swatches on product page
<fieldset class="radio__fieldset" style="margin-bottom: 12px;">
<legend class="radio__legend" aria-label="{{ 'home_page.onboarding.color' | t }}">
<span class="radio__legend__label">{{ 'home_page.onboarding.color' | t }}</span>
</legend>
{% for color_item in product.metafields.shopify.color-pattern.value %}
{% if color_item %}
<radio-swatch class="swatch__button{% if settings.swatches_squares %} swatch__button--square{% endif %}">
<label {% if color_item.color != null %} data-swatch style="--swatch: {{ color_item.color }}"{% endif %}>
{% if color_item.image %}
{% render 'image', img_object: color_item.image.value, width: 34, wh_ratio: 1 %}
@odessy
odessy / gitbook_csv_export.py
Created August 8, 2025 18:23
Export document from gitbook web pages
import requests
from bs4 import BeautifulSoup, Tag
import csv
import re
from urllib.parse import urljoin
from typing import List, Dict, Optional
# Configuration
BASE_URL = "https://pipeline.groupthought.com/"
HEADERS = {
/* CSS - change Add to Cart button color */
.product__form--buybutton .product__submit__add {
background-color: var(--primary);
border: 1px solid var(--primary);
color: var(--primary-opposite);
}
.product__form--buybutton .product__submit__add:hover,
.product__form--buybutton .product__submit__add:focus {
background-color: var(--primary-hover);
border: 1px solid var(--primary-hover);
@odessy
odessy / gist:1478dd7bc95532d2ec5072dc44214d1e
Created July 22, 2025 16:58
Hide section if image settings is blank
data-section-id="{{ section.id }}"
@odessy
odessy / gist:c2ad3d0069a2bccfed048869f43f9eb4
Last active July 15, 2025 16:01
Product siblings block height option and custom sibling label
<!-- /snippets/product-siblings.liquid -->
{%- liquid
assign sibs_collection = collections[block.settings.siblings_collection].products
assign cutline_default = block.settings.cutline | default: product.metafields.theme.cutline.value
assign old_siblings_label = 'general.siblings.label' | t | default: 'Color'
assign siblings_label = block.settings.cutline_label | default: old_siblings_label
-%}
{%- if sibs_collection.size > 1 -%}
var links = document.links;
for (let i = 0, linksLength = links.length ; i < linksLength ; i++) {
if (links[i].hostname !== window.location.hostname) {
links[i].target = '_blank';
links[i].rel = 'noreferrer noopener';
}
}
@odessy
odessy / gist:3f522654ce0c01e9037c62daae5ff426
Created May 30, 2025 16:28
Product section form block order on mobile
@media only screen and (max-width: 767px) {
.product__inner {
display: grid;
grid-template-areas:
"title"
"price"
"variants"
"quantity"
"remaining"
"buttons"
a.klaviyo-bis-trigger {
background-color: var(--COLOR-PRIMARY);
border: 1px solid var(--COLOR-PRIMARY);
color: var(--COLOR-PRIMARY-OPPOSITE);
font-style: var(--FONT-STYLE-ACCENT);
text-transform: uppercase;
font-weight: var(--FONT-WEIGHT-ACCENT-BOLD);
font-style: calc(var(--font-3)*var(--FONT-ADJUST-ACCENT));
font-family: Sohne Breit,helvetica,sans-serif;
letter-spacing: .24em;
@odessy
odessy / gist:62fe97263ac8509765bb8fb2fa4b5d96
Last active May 6, 2025 16:03
Add background to product variants container
/* CSS - Change background color of block variants container */
.product__block__variants{
background-color: #513f76;
padding: 10px;
border-radius: 15px;
--text: #fff;
--text-light: var(--text);
}
.radio__legend,
.radio__legend__label{