![]() |
| | LinkBack | Themen-Optionen | Thema bewerten | Ansicht |
|
#1
| ||||
| ||||
Hallo Forum, Ich möchte gerne bei einem Shop mit tt_products die Produkte Liste, d.h. das ITEM_LIST_TEMPLATE im Template etwas anpassen. Und zwar hätte ich gerne Checkboxen statt einem Anzahl-Eingabefeld! Das heisst diesen Teil des Templates...: HTML-Code: <h2>ITEM_LIST_TEMPLATE</h2> <p><em>This subpart is used to display the regular list of products. It's also used by search-results.</em></p> <!-- ###ITEM_LIST_TEMPLATE### begin This subpart is used to display the regular list of products. It's also used by search-results.--> <div class="tt_products_item_list"> <div class="page_navigation"> <div class="page_prev"><!--###LINK_PREV###-->vorherige Seite<!--###LINK_PREV###--></div> <!-- ###LINK_BROWSE### begin -->[ ###BROWSE_LINKS### ]<!-- ###LINK_BROWSE### end--> <div class="page_next"><!--###LINK_NEXT###-->nächste Seite<!--###LINK_NEXT###--></div> </div> <!-- ###ITEM_CATEGORY_AND_ITEMS### --> <!-- ###ITEM_CATEGORY### begin --> <h2 class="category_title">###CATEGORY_TITLE###</h2> <!-- ###ITEM_CATEGORY### end --> <!-- ###ITEM_LIST### begin --> <!-- ###ITEM_SINGLE### begin--> <form method="post" action="###FORM_URL###"> <div class="listitem"> <h3><!--###LINK_ITEM###-->###PRODUCT_TITLE###<!--###LINK_ITEM###--></h3> <p class="listitem_subheader"><em>###PRODUCT_SUBTITLE###</em></p>###PRODUCT_IMAGE### <div class="product_note">###PRODUCT_NOTE###</div> <p class="price"> Preis : <strong>EUR ###PRICE_TAX###.-</strong><br/> <em class="price_no_vat">(ohne MwSt: EUR ###PRICE_NO_TAX###)</em></p> <p class="link">[<!--###LINK_ITEM###--> Ausführliche Informationen zum ###PRODUCT_TITLE###<!--###LINK_ITEM###-->]</p> <div class="order_form"> <label for="###FIELD_ID###">Anzahl: </label><input size="3" maxlength="4" type="text" id="###FIELD_ID###" name="###FIELD_NAME###" value="###FIELD_QTY###" /> </div> <div class="clear_right"><!-- --></div> </div> <br /> <div> <input type="submit" name="order" value="In Warenkorb einfügen"/> <img src="fileadmin/images/clear.gif" width="145" height="1" alt="" border="0"> <a href="/index.php?id=22"><b>in den Warenkorb wechseln »</b></a> </div> </form> <br /> <hr /> <br /> <!-- ###ITEM_SINGLE### end --> <!-- ###ITEM_LIST### end --> <!-- ###ITEM_CATEGORY_AND_ITEMS### end --> <div class="page_navigation"> <div class="page_prev"><!--###LINK_PREV###-->vorherige Seite<!--###LINK_PREV###--></div> <!-- ###LINK_BROWSE### begin -->[ ###BROWSE_LINKS### ]<!-- ###LINK_BROWSE### end--> <div class="page_next"><!--###LINK_NEXT###-->nächste Seite<!--###LINK_NEXT###--></div> </div> </div> <!-- ###ITEM_LIST_TEMPLATE### end --> HTML-Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <title>Checkbox Shop</title> <style type="text/css"> </style> <script type="text/javascript"> function addition() { var total=0; var myElements=document.myForm.elements; for (var i=0;i<2;i++) { var myCheckBox=myElements["item"+i]; if (myCheckBox.checked) total+=1*myCheckBox.parentNode.parentNode.cells[2].innerHTML.substr(2).replace(/\,/,"."); }; total=total.toFixed(2); document.myForm.totalSum.value=total; } </script> </head> <form name="myForm" action="#"> <body> <table align="center" style="background: #e1e1e1;" width="500px" cellspacing="5" cellpadding="5" border="0"> <tr> <td colspan="3" align="right"><div align="left"><b>Einkaufen</b><br>Treffen Sie Ihre Auswahl:<br></div></td> </tr> <tr> <td align="left">Produkt 01</td> <td><input type="checkbox" name="item0" onClick = "addition()"></td> <td>€ 34,95</td> </tr> <tr> <td align="left">Produkt 02</td> <td><input type="checkbox" name="item1" onClick = "addition()"></td> <td>€ 78,00</td> </tr> <tr> <td colspan="2" align="left">Gesamtsumme in EURO</td> <td><input type="text" readonly name="totalSum"> €</td> </tr> <tr> <td colspan="3" align="right"> <form action="ausgabe.html" method="POST"> <input type ="hidden" name="products" value="item0,item1"> <input type="submit" value=" Kaufen >> "> </form> </td> </tr> </table> </div> </form> </body> </html> Die markierte Checkbox sollte einfach den Marker ###FIELD_QTY### mit dem Wert 1 füllen! Bin leider nicht gerade sehr versiert in diesen Dingen (PHP) und bin durch ausprobieren bisher leider nicht ans Ziel gelangt! Eigentlich sollte das ja nicht so schwer zu erreichen sein?? ...oder doch!! Wäre froh, wenn mir jemand ein paar Tipps geben könnte!! Danke! |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
| |
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Mandatory Checkbox | Radiesel | powermail | 1 | 24.04.08 11:48 |
| Liste Aktionen auf eine Seite mit Liste Produkte | µaTh | tt_products | 2 | 19.10.07 20:01 |
| Checkbox Frontend Preview | Ha_Pe | TYPO3 4.x Versionierung & Workspaces | 0 | 11.10.07 12:08 |
| anzahl der Produkte einer Kategorie anzeigen | nihilfire | commerce | 0 | 27.08.07 09:43 |
| Multiple Checkbox | kommanderprix | TYPO3 4.x FE-User | 0 | 13.12.06 15:05 |