Jump to content

Changing text in the Shopping cart page with CSS

Recommended Posts

Site URL: https://www.bomzis.life/

Hello,

What im trying to do is translate (replace) the circled text to latvian with CSS.

I've managed to find code for the cart title but also wanted to change these but couldnt find any code.

Can you help me?

I've also found info that there is no way to change the chekout page with custom code so my question is is there any option for me at all to translate it ?

shopping cart.png

Link to comment

Oh yes sorry about that 

i sent you an email with the password

also i was looking into changing the empty cart text and found some code but it didnt seem to work for me so if thats something you can help me with that would be amazing too

Link to comment
On 6/8/2021 at 12:52 PM, TettRamm said:

Add to Settings > Advanced > Code Injection > Header

<style>
/* Cart page */
.cart-item-list-labels>span:first-child span {
    visibility: hidden;
}
.cart-item-list-labels>span:first-child span:before {
    visibility: visible;
    content: "new item";
}
.cart-item-list-labels>div:nth-child(4) span span {
    visibility: hidden;
}
.cart-item-list-labels>div:nth-child(4) span span:before {
    visibility: visible;
    content: "new qty";
}
.cart-item-list-labels>div:nth-child(5) span span {
    visibility: hidden;
}
.cart-item-list-labels>div:nth-child(5) span span:before {
    visibility: visible;
    content: "new price";
}
span._3qWE9VU-U span {
    visibility: hidden;
}
span._3qWE9VU-U span:after {
    visibility: visible;
    content: "new subtotal";
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $('.checkout-button span').html(function() { 
          return $(this).html().replace("CHECKOUT", "new checkout");  
    });
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
3 hours ago, tuanphan said:

Add to Settings > Advanced > Code Injection > Header


<style>
/* Cart page */
.cart-item-list-labels>span:first-child span {
    visibility: hidden;
}
.cart-item-list-labels>span:first-child span:before {
    visibility: visible;
    content: "new item";
}
.cart-item-list-labels>div:nth-child(4) span span {
    visibility: hidden;
}
.cart-item-list-labels>div:nth-child(4) span span:before {
    visibility: visible;
    content: "new qty";
}
.cart-item-list-labels>div:nth-child(5) span span {
    visibility: hidden;
}
.cart-item-list-labels>div:nth-child(5) span span:before {
    visibility: visible;
    content: "new price";
}
span._3qWE9VU-U span {
    visibility: hidden;
}
span._3qWE9VU-U span:after {
    visibility: visible;
    content: "new subtotal";
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $('.checkout-button span').html(function() { 
          return $(this).html().replace("CHECKOUT", "new checkout");  
    });
});
</script>

 

Thank you worked perfectly!

Link to comment
  • 2 weeks later...

site: https://mistoa.squarespace.com/cart

password: 1234

 

Hi!

I'm having the same problem. For some reason Item and Quantity were automatically translated to Spanish, but Price wasn't.

I need to change Price to Precio (see screenshot attached.)

I tried with the code provided by @tuanphan but it didn't replace Price but became PricePrecio.

Can someone help me?

Thanks!

 

 

Price.thumb.png.769499d9d5b6bf46b61a6efb64be0ada.png

 

Edited by Begona
Link to comment
On 6/24/2021 at 10:18 PM, Begona said:

site: https://mistoa.mx/cart

password: 1234

 

Hi!

I'm having the same problem. For some reason Item and Quantity were automatically translated to Spanish, but Price wasn't.

I need to change Price to Precio (see screenshot attached.)

I tried with the code provided by @tuanphan but it didn't replace Price but became PricePrecio.

Can someone help me?

Thanks!

 

 

Price.thumb.png.769499d9d5b6bf46b61a6efb64be0ada.png

 

Can you share link to a product or shop page?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 6/28/2021 at 9:13 PM, Begona said:

Hi @tuanphan

Sure, this is the link for the shop page: https://mistoa.mx/tienda

Thank you!!

Hi. It looks like you solved this?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 8 months later...
4 hours ago, candyshop said:

I managed to change some of texts but some remain unchanged.

Without knowing the exact changes you want to make I can only provide a general example. Add the following to Design > Custom CSS.

#cart:not( .button-style-default ) .sqs-editable-button.checkout-button,
#cart .cart-title,
#cart .N6WOGS95z /* subtotal */

  {
  
    color : red;
    
    }

 

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.