Want to add text to the cart page (Testament Theme)

dreamtechzone_5
Shopify Partner
267 1 32

Hello Everyone!

This is the Shopify Testament theme. I haven't live the theme yet. I'm doing a free trial. I want to add text to the marked place on the cart page and pop-up page, Is it possible? Text Here (We prioritize small batches for fresh products every time. Don't forget to explore retail stores in the menu) Thank you.

https://themes.shopify.com/themes/testament/styles/genesis/preview

Pop Up Page

Screenshot 2024-05-03 145523.png

Cart Page

Screenshot 2024-05-03 145554.png

Replies 4 (4)

sgtlab
Shopify Partner
30 6 8

You can try this code snippet.Insert the code into `<head>` tags

 

 

<script>
// Create a new paragraph element
var p = document.createElement("p");
p.textContent = "We prioritize small batches for fresh products every time. Don't forget to explore retail stores in the menu";

// Find the div with class 'total' inside 'ajax-cart__final-details'
var finalDetailsDiv = document.querySelector('.ajax-cart__final-details');
var totalDiv = finalDetailsDiv ? finalDetailsDiv.querySelector('.total') : null;

// Insert the new paragraph after the div
if (totalDiv) {
    totalDiv.parentNode.insertBefore(p, totalDiv);
}
</script>

 

 

 If you're unfamiliar with this process, you can install our custom-code-inserter app and follow the tutorial here:
https://files.sgt-lab.com/dd0047b81714704191.webm

 

After inserting the code, make sure it is activated and reload the page. Let us know if this helps!

SGTLab
- Press like to let us know if our reply was helpful - Thank you!
- Come visit us at SGTLab
- Support us with a coffee tip
dreamtechzone_5
Shopify Partner
267 1 32

I have pasted the code but it is not working.

Screenshot 2024-05-03 170720.png

sgtlab
Shopify Partner
30 6 8

Sorry for the late reply. To add custom text to the cart page and pop-up on the Shopify Testament theme, you can indeed make adjustments directly in the theme editor. Here's a more detailed step you can try:

  1. From your Shopify admin, go to Online Store > Themes.
  2. Find the Testament theme and click on Customize.
  3. Navigate to the cart page or pop-up within the theme editor.
  4. Look for sections where you can add or edit text. This might be in a section labeled something like “Cart page” or “Pop-up settings.”

If you don't see an option to add the text directly, you might need to modify the theme's code:

  • Access the theme code by clicking on Actions > Edit code.
  • You'll likely need to edit files such as cart.liquid or a similar snippet that controls the pop-up. Add your text where appropriate in the HTML.

If you're not comfortable editing the theme code yourself, it might be a good idea to consult with the theme developer for guidance or consider hiring a Shopify expert.

 

Best of luck with your store!

SGTLab
- Press like to let us know if our reply was helpful - Thank you!
- Come visit us at SGTLab
- Support us with a coffee tip

PageFly-Noah
Astronaut
1119 201 220

This is Noah from PageFly - Shopify Page Builder App


Hi @dreamtechzone_5  Yes, sure, You can add code or paragraph by find file code in theme and insert body to it:

PageFlyNoah_0-1714813925397.png

PageFlyNoah_1-1714814291674.png

PageFlyNoah_2-1714814361167.png

Hope my solution will help you resolve the issue.

 

Best regards,

Noah | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.