![]() |
w3c validation question
I get this error from w3c validator
Quote:
I have had this error before on other sites too but am not sure how to make it valid. Anyone know? |
Re: w3c validation question
I also have an error caused by this line of code in /common_files/customer/main/product_prices.tpl
Code:
<div id="wl-prices"{if not $product_wholesale} style="display: none;"{/if}> the validator doesn't like that Code:
id="wl-prices" Code:
class="wl-prices" it validates fine but I don't know if that will break functionality or not. Anyone know if changing that is wrong? |
Re: w3c validation question
Styles need to go in the head tag - can't be in the body.
The unique ID one is one you are going to have to live with - but it doesn't affect display so just ignore it. |
Re: w3c validation question
So if the styles were part of a mod and they had them in the .tpl should I just cut them out and past them in with my main.css file?
|
Re: w3c validation question
Yep, you can consolidate the styles if that part of the validation is really important.
If the same id is appearing more than once it is probably a bug and may need to be reported. |
Re: w3c validation question
I'm not sure it is a bug because I think the multiple id's only shows up because I am using BCSE Easy Variant View mod which takes all the variants and lays them out in a table so customers can see all the products at once without having to click on each one from a drop down list. When the mod loops through all the variants it repeats the code from /common_files/customer/main/product_prices.tpl for each one. That is where the id is repeated. Not sure really how to fix that though. Like balinor said, I may just have to ignore it. I like having valid code though so I may start twitching once in while. :)
|
Re: w3c validation question
You can even change it to "class" or use the loop to add a number to it "wl-prices-1(2,3...)". This id is probably used by default cart js code to find/change wholesale pricing but since you have this bcse mod and you have the id repeating the cart will not know where to apply changes if needed anyway so that id is useless. If you don't have wholesale pricing it is not important anyway, if you have wholesale pricing they will not work as intended with the id repeating.
|
Re: w3c validation question
Yes, I usually take the css files for the mods and combine them with the main CSS file or put them in the head where they belong.
|
Re: w3c validation question
I'm attempting to set up the counter to add a number to the end of id="wl-prices" like Steve suggested. I'm not sure how to do it correctly. Here is what the set up is.
from /common_files/customer/main/bcse_evv.tpl: Code:
{foreach from=$variants key=vntid item=vnt}{*Loop through variants*} from customer/main/product_prices.tpl: Code:
<div id="wl-prices"{if not $product_wholesale} style="display: none;"{/if}> I'm thinking that I need to initiate a counter maybe here? (not quite sure of correct bracketing, etc) /common_files/customer/main/bcse_evv.tpl: Code:
then append the number to wl-prices like this somehow in customer/main/product_prices.tpl: Code:
<div id="wl-prices$counter"{if not $product_wholesale} style="display: none;"{/if}> Am I even close? :) |
Re: w3c validation question
Just change it to class and make your life easier :) Either way the XC builtin code will not work for wl-prices
|
All times are GMT -8. The time now is 05:26 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.