Antwort #1 am: 03. März 2014, 02:32:21
Das Problem ist es das multi-language-fähig zu halten, sonst könntest du einfach in
/templates/DEIN_TEMPLATE/module/order_details.html folgendes machen
{foreach key=key_data item
=item_data from
=$module_data.ATTRIBUTES
} {if $item_data.VALUE_NAME
!= 'keine'} <tr
> <td
class="attribute"><strong
>{$item_data.NAME
}:</strong
></td
> <td
class="value">{$item_data.VALUE_NAME
}</td
> </tr
> {/if} {/foreach} Um es multi-language-fähig zu halten müsstest du über die ID des Optionswertes gehen (der Wert X der im Quelltext bei
option value="X" steht)
und dazu in
/includes/modules/order_details_cart.phpfolgendes suchen
$module_content[$i]['ATTRIBUTES'][$subindex] = array ( 'ID' => $attributes['products_attributes_id'], 'MODEL' => $attributes['attributes_model'], 'EAN' => $attributes['attributes_ean'], 'NAME' => $attributes['products_options_name'], 'VALUE_NAME' => $attributes['products_options_values_name'].$attribute_stock_check ); und so erweitern
$module_content[$i]['ATTRIBUTES'][$subindex] = array ( 'ID' => $attributes['products_attributes_id'], 'MODEL' => $attributes['attributes_model'], 'EAN' => $attributes['attributes_ean'], 'NAME' => $attributes['products_options_name'], 'VALUE_NAME' => $attributes['products_options_values_name'].$attribute_stock_check, 'VALUE_ID' => $attributes['options_values_id'] ); und in
/templates/DEIN_TEMPLATE/module/order_details.htmldann so abfragen
{foreach key=key_data item
=item_data from
=$module_data.ATTRIBUTES
} {if $item_data.VALUE_ID
!= 'X' && $item_data.VALUE_ID
!= 'Y' && $item_data.VALUE_ID
!= 'Z'} <tr
> <td
class="attribute"><strong
>{$item_data.NAME
}:</strong
></td
> <td
class="value">{$item_data.VALUE_NAME
}</td
> </tr
> {/if} {/foreach} wobei X, Y, Z für die jeweiligen values stehen die die diversen Optionen "keine" haben.
Dabei entsteht ein leerer
table-tag im HTML-Output weshalb man die foreach-Schleife und die if-Abfrage um den
table machen sollte (siehe Original-Code), wirst du selbst hinbekommen.
Gruß,
noRiddle