Add Custom Text or Change Text Size on Cart Page

Highlighted
New Member
1 0 0

Hi

Is there any way to change text size on the cart page?  I would like to make "Shipping, taxes, and discounts will be calculated at checkout." a little larger or maybe even bold.

Or better yet, could I write some custom text on the page?

If someone could offer specific instructions it would be greatly appreciated.

Thanks!

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
400 0 73

Hi Timothy,

Britton here with the Shopify support team.

If you want to write some custom text on your cart page you can do that by editing the cart.liquid template in your theme files. The object that pulls in the "Shipping, taxes, and discounts will be calculated at checkout." sentence in the cart is usually: 

{{ 'cart.general.shipping_at_checkout' | t }}

So, if you locate the in cart.liquid you can either replace it with whatever text you actually want there, or you can add it above or below if you want it to stay but to have your custom text appear in a similar place.

If you are wanting to control it's font size and make it bold you could use something like this to add in your custom text:

<p id="custom-text">YOUR CUSTOM TEXT GOES HERE</p>

Then, add this to the bottom of your main CSS file:

#custom-text {
font-size:15px;
font-weight: bold;
}

You can play around with the numbers in the above CSS to change around the font size. Remember to back up your theme by duplicating it before making any changes.

I hope that helps!

-Britton

Britton Shopify Guru
Highlighted
Shopify Expert
94 1 7

Just thought I would mention that we have released an App for the Shopify community which allows Store owners to "beautify" their cart page without the need to code. It's called Kartify and it can: 

  • Add a banner to your cart page
  • Display a promotional offer
  • Incentivise a checkout with a coupon code
  • Cross promote a product or collection
  • Display Secure Checkout Badges and Trust Seals
  • Show a custom message or notification
  • Increase Average Order Value & Conversion Rate

You can get it from the App store here.

 

Shopify Expert, Apps & Support - https://www.launchtip.com
0 Likes
Highlighted
Tourist
3 0 2

Hi I know this thread is old, but, is it possible to ad a link to specifik words in that code-string?

An example: <p id="custom-text">Did you remember to buy this or this or this produkt.?</p> ?

 

If so, what should I write? I am not very good at coding, so have no clue :) Would be very helpful.

 

EDITED. I figured it out. :)

Highlighted
New Member
3 0 0
I want to make the size of the quantity in the cart larger. How do I do that?
0 Likes
Highlighted
Tourist
3 0 1

hi there, could you please share how you did it? struggling with it at the moment.

0 Likes
Highlighted
Tourist
3 0 2

Sure I can.

In the code, I edited the cart.template.liquid file, and added this line just below: <h1 class="cart-header__title">{{ 'cart.general.title' | t }}</h1>

<p id="custom-text">Did you remember to buy <a href="https://gundam-store.dk/collections/tilbehor/products/bandai-spirits-entry-nipper-bla/"><span style="color: #0000EE; font-size:100%;text-decoration: underline;
font-weight: bold;">nipper, </a><a href="https://gundam-store.dk/collections/tilbehor-1"><span style="color: #0000EE; font-size:100%;text-decoration: underline;
font-weight: bold;">Gundam Markers</a><a href="https://gundam-store.dk/collections/baser">, or <span style="color: #0000EE; font-size:100%;text-decoration: underline;font-weight: bold;">base?</a></p>

 

Change the URL to whatever you are trying to link to. The red tekst is what you want to write, and the rest is just underline and colorcode. I hope it helps.

Highlighted
Tourist
3 0 1

Oh, thanks - that is super helpful. Worked right away - really appreciate it!

Have a great one

Highlighted
New Member
2 0 0

my font seems to only work in capital letters, so is there a way to change cart to CART in the code? thanks

0 Likes
Highlighted
Tourist
3 0 2
What theme are you running?

Can't you do it under webshop/edit language, search for cart, and replace
with CART?

0 Likes