[TYPO3-german] tt_products 1.2.7 erweitern
astrid haubold
astridhaubold at gmx.net
Tue Apr 25 10:24:31 CEST 2006
Hallo,
ich verwende tt_products 1.2.7 unter typo3 7.0 und möchte ein neues
Selectfeld einbauen, in dem man die Größe der Produkte auswählen kann.
Ich habe das Feld eingefügt und ausgegeben, aber wie kann ich den
ausgewählten Wert an den Basket übergeben?
Vielleicht kann mir jemand helfen, trotz meiner alten Versionen?
Vielen Dank!
Astrid
so habe ich es bis jetzt versucht:
//meine Funktion initBasket in tx_ttproducts:
function initBasket($basket) {
$this->recs = $basket; // Sets it internally
$this->basket=array();
$uidArr=array();
if (is_array($basket["tt_products"])) {
reset($basket["tt_products"]);
while(list($uid,$count)=each($basket["tt_products"])) {
if (t3lib_div::testInt($uid)) {
$count=t3lib_div::intInRange($count,0,100000);
if ($count) {
$this->basket["$uid"]['number']=$count;
$this->basket["$uid"]['varianteeins']=t3lib_div::_GP('###VARIANTE_EINS###');
$uidArr[]=$uid;
}
}
}
}
//Template marker substitution ->Subst. fields in tx_ttproducts:
$markerArray["###VAR_EINS_EINS###"] = $row["vareinseins"];
$markerArray["###VAR_EINS_ZWEI###"] = $row["vareinszwei"];
$markerArray["###VARIANTE_EINS###"]=$this->basket[$row["uid"]]['varianteeins'];
//Selectfeld im Template:
<select name = "###VARIANTE_EINS###" size = "1">
<option selected = "selected" value = ""></option>
<option value = "###VAR_EINS_EINS###">###VAR_EINS_EINS###</option>
<option value = "###VAR_EINS_ZWEI###">###VAR_EINS_ZWEI###</option>
</select><br>
More information about the TYPO3-german
mailing list