Changing Add to Cart button text on load when using ajaxify-cart

Solved
New Member
2 0 0

The site is in French: subdirectmagazinesfr.com - Using Simple theme

 

Once you click the Add to Cart button, the text changes to “Ajouter au panier” (good). But when you first arrive on the page, the text is in English (bad).

 

How can I change the text on the Add to Cart button from “Add to Cart” to “Ajouter au panier” when you first load the site?

 

For background, I am using ajaxify-cart.liquid …

 

Things I've tried:

 

edit languages > products > change text to "Ajouter au panier" - that does not solve

edit ajaxify-cart.liquid > changed addToCartBtnLabel - that doesn't change the original (on load) English text.

Thanks!

 

0 Likes

Success.

Shopify Expert
2490 417 525

Hi @magazines 

You have to find "Add to cart" as value on snippet->product-card-grid file.

You can fin '<input type="submit" value="Add to cart" class="btn">'  on this file

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
1 Like
New Member
2 0 0

That did the trick! I found it in product.grid.item.liquid.

 

New question: How do I make the font slightly smaller? The new text (in French) gets cut off on the right hand side of the button. See site here: subdirectmagazinesfr.com or attached image.2019-09-28_17-20-09.png

 

Thanks!!

0 Likes
Shopify Expert
2490 417 525

Add this css in Asset->theme.scss at bottom

.featured-products .product [type="submit"]{font-size: 12px;}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes