|
|||
|
hallo,
ist es mit dem neuen templatesystem auch m?glich, dass die Produkte in der Produkt?bersicht in z.b. drei spalten angezeigt werden. also so wie in der "Neue Produkte im November"-box, oder mu? daf?r der php-code angepasst werden? wenn der code angepasst werden mu?: kann es dann zu problemen in zusammenarbeit mit dem templatesystem kommen? sch?ne gr??e p3e |
|
|||
|
Das l?sst sich im Template realisieren.
Der PHP-Code ?bergibt ein Array mit Produktdaten ans Template, und das Template Zeigt diese dann an. Wie Die angezeigt werden, kann im Template festgelegt werden. |
|
||||
|
Zitat:
![]() ist ganz easy im template zu machen, da man auch im html template php code einbauen kann , und somit mit dem datenarray machen kann was man auch immer will. das zb ein template f?r 2 spalten, Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
{foreach name=aussen item=module_data from=$module_content}
{php} $col++;
{/php}
<td class="main"><div align="left">
<table width="100%" border="0" cellpadding="0" cellspacing="4">
<tr>
<td width="1" rowspan="2" ><a href="{$module_data.PRODUCTS_LINK}"><img src="{$module_data.PRODUCTS_IMAGE}" border="1"></a></td>
<td class="main"><strong><a href="{$module_data.PRODUCTS_LINK}">{$module_data.PRODUCTS_NAME}</a></strong></td>
</tr>
<tr>
<td class="main">{$module_data.PRODUCTS_DESCRIPTION}<br>
<strong>{$module_data.PRODUCTS_PRICE}<br>
</strong>{$module_data.BUTTON_BUY_NOW}<br>
</td>
</tr>
</table>
</div></td>
{php}
if ($col>=2) {
$col=0;
echo '</tr><tr>';
}
{/php}
{/foreach}
</tr>
</table>
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <div align="center">
<table width="100%" border="0">
{foreach name=aussen item=module_data from=$module_content}
<tr>
<td width="1" rowspan="2" style="border-bottom: 1px solid; border-color: #cccccc;"><a href="{$module_data.PRODUCTS_LINK}"><img src="{$module_data.PRODUCTS_IMAGE}" border="1"></a></td>
<td class="main"><strong><a href="{$module_data.PRODUCTS_LINK}">{$module_data.PRODUCTS_NAME}</a></strong></td>
</tr>
<tr>
<td style="border-bottom: 1px solid; border-color: #cccccc;" class="main">{$module_data.PRODUCTS_DESCRIPTION}<br>
<strong>{$module_data.PRODUCTS_PRICE}<br>
</strong>{$module_data.BUTTON_BUY_NOW}</td>
</tr>
{/foreach}
</table>
</div></td>
</tr>
</table>
was du in dem template mit dem array machst, da gibs keine grenzen.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
|||
|
:grml: :stupid: jetzt habt ihr meinen horizont mal wieder um ein st?ck erweitert! - DANKE
ich hatte noch gar nicht ?ber die vielen m?glichkeiten nachgedacht, die erreicht werden k?nnen, wenn man in den templates php einsetzt. habe immer nur an reines html gedacht. da freu ich mich aber auf die neue beta :bounce: gr??e p3e |
|
||||
|
Zitat:
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
|||
|
Also, f?r die neuen Produkte ist die new_products.html zust?ndig.
Hast Du das caching im Admin noch eingeschaltet? Wenn ja, entweder ausschalten oder das Verzeichnis cache leeren (alle Dateien daraus l?schen). |
|
||||
|
Also mein Cache ist deaktiviert (false), und hier ist der Code meiner new_products.html (templates/xtc/modules/new_products.html - nur dass wir auch von der gleichen Datei reden...) :blink:
Code:
{config_load file="$language/lang_$language.conf" section="new_products"}
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="infoBoxHeading">{#heading_text#} </td>
</tr>
</table>
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
{foreach name=aussen item=module_data from=$module_content}
{php} $col++;
{/php}
<td class="main"><div align="left">
<table width="100%" border="0" cellpadding="0" cellspacing="4">
<tr>
<td width="1" rowspan="2" ><a href="{$module_data.PRODUCTS_LINK}"><img src="{$module_data.PRODUCTS_IMAGE}" border="1"></a></td>
<td class="main"><strong><a href="{$module_data.PRODUCTS_LINK}">{$module_data.PRODUCTS_NAME}</a></strong></td>
</tr>
<tr>
<td class="main">{$module_data.PRODUCTS_DESCRIPTION}<br>
<strong>{$module_data.PRODUCTS_PRICE}<br>
</strong>{$module_data.BUTTON_BUY_NOW}<br>
</td>
</tr>
</table>
</div></td>
{php}
if ($col>=2) {
$col=0;
echo '</tr><tr>';
}
{/php}
{/foreach}
</tr>
</table>
|
![]() |
| Lesezeichen |
| Stichworte |
| mehreren, produktliste, spalten |
| Themen-Optionen | |
| Ansicht | |
|
|