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
# Reject all discount codes | |
Output.cart = Input.cart | |
exit unless Input.cart.discount_code | |
Input.cart.discount_code.reject({ message: 'No discount codes allowed until promotion is over' }) | |
Output.cart = Input.cart |
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
PAID_ITEM_COUNT = 1 | |
DISCOUNTED_ITEM_COUNT = 1 | |
# ~~ Change 50 below to whatever percent you want the second item to be discounted at. Also, don't forget to change the message at the bottom | |
PERCENT_OFF = 50 # ~~ 50% OFF | |
# Returns the integer amount of items that must be discounted next | |
# given the amount of items seen | |
# | |
def discounted_items_to_find(total_items_seen, discounted_items_seen) | |
Integer(total_items_seen / (PAID_ITEM_COUNT + DISCOUNTED_ITEM_COUNT) * DISCOUNTED_ITEM_COUNT) - discounted_items_seen |
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
{%- assign current_date_time = 'now' | date: "%Y%m%d%H%M" -%} | |
{%- comment %}choose start date{%- endcomment -%} | |
{%- assign start_year = section.settings.start_year -%} | |
{%- assign start_month = section.settings.start_month -%} | |
{%- assign start_day = section.settings.start_day -%} | |
{%- assign start_hour = section.settings.start_hour | remove: ':' -%} | |
{%- assign start_date = start_year | append: start_month | append: start_day | append: start_hour | convert: "date" -%} | |
{%- comment %}choose end date{%- endcomment -%} |
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
{%- comment -%} | |
// This uses RUBY to format the dates since Shopify uses RUBY. | |
// For help - Ruby Date Format (strftime) Cheat Sheet: | |
// https://www.shortcutfoo.com/app/dojos/ruby-date-format-strftime/cheatsheet | |
{%- endcomment -%} | |
{%- assign date_format = "%A, %B %d" -%} | |
<p>Shipping starts at just $3.50! Planned ship date is: |
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
{%- comment -%} | |
Shopify uses RUBY, so we will too. | |
For help - Ruby Date Format (strftime) Cheat Sheet: | |
http://www.strfti.me | |
{%- endcomment -%} | |
{% comment %} | |
Below you'll find the liquid logic for a store that has 3 day shipping, and ships 7 days a week | |
{% endcomment %} | |
{%- assign date_format = "%A, %B %d" -%} |
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
{%- comment -%} | |
This is a required section for the Shopify Theme Store. | |
It is available in the "Header" section in the theme editor. | |
Theme Store required settings | |
- Show announcement | |
- Text: message to announce | |
- Link: link of the announcement bar | |
Theme Store optional settings |
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
{% if section.settings.announcement_visibility %} | |
<style> | |
.announcement { | |
font-size:{{ section.settings.announcement_text_size }}px; | |
background-color: {{ section.settings.announcement_bg_color }}; | |
border-bottom: {{ section.settings.announcement_border_size}}px solid {{ section.settings.announcement_border_color }}; | |
padding: {{ section.settings.announcement_padding}}px; | |
text-align: {{ section.settings.announcement_text_align }}; | |
} | |
.announcement p {color: {{ section.settings.announcement_text_color }};} |
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="page-width"> | |
<div class="grid"> | |
<div class="grid__item medium-up--five-sixths medium-up--push-one-twelfth"> | |
<div class="section-header text-center"> | |
<h1>{{ page.title }}</h1> | |
</div> | |
{% if page.content.size > 0 %} | |
<div class="rte"> | |
{{ page.content }} |
OlderNewer