[TYPO3-commerce] Invalid HTML (templates and some hardcoded values) + bugfix
Franz Koch
typo.removeformessage at fx-graefix.de
Mon Sep 3 14:44:36 CEST 2007
Hi list,
the templates and some of the hardcoded form elements are not valid
HTML. On several points in the templates (products and basket) the
input-fields have a wrong type:
--- current and wrong -------------------------------
<input class="textfield short" value="###QTY_INPUT_VALUE###"
name="###QTY_INPUT_NAME###" type="input"
id="articleqty_###ARTICLE_UID###" size="5" />
--- correct -----------------------------------------
<input class="textfield short" value="###QTY_INPUT_VALUE###"
name="###QTY_INPUT_NAME###" type="text"
id="articleqty_###ARTICLE_UID###" size="5" />
-----------------------------------------------------
type="input" is not valid - type="text" is correct!
Also the lable-tags in the basket shipping and payment selectors are
wrong and actually don't work, as they use disallowed characters in the
tag as well as the id of the selectboxes are missing to which the labels
actually link to.
--- current and wrong --------------------------------
<label for="tx_commerce_pi1[payArt]">Zahlungsart: </label>
<select name="tx_commerce_pi1[payArt]" onChange="this.form.submit()">
<option value="1" selected>Rechnung</option>
<option value="4">Nachnahme</option>
</select>
--- correct -----------------------------------------
<label for="tx_commerce_pi1_payArt">Zahlungsart: </label>
<select name="tx_commerce_pi1[payArt]" onChange="this.form.submit()"
id="tx_commerce_pi1_payArt">
<option value="1" selected>Rechnung</option>
<option value="4">Nachnahme</option>
</select>
-----------------------------------------------------
So the label-tag has to be changed in the template and the select-boxes
need to get an id in class.tx_commerce_pi2.php on lines:
468:
-----
$select = '<select name="'.$this->prefixId.'[delArt]"
id="'.$this->prefixId.'_delArt" onChange="this.form.submit()">';
524:
-----
$select = '<select name="'.$this->prefixId.'[payArt]"
id="'.$this->prefixId.'_payArt" onChange="this.form.submit()">';
Maybe the same for the attribute-select-boxes - but I haven't had a look
at those yet.
--
Kind regards,
Franz Koch
More information about the TYPO3-project-commerce
mailing list