How to Change Background Color for td.checkout_err

Questions and answers about ShopSite Custom Templates

How to Change Background Color for td.checkout_err

Postby gadgethappy » Tue Sep 06, 2011 8:07 am

I am using a custom shopping cart template and I need to change the background color of the check out error section or the text color. It is currently showing a background FFFFCC which is light yellow and white or light text.
The template is pulling css information from Modern_sc_cart.css and I have tried changing the information in that template to change the background or text color but have not been successful. I even tried putting code in the head section of my shopping cart template and still get the same background and text.
Maybe I am not entering the code right?

The current code in the Modern_sc_cart.css is:

table.checkout_err, inv_err {
margin-left: auto;
margin-right: auto;
}

td.checkout_err, inv_err {
color: #[-- STORE.SC_TextColor --];
background-color: #[-- STORE.SC_shadecolor --];
}

Is there a specific placement of code to change the color scheme? What exact code either here or in the head of the cart template should be used?

Thanks
gadgethappy
 

Re: How to Change Background Color for td.checkout_err

Postby Jim » Tue Sep 06, 2011 12:41 pm

What version of ShopSite are you using? In some earlier versions the background for errors was hard coded and could not be changed. When you get the error look at the html source of the screen it is on and see if there is a class assigned to the td itself. If there is a class assigned then you should be able to change the color by including the color in the style.

Note that the last style read is the one that is used so if the ShopSite style comes after your style then that will be what is used. So make sure you put your style after the ShopSite generated one or modify the ShopSite style itself.

Also note that different shopping cart screens may use different style sheets, So look at the particular section of the shopping cart template that is for the screen the error is displaying on and make sure that you modify the style sheet used for that section..
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: How to Change Background Color for td.checkout_err

Postby gadgethappy » Tue Sep 06, 2011 4:11 pm

Hi I am using shopsite Pro vs 10

The error is:

<table class="inv_err" border="1" cellpadding="5" cellspacing="0">
<tr>
<td class="inv_err" bgcolor="#FFFFCC">
<img src="http://www.theinhome.com/shopsite/shopsite-images/en-US/msg/warning-yellow.gif" width="30" height="29">
</td>
<td class="inv_err" bgcolor="#FFFFCC">

The style sheet is Modern_sc_cart.css
I have changed that to add a different font color and background but maybe not doing it correctly.

Thanks
gadgethappy
 

Re: How to Change Background Color for td.checkout_err

Postby Jim » Wed Sep 07, 2011 12:44 pm

In this case the style is being overridden by a hard coded color
<td class="inv_err" bgcolor="#FFFFCC">
So even though you change the style of inv_err to be a different color, the bgcolor="#FFFFCC" comes later in the code and is used by the browser.

I don't know if there is a way that you can fix this using a style unless there is someway that you can redefine #FFFFCC to be a different color.

I'm pretty sure that this has been fixed in later versions of ShopSite. The current version is ShopSite 11.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: How to Change Background Color for td.checkout_err

Postby gadgethappy » Sat Feb 04, 2012 10:44 am

I am wondering if anyone else has encounter this error?

My web host will not update to Shopsite 11 so with the holiday rush over I am looking at this again.

I was able to create an inventory error and a check out error at the same time. The check out error is fine, the background is the correct color and the text is the correct color however the inventory error has a different background than the check out error even though it appears they get the information from the same place:

table.checkout_err, inv_err {
margin-left: auto;
margin-right: auto;
}

td.checkout_err, inv_err {
color: #[-- STORE.SC_TextColor --];
background-color: #[-- STORE.SC_shadecolor --];
}

Should there be a separate error code for inv_err?

Thanks
gadgethappy
 

Re: How to Change Background Color for td.checkout_err

Postby Jim » Sat Feb 04, 2012 9:29 pm

As I mentioned in an earlier post the code outputs a bgcolor="#FFFFCC" after the class="inv_err" part of the code. That means that the bgcolor will override whatever the style color is. The inv class that you gave in your post would be the correct one but because of the hard coded value the color you specify there won't apply.

I know this has been fixed in more recent versions so the best solution is to upgrade. But if that is not possible you might try some fancy css to see if you could redefine the bgcolor="#FFFFCC" to be something else. I'm not a css expert but It may be possible to redefine that in some way, a web search might give you some ideas.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: How to Change Background Color for td.checkout_err

Postby gadgethappy » Sat May 25, 2013 1:38 pm

Well I finally had time to spend and figured out the issue so thought I would share in case anyone else is having the same issue.
In the cart .css file that I posted before

table.checkout_err, inv_err {
margin-left: auto;
margin-right: auto;
}

td.checkout_err, inv_err {
color: #[-- STORE.SC_TextColor --];
background-color: #[-- STORE.SC_shadecolor --];
vertical-align: middle;
}

I separated checkout_err and inv_err to be two separate entries in the .css file and it fixed the issue. I can actually read the error message in the shopping cart now.
gadgethappy
 


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 8 guests

cron