Hi,
I’m using Dawn theme and I have my Cart as a drawer and I would like to keep the same visual, but change the link of the button from Check Out to View Cart.
I need to do this because buyers can choose the delivery option in the Cart page before moving to the Check out.
How can I replace the destination of the Button in the drawer from Check Out to View Cart.
From this
to this
Hi @Karlis_1 , to change the ‘Check Out’ button to ‘View Cart’ in your Dawn theme cart drawer, locate the cart drawer Liquid file (like cart-drawer.liquid ), find the ‘Check Out’ button code, and change its href attribute from /checkout to /cart . Also, update the button text to ‘View Cart’ within the same code snippet. This will redirect users to the cart page instead of directly to checkout.
Hi,
My cart-drawer.liquid file is empty, please see below.
My store - https://evb3jdd3x0vpoh91-73052062039.shopifypreview.com
The actual code for the cart drawer is in a snippet file with same name. Try to find the file in the Snippets folder.
Hi,
For the life of me, i can’t find it. Copied out the code, could you bold the place were should I change it? Thank you!
{% comment %}
Renders cart drawer
Usage:
{% render ‘cart-drawer’ %}
{% endcomment %}
{{ ‘quantity-popover.css’ | asset_url | stylesheet_tag }}
{{ ‘component-card.css’ | asset_url | stylesheet_tag }}
.drawer {
visibility: hidden;
}
{%- if cart == empty -%}
{{ 'sections.cart.empty' | t }}
{% render 'icon-close' %}
{{ '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 settings.cart_drawer_collection != blank -%}
{% render 'card-collection', card_collection: settings.cart_drawer_collection, columns: 1 %}
{%- endif -%}
{%- endif -%}
{{ 'sections.cart.title' | t }}
{% render 'icon-close' %}
{%- if cart != empty -%}
{%- for item in cart.items -%}
{%- liquid
assign has_qty_rules = false
if item.variant.quantity_rule.increment > 1 or item.variant.quantity_rule.min > 1 or item.variant.quantity_rule.max != null
assign has_qty_rules = true
endif
assign has_vol_pricing = false
if item.variant.quantity_price_breaks.size > 0
assign has_vol_pricing = true
endif
-%}
{%- endfor -%}
{{ 'sections.cart.headings.image' | t }}
{{ 'sections.cart.headings.product' | t }}
{{ 'sections.cart.headings.total' | t }}
{{ 'sections.cart.headings.quantity' | 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 -}}
{%- unless forloop.last %}, {% endunless %}
{%- 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.line_level_discount_allocations -%}
{%- render 'icon-discount' -%}
{{ discount.discount_application.title }}
{%- endfor -%}
{%- render 'loading-spinner' -%}
{%- 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.unit_price | money }}
/
{{ 'accessibility.unit_price_separator' | t }}
{%- if item.unit_price_measurement.reference_value != 1 -%}
{{- item.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ item.unit_price_measurement.reference_unit }}
{%- endif -%}
{{-
'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' %}
{% render 'icon-remove' %}
{%- if has_qty_rules or has_vol_pricing -%}
{% render 'icon-info' %}
{%- if has_vol_pricing -%}
{{ 'products.product.volume_pricing.note' | t }}
{%- elsif has_qty_rules -%}
{{ 'products.product.quantity.note' | t }}
{%- endif -%}
{%- endif -%}
{%- if has_vol_pricing or has_qty_rules -%}
{%- if has_qty_rules == false -%}
{{- 'products.product.volume_pricing.title' | t -}}
{%- endif -%}
{%- if item.variant.quantity_rule.increment > 1 -%}
{{-
'products.product.quantity.multiples_of'
| t: quantity: item.variant.quantity_rule.increment
-}}
{%- endif -%}
{%- if item.variant.quantity_rule.min > 1 -%}
{{-
'products.product.quantity.minimum_of'
| t: quantity: item.variant.quantity_rule.min
-}}
{%- endif -%}
{%- if item.variant.quantity_rule.max != null -%}
{{-
'products.product.quantity.maximum_of'
| t: quantity: item.variant.quantity_rule.max
-}}
{%- endif -%}
{%- render 'icon-close' -%}
{%- if item.variant.quantity_price_breaks.size > 0 -%}
{{ item.variant.quantity_rule.min }}+
{{ item.variant.price | money_with_currency }}/ea
{%- for price_break in item.variant.quantity_price_breaks -%}
{{- price_break.minimum_quantity -}}
+
{{ price_break.price | money_with_currency }}/ea
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{{ 'accessibility.loading' | t }}
{%- if settings.show_cart_note -%}
{{ 'sections.cart.note' | t }}
{% render 'icon-caret' %}
{{ 'sections.cart.note' | t }}
{{ cart.note }}
{%- endif -%}
{%- if cart.cart_level_discount_applications.size > 0 -%}
{%- for discount in cart.cart_level_discount_applications -%}
{%- render 'icon-discount' -%}
{{ discount.title }}
(-{{ discount.total_allocated_amount | money }})
{%- endfor -%}
{%- endif -%}
{{ 'sections.cart.estimated_total' | t }}
{{ cart.total_price | money_with_currency }}
{%- if cart.taxes_included and shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_included_and_shipping_policy_html' | t: link: shop.shipping_policy.url }}
{%- elsif cart.taxes_included -%}
{{ 'sections.cart.taxes_included_but_shipping_at_checkout' | t }}
{%- elsif shop.shipping_policy.body != blank -%}
{{ 'sections.cart.taxes_and_shipping_policy_at_checkout_html' | t: link: shop.shipping_policy.url }}
{%- else -%}
{{ 'sections.cart.taxes_and_shipping_at_checkout' | t }}
{%- endif -%}
{{ 'sections.cart.update' | t }}
<button
type=“submit”
id=“CartDrawer-Checkout”
class=“cart__checkout-button button”
name=“checkout”
form=“CartDrawer-Form”
{% if cart == empty %}
disabled
{% endif %}
{{ ‘sections.cart.checkout’ | t }}
Hi @Karlis_1 ,
This is Theodore from PageFly - Shopify Page Builder App.
Go to the admin panel, select “Online Store” > “Themes,” modify the code for “cart-drawer.liquid,” locate the “Check Out” button snippet, change the text, save, and preview the changes to alter the “Check Out” button wording in Shopify’s Dawn theme.
I’ll be so happy if my suggestion can help to solve your problem. If you have any further questions, please feel free to tell me.
Best regards,
Theodore | PageFly
Hi,
Could you be more specific? I can’t find the href attribute from /checkout. And have no idea what do change.
You just need to find the text “check out”
Here is the quick fix with video guide. You can solve this in any theme: