Adding Cart Total to Header with text and enlargements

New Member
1 0 0

Hello,

 

I found code that allows me to show the rolling cart total as users shop my site in the announcement bar but I'm having 3 issues.

 

1. I can't figure out how to make the text any bigger for the header text that I've added to the code

2. I can't add any text next to it like "Your Current Total Is"

3. I can't figure out how to make the total displayed include the 10% off from my promo code. If I can make it say something like "Wow you've saved $x" in the header along with the discounted total that would be even better. I know that would also require it to display a running updated saved $ amount which I also don't know how to do.

 

In the header.liquid I added this code to display the basket total in the announcement bar and it works fine the text is just too small.

 

{% if section.settings.message_link == blank %}
<div class="announcement-bar">
{% else %}
<a href="{{ section.settings.message_link }}" class="announcement-bar announcement-bar--link">
{% endif %}

<p class="announcement-bar__message">{{ section.settings.message_text | escape }}</p>
{{ cart.total_price | money_with_currency }}

{% if section.settings.message_link == blank %}
</div>
{% else %}
</a>
{% endif %}

{% endif %}
{% endif %}

 

I'm new to Shopify and any suggestions are greatly appreciated!

0 Likes
New Member
4 0 0

Hi there,

 

I am a web developer. If you're interested in hiring me to do the work send me a DM.

 

Thank you!

Aspen Media Group

0 Likes