Shopify themes, liquid, logos, and UX
The normal cart icon is ok but when i add something in the cart the icon dissapiers and this shows pls help (DAWN THEME)
Solved! Go to the solution
This is an accepted solution.
@NOT1, replace this below code of yours which contains this class "header__icon header__icon--cart link focus-inset". search this anchor tag and replace with below code of anchor tag and see.
<a href="{{ routes.cart_url }}" class="header__icon header__icon--cart link focus-inset" id="cart-icon-bubble"> {%- liquid if cart == empty render 'icon-cart-empty' else render 'icon-cart' endif -%} <span class="visually-hidden">{{ 'templates.cart.cart' | t }}</span> {%- if cart != empty -%} <div class="cart-count-bubble"> {%- if cart.item_count < 100 -%} <span aria-hidden="true">{{ cart.item_count }}</span> {%- endif -%} <span class="visually-hidden">{{ 'sections.header.cart_count' | t: count: cart.item_count }}</span> </div> {%- endif -%} </a>
This is an accepted solution.
Hello! Please follow these steps to add this CSS code:
1. Go to your Online Store
2. Click on "Themes"
3. Select "Edit code"
4. Open your CSS file.
5. Open "base.css".
6. Add the following code at the file.
Search CSS of ".cart-count-bubble", and update this CSS below,
.cart-count-bubble {
position: absolute;
background-color: rgb(var(--color-button));
color: rgb(var(--color-button-text));
height: 1.5rem;
width: 1.5rem;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 9px;
bottom: .8rem;
left: 2.2rem;
line-height: normal;
}
This is an accepted solution.
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.cart-count-bubble {
height: 1.4rem !important;
width: 1.4rem !important;
font-size: 0.8rem !important;
}
</style>
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Hello @NOT1, You do a mistake with to put some code or add some content in your file of header.liquid.
Go to online store -> open edit code -> open header.liquid file.
check here the below code and revert if done a changes in past or having some content of code,
Feel free to reach out if you have any questions or need assistance.
Best Regards,
DWS.
This is an accepted solution.
@NOT1, replace this below code of yours which contains this class "header__icon header__icon--cart link focus-inset". search this anchor tag and replace with below code of anchor tag and see.
<a href="{{ routes.cart_url }}" class="header__icon header__icon--cart link focus-inset" id="cart-icon-bubble"> {%- liquid if cart == empty render 'icon-cart-empty' else render 'icon-cart' endif -%} <span class="visually-hidden">{{ 'templates.cart.cart' | t }}</span> {%- if cart != empty -%} <div class="cart-count-bubble"> {%- if cart.item_count < 100 -%} <span aria-hidden="true">{{ cart.item_count }}</span> {%- endif -%} <span class="visually-hidden">{{ 'sections.header.cart_count' | t: count: cart.item_count }}</span> </div> {%- endif -%} </a>
Hey thanks i got the solution can you help me reducing the circle size and maybe the number text size cuz if the circle size changes it it look bad
Yes sure, looking to it.
This is an accepted solution.
Hello! Please follow these steps to add this CSS code:
1. Go to your Online Store
2. Click on "Themes"
3. Select "Edit code"
4. Open your CSS file.
5. Open "base.css".
6. Add the following code at the file.
Search CSS of ".cart-count-bubble", and update this CSS below,
.cart-count-bubble {
position: absolute;
background-color: rgb(var(--color-button));
color: rgb(var(--color-button-text));
height: 1.5rem;
width: 1.5rem;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 9px;
bottom: .8rem;
left: 2.2rem;
line-height: normal;
}
Hi !! I also want to add the cart icon next to cart to make it more vissible, now it's in the menu on the left under our journal. So we wanted to make it bold with the cart icon and maybe just separate it from the menu like the line of "blending creativity...". Is this possible? thanks! www.sentientthebrand.com
This is an accepted solution.
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.cart-count-bubble {
height: 1.4rem !important;
width: 1.4rem !important;
font-size: 0.8rem !important;
}
</style>
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Hi !! I also want to add the cart icon next to cart to make it more vissible, now it's in the menu on the left under our journal. So we wanted to make it bold with the cart icon and maybe just separate it from the menu like the line of "blending creativity...". Is this possible? thanks! www.sentientthebrand.com
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024