/* Extension for cSMDiscounts class */ cSMDiscounts.prototype.renderHTML = function(){ var $t = this, $x = $t.xml, $go = false, $h = $n = "", $vl = $md = $o = $op = 0, $a = $v = $vd = $id = $tB = $hd = null; // get amounts, values, discounted values and textBuffer $op = $t.parent.getOriginalPrice(); $md = $x.getAttribute(_SMAMode).split(";"); $vl = $x.getAttribute(_SMAValue).split(";"); $a = $x.getAttribute(_SMAAmount).split(";"); $vd = $x.getAttribute(_SMAValueDiscount).split(";"); $id = $x.getAttribute(_SMAItemDiscount).split(";"); $tB = $x.getAttribute(_SMATextBuffer).split(";"); $hd = $x.getAttribute(_SMAHidden).split(";"); $qu = $x.parentNode.getAttribute(_SMAOQtyUnit); $qt = $x.getAttribute(_SMAMode).split(";"); $h += ""; $h += ""; $h += ""; $h += ""; $h += ""; $h += ""; $h += ""; $h += ""; for(var i=0; i<$a.length; i++){ if($hd[i]!="1"){ $go = true; $n = $x.text.substring($o, $o + parseInt($tB[i])); $o += parseInt($tB[i]); $h += ""; $h += ""; $h += ""; if(cint($qt[i]) != 2){ $h += ""; } else { $h += ""; }; $h += ""; $h += ""; }; }; $h += "
Rabatte
 Ab " + $qu + "Preis:/" + $qu + "Ersparnis
" + $n + " " + $a[i] + "" + cprimary.format(fnSMPFt($vd[i]), SM_CGROUP + SM_CSYMBOL) + "+" + $id[i] + " " + $qu + " kostenlos"; if(cint($qt[i]) != 2){ $h += (($md[i]==1) ? $vl[i] + "% = " : "") + cprimary.format($op - fnSMPFt($vd[i]), SM_CGROUP + SM_CSYMBOL); } else { $h += cprimary.format($id[i] * $op, SM_CGROUP + SM_CSYMBOL); }; $h += "
"; if(!$go) $h = ""; return($h); };