# WAIT: Issues with Dynamic Styling for Empty Shopping Cart in Bricks Builder

**URL:** <https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337>\
**Category:** Bugs\
**Tags:** v1-8-1\
**Created:** [June 25, 2023, 12:46am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337 "2023-06-25T00:46:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Artjom](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@Artjom](https://forum.bricksbuilder.io/u/Artjom)\
**Post date:** [June 25, 2023, 12:46am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/1 "2023-06-25T00:46:19Z")

</div>

Hello Bricks Community,

I’m working on a shopping cart system and have set up two templates using the Bricks Builder: one for when the shopping cart has items, and another for an empty cart. Everything functions well except for one specific issue.

When I have products in the cart and decide to remove them while in the cart, the empty cart template is triggered. However, not all styles are loaded at this point. For instance, the header image is missing, and the button appears unstyled.

If I refresh the page (F5), the styles load correctly. The issue only seems to occur when I remove the last item, and the empty cart appears. On first load, the styles are not applied, but after a refresh, everything looks fine.

I would appreciate any insights or advice on this matter. Specifically, I’m looking for a way to ensure the styles for the empty cart load dynamically and correctly when the last item is removed, without needing to refresh the page.

Thank you in advance for your help!

Rgds,  
Artjom

---

<div class="post-metadata">

**Author:** ![manc](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@manc](https://forum.bricksbuilder.io/u/manc)\
**Post date:** [June 25, 2023, 1:07am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/2 "2023-06-25T01:07:01Z")

</div>

Are the styles of the elements in those templates assigned to the ID or a class? I’ve had a fairly similar issue before (not invving woocommerce though), where my conditional template styles would only show correctly if all styles were done on a class level.

Might be worth a shot to copy over the ID styles to a class for each element, then re generate external css files and check again.

---

<div class="post-metadata">

**Author:** ![Artjom](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@Artjom](https://forum.bricksbuilder.io/u/Artjom)\
**Post date:** [June 25, 2023, 1:32am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/3 "2023-06-25T01:32:53Z")

</div>

Hi Manc,  
Thank you for your reply. No, I used only classes. A banner image is not loading correctly, and the button is unstyled. The button has a class that I used for all other buttons as well.  
But it’s a good idea to try to style this button without any classes, maybe it will help.

---

<div class="post-metadata">

**Author:** ![Artjom](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@Artjom](https://forum.bricksbuilder.io/u/Artjom)\
**Post date:** [June 25, 2023, 1:34am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/4 "2023-06-25T01:34:55Z")

</div>

Yes, it works. The button looks good now. It’s just the banner that is still not loading.

---

<div class="post-metadata">

**Author:** ![manc](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@manc](https://forum.bricksbuilder.io/u/manc)\
**Post date:** [June 25, 2023, 2:27am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/5 "2023-06-25T02:27:03Z")

</div>

Hmm so it works the opposite way as it did for me.

Does the banner work with inline styles vs external files?

If the styles are fairly basic, you could try manually writing the css into your child themes style.css. That way they should always be present and you don’t have to rely on the template loading it’s styles (although of course it would be neat if that fully worked eventually)

---

<div class="post-metadata">

**Author:** ![Artjom](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@Artjom](https://forum.bricksbuilder.io/u/Artjom)\
**Post date:** [June 25, 2023, 7:37pm UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/6 "2023-06-25T19:37:01Z")

</div>

I also found a solution for the banner. I have disabled “Lazy Load” for the banner.  
So everything is working fine now.

Thanks for your help, it really helped.

Rgds,  
Artjom

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [June 26, 2023, 9:30am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/7 "2023-06-26T09:30:38Z")

</div>

Hi Artjom,  
Thanks so much for your report!

Can you do us a favor and create the problem as simple as possible in a test installation, recording a screencast so we have reproducible steps?

Feel free to send us the screencast link, access data, and a link to this thread to [help@bricksbuilder.io](mailto:help@bricksbuilder.io). This is probably the fastest way to track down the problem.

Best regards,  
timmse

---

<div class="post-metadata">

**Author:** ![Yada](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/y/6a8cbe/32.png) [@Yada](https://forum.bricksbuilder.io/u/Yada)\
**Post date:** [April 23, 2024, 11:24am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/8 "2024-04-23T11:24:12Z")

</div>

Hello,  
Still no positive feedback about this issue?

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [April 23, 2024, 11:26am UTC](https://forum.bricksbuilder.io/t/wait-issues-with-dynamic-styling-for-empty-shopping-cart-in-bricks-builder/13337/9 "2024-04-23T11:26:52Z")

</div>

Hi Houcine,  
Welcome to the forum!

As it stands, we didn’t get any of the information I asked for at the time. Accordingly, the issue came to nothing…

If the problem still exists for you, although the thread starter seems to have been able to solve it somehow:

> [@timmse](#):
>
> Can you do us a favor and create the problem as simple as possible in a test installation, recording a screencast so we have reproducible steps?
> 
> Feel free to send us the screencast link, access data, and a link to this thread to [help@bricksbuilder.io](mailto:help@bricksbuilder.io). This is probably the fastest way to track down the problem.
