Skip to content

Instantly share code, notes, and snippets.

View cargix1's full-sized avatar

Andrew Cargill cargix1

View GitHub Profile
@cargix1
cargix1 / en-AU.json
Created March 22, 2023 09:38
Delivery locale file
{
"shopify": {
"checkout": {
"tips": {
"title": "Driver tip",
"add_tip": "Add tip",
"description": "Add a tip for your delivery driver",
"message": ""
},
"general": {
@cargix1
cargix1 / en-CA.json
Created March 22, 2023 09:37
Pickup locale file
{
"shopify": {
"checkout": {
"contact": {
"phone_label": "Your phone number",
"optional_phone_label": "Your phone number (optional)",
"phone_placeholder": "Your phone number",
"optional_phone_placeholder": "Your phone number (optional)",
"shipping_address_title": "Pickup address",
"first_name_label": "Your first name",
@cargix1
cargix1 / order-confirmation-fr.liquid
Created March 7, 2023 11:55
Order Confirmation Template (Français)
{% capture email_title %}Merci pour votre achat! {% endcapture %}
{% capture email_body %}Bonjour {{ customer.first_name }}, {% if attributes.Checkout-Method == "pickup" %}nous préparons votre commande pour le ramassage.{% elsif attributes.Checkout-Method == "delivery" %}nous préparons la livraison de votre commande. Nous vous informerons lorsqu'elle sera envoyée.{% else %}nous préparons l'expédition de votre commande. Nous vous informerons lorsqu'elle sera envoyée.{% endif %}{% endcapture %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ email_title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
<style>
@cargix1
cargix1 / new-order-template-fr.liquid
Created March 7, 2023 11:53
New Order Template (Français)
<p>Bonjour {{ shop_name }},</p>
<p></p>
<p>{% if customer.name %}{{ customer.name }}{% else %}Quelqu'un{% endif %} a passé une nouvelle commande avec vous aujourd'hui, {{ date | date: "%b %d %I:%M%p" }}:</p>
<p></p>
<ul style="list-style-type:none">{% for line in line_items %}<li> <img src="{{ line | img_url: 'thumb' }}" /> {{ line.quantity }}x {{line.title }} (sku: {{ line.sku }})<br>{% for p in line.properties %}{% if p.first == "builder_id" or p.first == "builder_info" or p.first == "master_builder" or p.last == "" or p.first == "_ZapietId" %}{% else %}{{ p.first }}: {% if p.last contains '/uploads/' %}<a class="lightbox" href="{{ p.last }}">{{ p.last | split: '/' | last }}</a><br>{% else %}{{ p.last }}<br>{% endif %}{% endif %}{% endfor %}</li>{% endfor %}</ul>
<a href="{{ shop.url }}/admin/orders/{{ id }}">Voir la commande {{order_name}} </a>
{% if fulfillment_aborted %}
<p>La commande ci-dessus n'a pas été exécutée automatiquement car elle a été signalée comme suspecte.</p>{% endif %}
<p></p><br>
{% if
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<!--[if gte mso 15]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG />
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
@cargix1
cargix1 / zapiet-delivery-validator-custom.liquid
Last active June 27, 2022 12:54
Custom delivery validator widget
<form onsubmit="validateZipCode(); return false;">
<input type="text" id="zipcode" placeholder="Enter zipcode here ..." />
<input type="submit" value="Go" />
</form>
<script type="text/javascript">
function validateZipCode(e) {
const zipcode = document.getElementById('zipcode').value;
if (typeof window.Zapiet === 'undefined' || typeof window.ZapietCachedSettings === 'undefined' ||
@cargix1
cargix1 / new-order-template.liquid
Last active July 29, 2021 11:37
New Order Template
<p>Hello {{ shop_name }},</p>
<p></p>
<p>{% if customer.name %}{{ customer.name }}{% else %}Someone{% endif %} placed a new order with you today, {{ date | date: "%b %d %I:%M%p" }}:</p>
<p></p>
<ul style="list-style-type:none">{% for line in line_items %}<li> <img src="{{ line | img_url: 'thumb' }}" /> {{ line.quantity }}x {{line.title }} (sku: {{ line.sku }})<br>{% for p in line.properties %}{% if p.first == "builder_id" or p.first == "builder_info" or p.first == "master_builder" or p.last == "" or p.first == "_ZapietId" %}{% else %}{{ p.first }}: {% if p.last contains '/uploads/' %}<a class="lightbox" href="{{ p.last }}">{{ p.last | split: '/' | last }}</a><br>{% else %}{{ p.last }}<br>{% endif %}{% endif %}{% endfor %}</li>{% endfor %}</ul>
<a href="{{ shop.url }}/admin/orders/{{ id }}">View order {{order_name}} </a>
{% if fulfillment_aborted %}
<p>The above order was not automatically fulfilled because it was flagged as suspicious.</p>{% endif %}
<p></p><br>
@cargix1
cargix1 / order-confirmation-template.liquid
Last active April 27, 2023 16:40
Order Confirmation Template
{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}Hi {{ customer.first_name }}, {% if attributes.Checkout-Method == "pickup" %}we're getting your order ready for collection.{% elsif attributes.Checkout-Method == "delivery" %}we're getting your order ready to be delivered. We will notify you when it has been sent.{% else %}we're getting your order ready to be shipped. We will notify you when it has been sent.{% endif %}{% endcapture %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ email_title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
@cargix1
cargix1 / shipping-confirmation-template.liquid
Last active April 23, 2020 20:59
Shipping confirmation template
{% if fulfillment.item_count == item_count %}
{% capture shipment_name %}Your order is{% endcapture %}
{% elsif fulfillment.item_count > 1 %}
{% if fulfillment_status == 'fulfilled' %}
{% capture shipment_name %}The last items in your order are{% endcapture %}
{% else %}
{% capture shipment_name %}Some items in your order are{% endcapture %}
{% endif %}
{% else %}
{% if fulfillment_status == 'fulfilled' %}
{
"order": {
"id": 201771483175,
"email": "andy@zapiet.com",
"closed_at": null,
"created_at": "2017-11-27T08:32:08-05:00",
"updated_at": "2017-11-27T08:32:12-05:00",
"number": 390,
"note": null,
"token": "1e7f9f9d42836a241382498c3bf55283",