Shopify sure does like their apps and sucking the money out of a small business owner. Luckily we have these discussions and q&a places to figure it out without the apps.
I just want to add a message to the drawer cart to my theme. I looked at some other discussions but I am not seeing the same options/code in my theme. It appears I am using the RIDE theme.
I have a message on my site that if they are able to get to the normal cart page it basically says something about what their buying power does. But I would like to add that message to the drawer and a reminder on the final check out page.
Where should I look as far as the edit code section is concerned?
Zqdo
June 21, 2023, 3:42am
2
This is very easy to do, and I’ve been able to create this feature on multiple themes.
When you go to your code files, and search “cart”, what appears?
Cart.json
Cart-drawer.liquid
Cart-notification.liquid
Few others like footer and items that won’t pertain here.
This is the only code in the cart-drawer
{%- render ‘cart-drawer’ -%}
Zqdo
June 22, 2023, 1:37am
6
This might be a little easier if I could see your code files, however I believe we should be working with cart-drawer.liquid.
What’s the link to your website?
Zqdo
June 22, 2023, 2:11am
8
I don’t think it’s this one; we should try looking at main-cart-items.liquid. Can you share the link to your website as well? Thanks.
Not your AVERAGE coffee roaster. Crafted for aviation enthusiasts and coffee snobs who demand better. Air-roasted, small-batch, single-origin, specialty-grade coffee that’s never bitter, always better. Veteran-owned & giving 10% back to real...
{{ ‘component-cart.css’ | asset_url | stylesheet_tag }}
{{ ‘component-cart-items.css’ | asset_url | stylesheet_tag }}
{{ ‘component-totals.css’ | asset_url | stylesheet_tag }}
{{ ‘component-price.css’ | asset_url | stylesheet_tag }}
{{ ‘component-discounts.css’ | asset_url | stylesheet_tag }}
{{ ‘component-loading-overlay.css’ | asset_url | stylesheet_tag }}
{%- style -%}
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px;
padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px;
}
@media screen and (min-width: 750px) {
.section-{{ section.id }}-padding {
padding-top: {{ section.settings.padding_top }}px;
padding-bottom: {{ section.settings.padding_bottom }}px;
}
}
{%- endstyle -%}
{%- unless settings.cart_type == ‘drawer’ -%}
{%- endunless -%}
{{ 'sections.cart.empty' | t }}
{{ 'general.continue_shopping' | t }}
{%- if shop.customer_accounts_enabled and customer == null -%}
{{ 'sections.cart.login.title' | t }}
{{ 'sections.cart.login.paragraph_html' | t: link: routes.account_login_url }}
{%- endif -%}
{%- if cart != empty -%}
{{ 'sections.cart.title' | t }}
{%- for item in cart.items -%}
{%- endfor -%}
{{ 'sections.cart.headings.product' | t }}
{{ 'sections.cart.headings.total' | t }}
{{ 'sections.cart.headings.quantity' | t }}
{{ 'sections.cart.headings.total' | t }}
{% if item.image %}
{% comment %} Leave empty space due to a:empty CSS display: none rule {% endcomment %}
{% endif %}
{%- if settings.show_vendor -%}
{{ item.product.vendor }}
{%- endif -%}
{{ item.product.title | escape }}
{%- if item.original_price != item.final_price -%}
{{ 'products.product.price.regular_price' | t }}
{{- item.original_price | money -}}
{{ 'products.product.price.sale_price' | t }}
{{ item.final_price | money }}
{%- else -%}
{{ item.original_price | money }}
{%- endif -%}
{%- if item.product.has_only_default_variant == false
or item.properties.size != 0
or item.selling_plan_allocation != null
-%}
{%- if item.product.has_only_default_variant == false -%}
{%- for option in item.options_with_values -%}
{{ option.name }}:
{{ option.value }}
{%- endfor -%}
{%- endif -%}
{%- for property in item.properties -%}
{%- assign property_first_char = property.first | slice: 0 -%}
{%- if property.last != blank and property_first_char != ‘_’ -%}
{%- endif -%}
{%- endfor -%}
{{ item.selling_plan_allocation.selling_plan.name }}
{%- endif -%}
{%- for discount in item.discounts -%}
{%- render 'icon-discount' -%}
{{ discount.title }}
{%- endfor -%}
{%- if item.original_line_price != item.final_line_price -%}
{{ 'products.product.price.regular_price' | t }}
{{ item.original_line_price | money }}
{{ 'products.product.price.sale_price' | t }}
{{ item.final_line_price | money }}
{%- else -%}
{{ item.original_line_price | money }}
{%- endif -%}
{%- if item.variant.available and item.unit_price_measurement -%}
{{ 'products.product.price.unit_price' | t }}
{{ item.variant.unit_price | money }}
/
{{ 'accessibility.unit_price_separator' | t }}
{%- if item.variant.unit_price_measurement.reference_value != 1 -%}
{{- item.variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ item.variant.unit_price_measurement.reference_unit }}
{%- endif -%}
{{ 'products.product.quantity.label' | t }}
{{- 'products.product.quantity.decrease' | t: product: item.product.title | escape -}}
{% render 'icon-minus' %}
{{- 'products.product.quantity.increase' | t: product: item.product.title | escape -}}
{% render 'icon-plus' %}
<cart-remove-button
id=“Remove-{{ item.index | plus: 1 }}”
data-index=“{{ item.index | plus: 1 }}”
<a
href=“{{ item.url_to_remove }}”
class=“button button–tertiary”
aria-label=“{{ ‘sections.cart.remove_title’ | t: title: item.title }}”
{% render ‘icon-remove’ %}
{%- if item.original_line_price != item.final_line_price -%}
{{ 'products.product.price.regular_price' | t }}
{{ item.original_line_price | money }}
{{ 'products.product.price.sale_price' | t }}
{{ item.final_line_price | money }}
{%- else -%}
{{ item.original_line_price | money }}
{%- endif -%}
{%- if item.variant.available and item.unit_price_measurement -%}
{{ 'products.product.price.unit_price' | t }}
{{ item.variant.unit_price | money }}
/
{{ 'accessibility.unit_price_separator' | t }}
{%- if item.variant.unit_price_measurement.reference_value != 1 -%}
{{- item.variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ item.variant.unit_price_measurement.reference_unit }}
{%- endif -%}
{%- endif -%}
{{ 'accessibility.loading' | t }}
{% schema %}
{
“name”: “t:sections.main-cart-items.name”,
“settings”: [
{
“type”: “header”,
“content”: “t:sections.all.padding.section_padding_heading”
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_top”,
“default”: 36
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 4,
“unit”: “px”,
“label”: “t:sections.all.padding.padding_bottom”,
“default”: 36
}
]
}
{% endschema %}