content in the HTML field conditional...

User 2062767 Photo


Registered User
166 posts

Hi,
Please can anyone help with this?

I am trying to put some content in the HTML field on the cart page of SCC but I only want it to show when there is something in my cart.

I have tried the if/else jarvascript, using a stylesheet but nothing seems to work.

Has anyone got any tips please.
www.heylisflorist.co.uk - My Florist Shop.
www.woodentopstoys.co.uk - My Wooden Toy Shop.

I use CoffeeCup HTML Editor, WIS, Direct ftp, Sitemapper, Website Insite & RED Personal to create my websites.

Send your parcels with Despatch Bay! Signup using this code and get £10.00 worth of free shipping http://despatchbaypro.com/s/1H431
User 187934 Photo


Senior Advisor
20,244 posts

Hi Sue.
Give this a try.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$( document ).ready(function() {
if ( $("#scs_cart_no_items").length) {
$("#speacial").hide();
} else{$("#speacial").show();}
});
</script><div id="speacial">You have items in your cart.</div>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.