Skip to content

Instantly share code, notes, and snippets.

@rjfrizz
rjfrizz / product_reviews_pro_replace_title_image.php
Last active May 8, 2020 05:15
replaces the review widget title with an attachment image if one is provided
/**
* Replace contribution titles with the contribution image
*
* NOTE: requires version higher than 1.6.3 to use this filter
*
* @param string $title the contribution title
* @param \WC_Contribution $contribution the contribution object with comment data
* @return string - updated title
*/
function sv_wc_prp_replace_widget_contribution_title( $title, $contribution ) {
@rjfrizz
rjfrizz / local_pickup_start_calendar_day.php
Last active September 11, 2018 21:17
Modifies the start day for local pickup plus calendar
<?php // only copy if needed
/**
* Modify Start Day for Local Pickup Plus Calendar
*
*/
function sv_local_pickup_cal_start() {
$day = '0'; // int starting day of the week as numerical entity (0 = Sunday, 6 = Saturday, default 1 = Monday)
{{ BEGINNING OF FILE, ABOUT 199 LINES }}
<div class="container">
<div class="three columns logo {% if section.settings.logo_home != nil %}secondary-logo--true{% endif %}">
<a href="{{ shop.url }}" title="{{ shop.name }}">
{% if section.settings.logo != nil or section.settings.logo_home != nil %}
{% if section.settings.logo != nil %}
<img src="{{ section.settings.logo | img_url: '410x' }}" alt="{{ shop.name }}" class="primary_logo" />
{% endif %}
{% if product.available %}
{% if section.settings.show_payment_button %}
{% assign show_payment_button = true %}
{% elsif show_payment_button_quickshop %}
{% assign show_payment_button = true %}
{% else %}
{% assign show_payment_button = false %}
{% endif %}
@rjfrizz
rjfrizz / turbo-header-liquid-premium.diff
Last active February 16, 2018 14:43
hides pricing product from the minicart
// around line 137
{% for item in cart.items %}
- <li class="cart_item clearfix">
+ <li class="cart_item clearfix" style="{% include 'product-customizer-helper' with 'hide-pricing-item-row' %}" {% include 'product-customizer-helper' with 'cart-row-data' %}>
<a href="{{ item.url }}">
{% if item.image %}
<div class="cart_image">
<img src="{{ item | img_url: '320x' }}" alt="{{ item.title | escape }}" />
</div>
@rjfrizz
rjfrizz / showtime-product-liquid.diff
Last active November 28, 2017 14:34
product.liquid edits for Product Customizer installation on ShowTime 4.1
...around line 39
<form class="form-add-to-cart form-horizontal" action="/cart/add" method="post" enctype="multipart/form-data" id="addToCartForm">
- {% include 'product-customizer' %}
<div class="desc_blk">
<h5>{{ 'products.general.description' | t }}</h5>
<!-- variations section -->
@rjfrizz
rjfrizz / debut-order-edits.patch
Last active September 26, 2017 18:51
/customers/order.liquid edits for the debut theme
...(beginning of file, about 20 lines)
<table class="responsive-table">
<thead>
<tr>
<th>{{ 'customer.order.product' | t }}</th>
<th>{{ 'customer.order.sku' | t }}</th>
<th>{{ 'customer.order.price' | t }}</th>
<th>{{ 'customer.order.quantity' | t }}</th>
<th>{{ 'customer.order.total' | t }}</th>
@rjfrizz
rjfrizz / pc-quick-view.liquid
Created November 4, 2016 14:40
quick view test code to disable
{% if settings.quick_shop_enabled and product.metafields.product_customizer == empty %}
.product-customizer-options .jumpstart-selector {
display: inline-block;
}
.product-customizer-options, .product-customizer-customizations-total {
clear: both;
padding: 0 15px;
}
.product-customizer-options .arrow {
@rjfrizz
rjfrizz / shopify_startcomment.liquid
Created October 14, 2016 13:50
start comment in shopify liquid
https://gist.github.com/d13c5202beb63880b327085a24e3404d