Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am using the rest API to get the orders using the call described here: https://shopify.dev/api/admin-rest/2022-07/resources/order#get-orders?status=any
Unfortunately, the past 10 days or so some data are missing from the customer object contained in the response.
There are no `orders_count` and no `total_spend` data. The fields are completely missing.
Is this a bug or I have to make the call differently?
The customer is requering and it should show some valuet there.
Any updates on this? I just noticed this myself.
@menelaos_vergis Did you ever find out if this is just the way they are doing it now?
The problem started because I changed the API version. This information is stored at the customer API now. You have to make extra calls to get it.
Got it. That's unfortunate. Thanks for the quick response and update though!
Looks like `orders_count` and `total_spent` are only missing from the rest APIs but are still available on the order webhooks.
Hey,
I'm attempting to call orders_count in an invoice editor (order printer pro) and it can't call the value. I am using the Studio theme.
The code is below:
<!-- Simplified -->
<!-- Common Base Styling -->
{% assign primary_font = "Merriweather Sans"%}
{% assign primary_font_color = "#000000" %} <!-- Black text color -->
{% assign primary_font_size = "12px"%}
{% assign secondary_font = "Ubuntu"%}
{% assign secondary_font_color = "#333333" %} <!-- Grey text color -->
{% assign theme_color = "#555555"%}
<script type="text/javascript">
var fHead = document.head || document.getElementsByTagName('head')[0];
{% assign font_weights = "300,400,700" | split: ',' %}
{% for font_weight in font_weights %}
var font1Id = 'font-{{ primary_font | replace: " ", "-" }}-{{ font_weight }}';
if (!document.getElementById(font1Id)) {
var linkElement = document.createElement('link');
linkElement.setAttribute('id', font1Id)
linkElement.setAttribute('rel', 'stylesheet');
linkElement.setAttribute('type', 'text/css');
linkElement.setAttribute('href', 'https://fonts.googleapis.com/css?family={{ primary_font | replace: " ", "+" }}:{{ font_weight }}&subset=latin-ext');
fHead.appendChild(linkElement);
};
{% if secondary_font != blank and secondary_font != primary_font %}
var font2Id = 'font-{{ secondary_font | replace: " ", "-" }}-{{ font_weight }}';
if (!document.getElementById(font2Id)) {
var linkElement = document.createElement('link');
linkElement.setAttribute('id', font2Id)
linkElement.setAttribute('rel', 'stylesheet');
linkElement.setAttribute('type', 'text/css');
linkElement.setAttribute('href', 'https://fonts.googleapis.com/css?family={{ secondary_font | replace: " ", "+" }}:{{ font_weight }}&subset=latin-ext');
fHead.appendChild(linkElement);
};
{% endif %}
{% endfor %}
</script>
<script>
$(function () {
if (navigator.userAgent.indexOf('Safari') != -1 &&
navigator.userAgent.indexOf('Chrome') == -1) {
$("body").addClass("safari");
}
});
</script>
<style type="text/css">
/* ### BASE - PAGE SIZING AND MARGIN SETUP NORMALIZATION ACROSS BROWSERS ### */
@Page {
margin: 12mm !important;
margin-top: 12mm !important;
margin-right: 12mm !important;
margin-bottom: 12mm !important;
margin-left: 12mm !important;
}
@media print {
.safari {
padding-top: 15px;
box-sizing: border-box;
}
.printer-preview-content:after {
content: "";
display: table;
clear: both;
}
.printer-preview-content .printer-preview-content {
padding-left: 15px;
padding-right: 15px;
box-sizing: border-box;
}
}
@media screen {
.printer-preview-content {
padding: 0px 0;
min-height: 800px;
/* background-image: url(http://basehold.it/i/20) */
}
.printer-preview-content .printer-preview-content {
margin-right: auto;
margin-left: auto;
max-width: 680px;
}
}
@media screen,print {
/* ### BASE - TYPOGRAPHY AND REMOVAL OF STANDARD SHOPIFY STYLING ### */
.printer-preview-content .t119905 * {
color: {{ secondary_font_color }};
font-family: '{{ primary_font }}';
font-size: {{ primary_font_size }};
font-weight: 400;
line-height: 16px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
margin: 0 0 0 0;
padding: 0 0 0 0;
-webkit-print-color-adjust: exact;
overflow: visible !important;
}
.printer-preview-content .t119905 h1 {
font-size: 14px;
line-height: 16px;
}
.printer-preview-content .t119905 h2 {
font-size: 12px;
line-height: 14px;
}
.printer-preview-content .t119905 h3 {
font-size: 12px;
line-height: 10px;
}
.printer-preview-content .t119905 h1,
.printer-preview-content .t119905 h2,
.printer-preview-content .t119905 h3 {
margin-bottom: 10px;
}
.printer-preview-content .t119905 a,
.printer-preview-content .t119905 a * {
text-decoration: none !important;
}
.printer-preview-content .t119905 b,
.printer-preview-content .t119905 b * {
font-weight: bold;
}
.printer-preview-content .t119905 .text-right {
text-align: right;
}
.printer-preview-content .t119905 .text-center {
text-align: center;
}
.printer-preview-content .t119905 .no-wrap {
white-space: nowrap;
}
/* ### BASE - GRID AND RE-USABLE LAYOUT COMPONENTS ### */
.printer-preview-content .t119905 .row {
width: 100%;
display: block;
clear: both;
}
.printer-preview-content .t119905 .row:after {
content: "";
display: table;
clear: both;
}
.printer-preview-content .t119905 .col-xs-1,
.printer-preview-content .t119905 .col-xs-2,
.printer-preview-content .t119905 .col-xs-3,
.printer-preview-content .t119905 .col-xs-4,
.printer-preview-content .t119905 .col-xs-5,
.printer-preview-content .t119905 .col-xs-6,
.printer-preview-content .t119905 .col-xs-7,
.printer-preview-content .t119905 .col-xs-8,
.printer-preview-content .t119905 .col-xs-9,
.printer-preview-content .t119905 .col-xs-10,
.printer-preview-content .t119905 .col-xs-11,
.printer-preview-content .t119905 .col-xs-12 {
float: left;
min-height: 1px;
margin-bottom: 40px;
}
.printer-preview-content .t119905 .col-xs-12 {
width: 100%;
}
.printer-preview-content .t119905 .col-xs-11 {
width: 91.66666667%;
}
.printer-preview-content .t119905 .col-xs-10 {
width: 83.33333333%;
}
.printer-preview-content .t119905 .col-xs-9 {
width: 75%;
}
.printer-preview-content .t119905 .col-xs-8 {
width: 66.66666667%;
}
.printer-preview-content .t119905 .col-xs-7 {
width: 58.33333333%;
}
.printer-preview-content .t119905 .col-xs-6 {
width: 50%;
}
.printer-preview-content .t119905 .col-xs-5 {
width: 41.66666667%;
}
.printer-preview-content .t119905 .col-xs-4 {
width: 33.33333333%;
}
.printer-preview-content .t119905 .col-xs-3 {
width: 25%;
}
.printer-preview-content .t119905 .col-xs-2 {
width: 16.66666667%;
}
.printer-preview-content .t119905 .col-xs-1 {
width: 8.33333333%;
}
.printer-preview-content .t119905 .col-no-margin {
margin-bottom: 0 !important;
}
.printer-preview-content .t119905 .clear-fix::after {
content: "";
clear: both;
display: table;
}
.printer-preview-content .t119905 .half-margin-top {
margin-top: 10px !important;
}
.printer-preview-content .t119905 .half-margin-bottom {
margin-bottom: 10px !important;
}
.printer-preview-content .t119905 .margin-bottom {
margin-bottom: 20px !important;
margin-top: 1px;
}
.printer-preview-content .t119905 .margin-top {
margin-top: 20px !important;
}
.printer-preview-content .t119905 .double-margin-top {
margin-top: 40px !important;
}
.printer-preview-content .t119905 .double-margin-bottom {
margin-bottom: 40px !important;
}
.printer-preview-content .t119905 .strikethrough {
text-decoration: line-through !important;
}
.printer-preview-content .t119905 .break {
word-break: break-all !important;
}
/* ### BASE - TABLE STYLING ### */
.printer-preview-content .t119905 table,
.printer-preview-content .t119905 .table {
width: 100%;
max-width: 100%;
background-color: transparent;
border-collapse: collapse;
}
.printer-preview-content .t119905 table thead {
display: table-row-group;
}
.printer-preview-content .t119905 table tbody tr {
page-break-inside:avoid !important;
page-break-after:auto !important;
}
.printer-preview-content .t119905 table tbody tr td {
page-break-inside:avoid !important;
}
.printer-preview-content .t119905 th {
white-space: nowrap;
text-align: left;
vertical-align: middle;
border-top: 0;
border-bottom: 0;
}
.printer-preview-content .t119905 td {
vertical-align: middle;
border-top: 0;
border-bottom: 0;
}
.printer-preview-content .t119905 .order-table tbody > tr td {
background-color: #FFFFFF;
}
.printer-preview-content .t119905 .pricing-table {
position: relative;
top: 1px;
}
.printer-preview-content .t119905 .pricing-table tbody > tr > td {
background-color: #FFFFFF;
}
/* .printer-preview-content .t119905 .pricing-table tbody > tr > td.pricing-table-title {
word-break: break-all;
}*/
.printer-preview-content .t119905 th.order-table-qty {
width: 10%;
}
.printer-preview-content .t119905 th.order-table-price {
width: 10%;
}
.printer-preview-content .t119905 th.order-table-item-total,
.printer-preview-content .t119905 th.order-table-reason {
width: 17%;
}
.printer-preview-content .t119905 th.order-table-return-comments {
width: 30%;
}
.printer-preview-content .t119905 .pricing-table-text {
text-align: right;
white-space: nowrap;
}
/* ### BASE - PRODUCT IMAGE SIZING TO RETAIN LINE HEIGHT RYTHM) ### */
.printer-preview-content .t119905 .product-image-wrapper {
width: 40px;
max-height: 40px;
vertical-align: middle;
text-align: center;
}
.printer-preview-content .t119905 .product-image {
padding: 0 4px;
page-break-inside:avoid !important;
max-width: 40px;
height: auto;
max-height: 40px;
}
/* ### BASE - LISTS RESET ### */
.printer-preview-content .t119905 ul {
list-style: none;
}
.printer-preview-content .t119905 li {
color: {{ secondary_font_color }};
list-style: none;
}
/* ### BASE - LOGO ### */
.printer-preview-content .t119905 .logo-wrapper {
display: inline-block;
width: 100%;
padding-bottom: 10px;
}
.printer-preview-content .t119905 .logo {
float: left;
padding-right: 15px;
max-width: 32%;
max-height: 88.32000000000001px;
}
/* ### BASE - BARCODE ### */
.printer-preview-content .t119905 .order-number-barcode,
.printer-preview-content .t119905 .product-barcode {
display: block;
}
/* ### BASE - ADDITONAL COMMON SHARED TYPOGRAPHY AND ALIGNMENT ### */
.printer-preview-content .t119905 .address {
margin-right: 5%;
}
.printer-preview-content .t119905 .col-xs-8 .notes,
.printer-preview-content .t119905 .col-xs-6 .notes {
margin-right: 20%;
}
.printer-preview-content .t119905 .notes-title,
.printer-preview-content .t119905 .return-codes {
margin: 10px 0;
}
/* ### BASE - HORIZONTAL RULE MARKS ### */
.printer-preview-content .t119905 hr {
background: {{ theme_color }};
border-top: 0;
border: 0;
height: 2px;
width: 100%;
margin-bottom: -2px;
}
}
</style>
<!-- Template Specific Styling -->
<style type="text/css">
@media screen,print {
/* ### DESIGN SPECIFIC - TYPOGRAPHY ### */
.printer-preview-content .t119905 h1 {
font-family: '{{ secondary_font }}';
font-weight: 400;
margin-bottom: 0px !important;
color: {{ primary_font_color }};
}
.printer-preview-content .t119905 h2 {
font-family: '{{ secondary_font }}';
}
.printer-preview-content .t119905 h3 {
font-family: '{{ secondary_font }}';
color: {{ theme_color }};
}
.printer-preview-content .t119905 .logo-wrapper {
margin: 0 0;
padding: 0 !important;
}
.printer-preview-content .t119905 .logo {
margin: 0 0;
padding: 0 !important;
}
/* ### DESIGN SPECIFIC - LOGO POSITIONING ### */
.printer-preview-content .t119905 .logo {
float: none;
display: block;
margin: 0 auto;
}
/* ### DESIGN SPECIFIC - STORE DETAILS ### */
.printer-preview-content .t119905 .shop-block {
text-align: center;
}
.printer-preview-content .t119905 .shop-domain {
font-weight: normal;
color: {{ primary_font_color }};
}
.printer-preview-content .t119905 .shop-address-name {
display: block;
font-size: 17px;
font-weight: 700;
color: {{ primary_font_color }};
}
.printer-preview-content .t119905 .shop-address-block b {
font-weight: 700;
color: {{ primary_font_color }};
}
/* ### DESIGN SPECIFIC - ORDER DETAILS ### */
.printer-preview-content .t119905 .order-details-title {
display: inline-block;
width: 40%;
}
.printer-preview-content .t119905 .order-details .order-details-date {
display: none;
}
.printer-preview-content .t119905 .order-details li:first-of-type * {
font-weight: 700;
/* text-transform: uppercase;
*/ padding-bottom:10px;
color: {{ primary_font_color }};
}
.printer-preview-content .t119905 .order-details li:not(:first-of-type) * {
font-weight: normal;
}
/* ### DESIGN SPECIFIC - BILL TO AND SHIP TO ADDRESS ### */
.printer-preview-content .t119905 .address-title {
font-weight: 700;
/* text-transform: uppercase;
*/ padding-bottom:10px;
color: {{ primary_font_color }};
}
/* ### DESIGN SPECIFIC - TABLE HEADER ### */
.printer-preview-content .t119905 .order-table thead tr th {
padding-left: 0px;
padding-right: 0px;
padding-top: 10px;
padding-bottom:5px;
font-weight: 700;
vertical-align: bottom;
color: {{ primary_font_color }};
border-bottom: 2px solid {{ theme_color }};
/* text-transform: uppercase;
*/ }
/* ### DESIGN SPECIFIC - TABLE BODY (SHARED) ### */
.printer-preview-content .t119905 .order-table tbody tr td,
.printer-preview-content .t119905 .pricing-table tbody tr td {
padding-left: 0px;
padding-right: 0px;
border-top: 0;
padding-top: 6px;
padding-bottom:5px;
border-bottom: 1px solid #f3f3f3;
}
/* ### DESIGN SPECIFIC - ORDER TABLE SPECIFIC ### */
.printer-preview-content .t119905 .order-table thead tr th.order-table-title {
/* text-transform: uppercase;
*/ }
.printer-preview-content .t119905 th.order-table-qty,
.printer-preview-content .t119905 th.order-table-price,
.printer-preview-content .t119905 th.order-table-item-total {
width: 14%;
}
.printer-preview-content .t119905 th.order-table-item-total,
.printer-preview-content .t119905 th.order-table-reason {
width: 20%;
}
.printer-preview-content .t119905 th.order-table-return-comments {
width: 30%;
}
.printer-preview-content .t119905 .order-table tbody > tr > td.line-item-description {
color: {{ primary_font_color }};
font-weight: 700;
}
.printer-preview-content .t119905 .order-table tbody > tr > td:last-of-type,
.printer-preview-content .t119905 .order-table tbody > tr > td:last-of-type * {
}
.printer-preview-content .t119905 .order-table .product-image-wrapper {
padding-right: 8px;
}
.printer-preview-content .t119905 .order-table tbody > tr > td.line-item-description span.line-item-refund {
display: inline-block;
padding: 2px 8px;
margin-top: 5px;
background-color: #FFEA8A;
border-radius: 20px;
}
/* ### DESIGN SPECIFIC - PRICING TABLE SPECIFIC ### */
.printer-preview-content .t119905 .pricing-table tbody > tr > td.pricing-table-title,
.printer-preview-content .t119905 .pricing-table tbody > tr > td.pricing-table-title span {
/* text-transform: uppercase;
*/ }
.printer-preview-content .t119905 .pricing-table tbody > tr > td.pricing-table-text,
.printer-preview-content .t119905 .pricing-table tbody > tr > td.pricing-table-text * {
}
.printer-preview-content .t119905 .pricing-table tbody > tr.pricing-table-total-row .pricing-table-title,
.printer-preview-content .t119905 .pricing-table tbody > tr.pricing-table-total-row .pricing-table-text {
color: {{ primary_font_color }};
font-weight: 700;
border-bottom: 2px solid {{ theme_color }};
}
/* ### DESIGN SPECIFIC - ORDER NOTES ### */
.printer-preview-content .t119905 .notes-title {
font-weight: 700;
/* text-transform: uppercase;
*/ color: {{ primary_font_color }};
}
.printer-preview-content .t119905 .notes-text {
margin-bottom: 20px;
}
/* ### DESIGN SPECIFIC - RETURN FORM REASON CODES ### */
.printer-preview-content .t119905 .return-codes b,
.printer-preview-content .t119905 .return-code b * {
margin-bottom: 20px;
font-weight: 700;
color: {{ primary_font_color }};
}
/* ### DESIGN SPECIFIC - THANK YOU MESSAGE ### */
/* ### DESIGN SPECIFIC - GIFT MESSAGE ### */
.printer-preview-content .t119905 .gift-text {
font-weight: 700;
padding-top:20px;
padding-bottom:20px;
font-size: 13px;
}
.printer-preview-content .t119905 .gift-text * {
font-weight: 700;
font-size: 13px;
}
.printer-preview-content .t119905 .gift-text svg {
padding-bottom:10px;
}
/* ### DESIGN SPECIFIC - TERMS AND CONDITIONS ### */
.printer-preview-content .t119905 .terms-text {
font-size: 11px;
}
.printer-preview-content .t119905 .terms-text * {
font-size: 11px;
}
/* ### DESIGN SPECIFIC - SOCIAL ICONS ### */
.printer-preview-content .t119905 .social-icons {
display: inline;
width: 18px;
margin: 10px 2%;
}
}
</style>
<div class="printer-preview-content" contenteditable="true" spellcheck="false" title="Click to edit text (changes will be printed but not saved)">
<div class="t119905">
<div class="row">
<div id="header-row">
<div class="col-xs-12 margin-bottom">
</div>
</div>
<div class="clear-fix"></div>
</div>
<div class="row">
<div style="border-bottom: 2px solid {{ theme_color }}">
<div class="col-xs-8 col-no-margin">
<div class="template-title">
<h1 class="editable" data-key="template_type_name">Invoice</h1>
</div>
</div>
<div class="col-xs-4 col-no-margin">
<ul style="padding-top: 10px;">
<li>
<span class="order-details-text">{{ date | date: "%B %d, %Y" }}</span>
</li>
</ul>
</div>
<div class="clear-fix"></div>
</div>
<div class="clear-fix"></div>
</div>
<div class="row">
<div class="col-xs-4 margin-top margin-bottom">
<div class="address-title bill-to-title editable" data-key="bill_to">Bill to</div>
<ul class="address">
{% assign billing_address = billing_address | default: customer.default_address %}
{% if billing_address and billing_address != blank %}
<li>{{ billing_address.name }}</li>
{% if billing_address.company != blank %}
<li>{{ billing_address.company }}</li>
{% endif %}
<li>{{ billing_address.address1 }}</li>
{% if billing_address.address2 != blank %}
<li>{{ billing_address.address2 }}</li>
{% endif %}
<li>{{ billing_address.city }}, {% if billing_address.province_code != blank %}{{ billing_address.province_code }}{% else %}{{ billing_address.province }}{% endif %} {{ billing_address.zip | upcase }}</li>
{% if shop.country != billing_address.country %}
<li>{{ billing_address.country }}</li>
{% endif %}
{% elsif customer != blank %}
{% if customer.name != blank %}
<li>{{ customer.name }}</li>
{% endif %}
{% if customer.email != blank %}
<li>{{ customer.email }}</li>
{% endif %}
{% endif %}
</ul>
</div>
<div class="col-xs-4 margin-top margin-bottom">
{% if shipping_address and shipping_address != "" and shipping_address != nil %}
<div class="address-title ship-to-title editable" data-key="ship_to">Ship to</div>
{% endif %}
<ul class="address">
{% if shipping_address and shipping_address != blank %}
<li>{{ shipping_address.name }}</li>
{% if shipping_address.company != blank %}
<li>{{ shipping_address.company }}</li>
{% endif %}
<li>{{ shipping_address.address1 }}</li>
{% if shipping_address.address2 != blank %}
<li>{{ shipping_address.address2 }}</li>
{% endif %}
<li>{{ shipping_address.city }}, {% if shipping_address.province_code != blank %}{{ shipping_address.province_code }}{% else %}{{ shipping_address.province }}{% endif %} {{ shipping_address.zip | upcase }}</li>
{% if shop.country != shipping_address.country %}
<li>{{ shipping_address.country }}</li>
{% endif %}
{% endif %}
</ul>
</div>
<div class="col-xs-4 margin-top margin-bottom">
<ul class="order-details">
<li class="order-details-invoice">
<span class="order-details-title editable" data-key="invoice_number">Invoice No.</span>
<span class="order-details-text">{{ order_name }}</span>
</li>
<li class="order-details-date">
<span class="order-details-title editable" data-key="date">Order Date</span>
<span class="order-details-text">{{ created_at | date: "%B %d, %Y" }}</span>
</li>
{% assign transaction_text = "" %}
{% for transaction in transactions %}
{% if transaction.status != "failure" and transaction.status != "error" %}
{% if transaction.kind == "authorization" or transaction.kind == "sale" %}
{% if transaction.payment_details.credit_card_company != blank and transaction.payment_details.credit_card_company != "unknown" %}
{% capture t_text %}{{ transaction.payment_details.credit_card_company }}{% endcapture %}
{% else %}
{% capture t_text %}{{ transaction.gateway | replace: "_", " " | capitalize }}{% endcapture %}
{% endif %}
{% unless transaction_text contains t_text %}
{% if transaction_text != blank %}
{% assign transaction_text = transaction_text | append: ", " %}
{% endif %}
{% assign transaction_text = transaction_text | append: t_text %}
{% endunless %}
{% endif %}
{% endif %}
{% endfor %}
{% if transaction_text != blank and transaction_text != "manual" %}
<li class="order-details-payment">
<span class="order-details-title editable" data-key="payment_method">Payment</span>
<span class="order-details-text">{{ transaction_text }}</span>
</li>
{% endif %}
{% if shipping_method.title != blank %}
<li class="order-details-shipping">
<span class="order-details-title editable" data-key="shipping_method">Shipping</span>
<span class="order-details-text">{{ shipping_method.title }}</span>
</li>
{% endif %}
<li class="order-details-count">
<span class="order-details-title editable" data-key="customer_orders_count">Orders</span>
<span class="order-details-text">{{ orders_count | default: 1}}</span>
</li>
</ul>
</div>
<div class="clear-fix"></div>
</div>
<div class="row">
<div class="col-xs-12 col-no-margin">
<table class="order-table table">
<thead>
<tr>
<th colspan=2 class="order-table-title editable" data-key="item">Item Description</th>
<th class="order-table-qty text-center editable" data-key="qty">Qty</th>
<th class="order-table-price text-right editable" data-key="price">Price</th>
<th class="order-table-item-total text-right editable" data-key="item_total">Total</th>
</tr>
</thead>
<tbody>
{% assign line_items = line_items | sort: "name" %}
<!-- Bold Product Options Snippet 1 -->
{% assign hidden_variant_ids = "" %}
{% for line_item in line_items %}
{% if line_item.properties._boldVariantIds %}
{% assign hidden_variant_ids = hidden_variant_ids | append: ',' %}
{% assign hidden_variant_ids = hidden_variant_ids | append: line_item.properties._boldVariantIds %}
{% endif %}
{% endfor %}
{% assign hidden_variant_ids = hidden_variant_ids | split: ',' %}
<!-- END Bold Product Options Snippet 1 -->
{% for line_item in line_items %}
{% if line_item.quantity < 1 %}{% continue %}{% endif %}
<!-- Bold Product Options Snippet 2 -->
{% if hidden_variant_ids contains line_item.variant_id %}{% continue %}{% endif %}
{% assign adjusted_item_price = line_item.price %}
{% assign adjusted_line_price = line_item.price | times: line_item.quantity %}
{% for line_item2 in line_items %}
{% if line_item.properties._boldVariantIds contains line_item2.variant_id %}
{% assign adjusted_item_price = adjusted_item_price | plus: line_item2.price %}
{% assign adjusted_line_option_price = line_item2.price | times: line_item.quantity %}
{% assign adjusted_line_price = adjusted_line_price | plus: adjusted_line_option_price %}
{% endif %}
{% endfor %}
<!-- END Bold Product Options Snippet 2 -->
<tr>
<td class="product-image-wrapper">{% if line_item.image != blank %}<img class="product-image" src="{{ line_item.image | img_url: 'medium' }}"/>{% endif %}</td>
<td class="line-item-description">
<p style="font-weight: 700;"><a href="https://{{ shop.domain }}/products/{{ line_item.product.handle }}" style="font-weight: 700;color: inherit;" target="_blank">
{{ line_item.title | replace: " - Default Title", "" }}</a></p>
{% for p in line_item.properties %}
{% assign p_internal = p.first | slice: 0 %}
{% unless p.first contains "builder_id" or p.first contains "builder_info" or p.first contains "master_builder" or p_internal == "_" or p.last == "" or p.last == blank %}
{% if p.last contains "cdn.shopify.com" or p.last contains "/uploads/" or p.last contains ".png?" or p.last contains ".jpg?" or p.last contains "//uploadery.s3" %}
<p class="line-item-property">{{ p.first }}:<br>
</p>
<a href="{{ p.last }}" target="_blank"><img src="{{ p.last }}" alt="{{ p.first }}" width="60" border="0" style="width: 60px; height: auto !important;"></a>
{% else %}
<p class="line-item-property">{{ p.first }}: {{ p.last | newline_to_br }}</p>
{% endif %}
{% endunless %}
{% endfor %}
{% assign refunded_quantity = 0 %}
{% for refund in refunds %}
{% for refund_line_item in refund.refund_line_items %}
{% if line_item.id == refund_line_item.line_item_id %}
{% assign refunded_quantity = refunded_quantity | plus: refund_line_item.quantity %}
{% endif %}
{% endfor %}
{% endfor %}
{% if refunded_quantity > 0 %}
<span class="line-item-refund">Refunded × {{ refunded_quantity }}</span>
{% endif %}
</td>
<td class="text-center line-item-qty">× {{ line_item.quantity }}</td>
<td class="text-right no-wrap line-item-price">
{% if line_item.original_price and line_item.original_price > adjusted_item_price %}
{% assign original_price = line_item.original_price %}
{% elsif line_item.variant.compare_at_price and line_item.variant.compare_at_price > adjusted_item_price %}
{% assign original_price = line_item.variant.compare_at_price %}
{% elsif line_item.variant.price and line_item.variant.price > adjusted_item_price %}
{% assign original_price = line_item.variant.price %}
{% else %}
{% assign original_price = 0 %}
{% endif %}
{% if original_price > 0 and original_price > adjusted_item_price %}
<p class="strikethrough"><s>{{ original_price | money }}</s></p>
{% endif %}
<p>{{ adjusted_item_price | money }}</p>
</td>
<td class="text-right no-wrap line-item-line-price">{{ adjusted_line_price | money }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="clear-fix"></div>
</div>
<div class="row">
<div class="col-xs-8">
<div class="notes">
{% if note != blank or attributes != blank %}
<div class="notes-title editable" data-key="order_notes"></div>
{% endif %}
<div class="notes-text">
{{ note | newline_to_br }}
{% for attribute in attributes %}
{% assign a_internal = attribute.first | slice: 0 %}
{% unless a_internal == "_" %}
<br>
<b>{{ attribute.first | replace: "-", " " | replace: "_", " " | capitalize }}:</b> {{ attribute.last | newline_to_br }}
{% endunless %}
{% endfor %}
</div>
</div>
</div>
<div class="col-xs-4">
<table class="pricing-table table">
<tbody>
{% for discount in discounts %}
{% if discount.amount != 0.00 %}
<tr>
<td class="pricing-table-title"><span class="editable" data-key="discount">Discount:</span>{% if discount.code != blank %} <span class="break">{{ discount.code }}</span>{% endif %}</td>
<td class="pricing-table-text">-{{ discount.amount | money }}</td>
</tr>
{% endif %}
{% else %}
{% if total_discounts != 0.00 %}
<tr>
<td class="pricing-table-title"><span class="editable" data-key="discount">Discount:</span></td>
<td class="pricing-table-text">-{{ total_discounts | money }}</td>
</tr>
{% endif %}
{% endfor %}
<tr>
<td class="pricing-table-title editable" data-key="subtotal">Subtotal</td>
<td class="pricing-table-text">{{ subtotal_price | money }}</td>
</tr>
<tr>
<td class="pricing-table-title editable" data-key="shipping_handling">Shipping</td>
<td class="pricing-table-text">{{ shipping_price | default: 0 | money }}</td>
</tr>
{% for tax_line in tax_lines %}
<tr>
<td class="pricing-table-title">{{ tax_line.title }} ({{ tax_line.rate | times: 100}}%)</td>
<td class="pricing-table-text">{{ tax_line.price | money }}</td>
</tr>
{% endfor %}
<tr class="pricing-table-total-row">
<td class="pricing-table-title"><span class="editable" data-key="total">Total</span></td>
<td class="pricing-table-text">{{ total_price | money }}</td>
</tr>
</tbody>
</table>
</div>
<div class="clear-fix"></div>
</div>
<div class="shop-address-block full-editable" data-key="shop_block">
<p>
<b>Dr. Steve's Caffeine Melts</b><span style="color: rgb(0, 0, 0);">®</span></p>
<p>2683 Saint Johns Bluff Road South #135 / Jacksonville, FL 32246 / </p>
<p>info@caffeinemelts.com / 904-513-4075</p>
</div>
<div class="shop-social">
<a href="Caffeine Melts" target="_blank">
<img class="social-icons" src="https://cdn.shopify.com/s/files/1/0398/5025/files/Fb_icon.jpg?11755453313570768267"/>
</a>
<a href="@caffeinemelts" target="_blank">
<img class="social-icons" src="https://cdn.shopify.com/s/files/1/0398/5025/files/instagram_9.png?576915513262272927"/>
</a>
<a href="https://twitter.com/shopify" target="_blank">
<img class="social-icons" src="https://cdn.shopify.com/s/files/1/0398/5025/files/twitter_Icon.png?11314827648007113849"/>
</a>
</div>
<a href="https://{{ shop.domain }}" target="_blank">
<div class="shop-domain editable" data-key="shop_domain">
www.caffeinemelts.com
</div>
</a>
</div>
<div class="clear-fix"></div>
</div>
</div>
</div>
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024