Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » Joomla »

S.O.S. HTML validator

Estas en el tema de S.O.S. HTML validator en el foro de Joomla en Foros del Web. Ayuda para el código de addtocart_form.tpl.php El código es este: <?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' ...
  #1 (permalink)  
Antiguo 08/11/2009, 07:09
 
Fecha de Ingreso: noviembre-2009
Mensajes: 3
Antigüedad: 11 años, 8 meses
Puntos: 0
S.O.S. HTML validator

Ayuda para el código de addtocart_form.tpl.php

El código es este:

<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName(__FILE__);

$button_lbl = $VM_LANG->_('PHPSHOP_CART_ADD_TO');
$button_cls = 'addtocart_button';
if( CHECK_STOCK == '1' && !$product_in_stock ) {
$button_lbl = $VM_LANG->_('VM_CART_NOTIFY');
$button_cls = 'notify_button';
$notify = true;
} else {
$notify = false;
}
?>

<form action="<?php echo $mm_action_url ?>index.php" method="post" name="addtocart" id="addtocart<?php echo $i ?>" class="addtocart_form" <?php if( $this->get_cfg( 'useAjaxCartActions', 1 ) && !$notify ) { echo 'onsubmit="handleAddToCart( this.id );return false;"'; } ?>>
<?php echo $ps_product_attribute->show_quantity_box($product_id,$product_id); ?><br />
<input type="submit" class="<?php echo $button_cls ?>" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
<input type="hidden" name="category_id" value="<?php echo @$_REQUEST['category_id'] ?>" />
<input type="hidden" name="product_id" value="<?php echo $product_id ?>" />
<input type="hidden" name="prod_id[]" value="<?php echo $product_id ?>" />
<input type="hidden" name="page" value="shop.cart" />
<input type="hidden" name="func" value="cartadd" />
<input type="hidden" name="Itemid" value="<?php echo $sess->getShopItemid() ?>" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="set_price[]" value="" />
<input type="hidden" name="adjust_price[]" value="" />
<input type="hidden" name="master_product[]" value="" />
</form>





Al chequearlo con el HTML validator me dice:

# Warning Line 200, Column 183: character "&" is the first character of a delimiter but occurred as data

…y = qty_el.value; if( !isNaN( qty ) && qty > 0 ) qty_el.value--;return false;



This message may appear in several cases:

* You tried to include the "<" character in your page: you should escape it as "&lt;"
* You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
* Another possibility is that you forgot to close quotes in a previous tag.

# Warning Line 200, Column 184: character "&" is the first character of a delimiter but occurred as data

… = qty_el.value; if( !isNaN( qty ) && qty > 0 ) qty_el.value--;return false;"



This message may appear in several cases:

* You tried to include the "<" character in your page: you should escape it as "&lt;"
* You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
* Another possibility is that you forgot to close quotes in a previous tag.

# Error Line 200, Column > 80: XML Parsing Error: xmlParseEntityRef: no name

…button quantity_box_button_down" onclick="var qty_el = document.getElementByI…


# Error Line 200, Column > 80: XML Parsing Error: xmlParseEntityRef: no name

…button quantity_box_button_down" onclick="var qty_el = document.getElementByI…


¿Alguien sabe que es lo que lo provoca?

Sacando lo que está en rojo no da errores, pero no funciona.

Gracias
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:42.