Newsroom
Beaucoup de personnes rencontrent ce problème avec cette solution e-commerce pour Joomla!: dans la fiche produit les flèches quantité ne fonctionnent plus, alors qu’elles fonctionnent lors du listing des produits par catégorie.
Pour ceux qui auront regarder attentivement, l’erreur javascript est la suivante: this.parentNode.elements is undefined
Il faut en fait modifier le fichier www/components/com_virtuemart/theme_choisi/templates/product_details/includes/quantity_box_general.tpl.php, chercher ces lignes:
input type= "button" onclick= "var qty_el = this.parentNode.elements[\'quantity[]\’]; var qty = qty_el.value; if( !isNaN( qty )) qty_el.value++;return false;" />
input type="button" onclick= "var qty_el = this.parentNode.elements[\'quantity[]\’]; var qty = qty_el.value; if( !isNaN( qty ) && qty > 0 ) qty_el.value–;return false;" />
(l46,47 normalement) et les remplacer par:
input type= "button" onclick= "var qty_el = document.getElementById(\’quantity’.$prod_id.’\'); var qty = qty_el.value; if( !isNaN( qty )) qty_el.value++;return false; " />
input type="button" onclick= "var qty_el = document.getElementById(\’quantity’.$prod_id.’\'); var qty = qty_el.value; if( !isNaN( qty ) && qty > 0 ) qty_el.value–;return false; " />
(Réponse trouvée sur http://forum.joomla.fr/archive/index.php/t-151585.html?s=aff15f0e7f5d957fc51c53a5538fafeb)
Commentaires