Number of columns errors in view cart default pricelist layout

Started by Studio 42, June 12, 2015, 16:37:09 PM

Previous topic - Next topic

Studio 42

Hi,
i think the code for html render have to be reviewed in components\com_virtuemart\views\cart\tmpl\default_pricelist.php

I'm on changing it for a customer and find many little problem with colspan and the td tag and using align="right" is not html5
valid and hard to overide with CSS classes.
For the colspan, sometime the total of columns is 4 ,6 or 8, depending the settings and your card content.

The ideal for me is to add a class for each column, this can permit to remove all poor inline style. eg
Quotestyle="align:left;vertical-align:top;"
as this is recommanded by google for eg.

Greets,
Patrick

Studio 42

I reviewed the file myself,
in all case i had to do it for my customer.
I added $showTax = VmConfig::get ('show_tax'); at the begin of file, because it's used many time.
and $colspan setting for simplification.

Now the file is HTML5 + XHTML valid (i said this file, please don't report that the full hmtl is not valid, i know it)
No more colspan error.
Minimal inline styles> now use classes for TD text alignment
removed <strong> and use class because is not valid to have html in strong tags.

Download attached file remove the .txt extention and overide components\com_virtuemart\views\cart\tmpl\default_pricelist.php with this one.