Hallo Zusammen,
ich weiß nicht genau, ob ich hier im Frontend Bereich wirklich richtig bin mit meiner Frage...
aber ich habe folgendes Problem und denke auch soweit schon den richtigen Lösungsansatz gefunden zu haben.
Hier ein Ausschnitt aus meinem "alten" Shop
Ich benötige die Funktion "ausgrauen" und nicht mehr auswählbar, sobald ein Attribut nicht verfügbar ist. Gerne auch mit dem Hinweis "aktuell nicht lieferbar"
Wenn ich richtig in der Annahme gehe, dann betrifft dies ja folgende Zeile aus \gm_product_options\product_options_dropdown.html
PHP-Code:
{if $item_data.GM_STOCK <=0}disabled="disabled" id="disabled"{/if}
PHP-Code:
{if $options!=''}
{php}$i=0;{/php}
<div class="attributes clearfix">
<dl>
{foreach name=outer item=options_data from=$options}
{if $options_data.DATA || $GM_HIDE_OUT_OF_STOCK == 'false'}
<dt>{$options_data.NAME}:</dt>
<dd>
<select class="input-select{if $PRICE_STATUS != 1} gm_attr_calc_input{/if}" name="id[{$options_data.ID}]">
{foreach key=key_data item=item_data from=$options_data.DATA}
<option {* AJAX Price-Update class START *}{if $item_data.PRICE}class="has-price" {/if}{* AJAX Price-Update class END *}value="{$item_data.ID}" title="{$item_data.TEXT|replace:'"':'"'} {if $item_data.PRICE}{$item_data.PREFIX} {$item_data.PRICE}{/if}{if $GM_SHOW_STOCK == 'true' && $options_data.NAME != 'downloads'} {$GM_STOCK_TEXT_BEFORE|replace:'"':'"'}{$item_data.GM_STOCK}{$GM_STOCK_TEXT_AFTER|replace:'"':'"'}{/if}" {php} if(!isset($chk)) echo 'selected="selected"'; $chk = true; {/php}{if $item_data.GM_STOCK <=0}disabled="disabled" id="disabled"{/if}{$item_data.TEXT} {if $item_data.PRICE}{$item_data.PREFIX} {$item_data.PRICE}{/if}{if $GM_SHOW_STOCK == 'true' && $options_data.NAME != 'downloads'} {$GM_STOCK_TEXT_BEFORE}{$item_data.GM_STOCK}{$GM_STOCK_TEXT_AFTER}{/if}</option>
{/foreach}
</select>
{php} unset($chk); $i++; {/php}
</dd>
{/if}
{/foreach}
</dl>
</div>
{/if}
Wie bekomme ich hin, dass das "disabled" greift? Wenn ich den HTML Code bearbeite und disabled wie folgt einsetze
HTML-Code:
<option value="61" title="214 vanille " disabled="disabled">
<!-- Attribute Gesamtpreisanzeige -->
214 vanille 2,90 EUR <!-- Ende Attribute Gesamtpreisanzeige -->
<!--214 vanille -->
</option>
bekomme ich das gewünschte Ergebnis...
Ich hoffe, dass ich mich jetzt nicht all zu umständlich ausgedrückt habe
Schon mal vielen Dank!
Liebe Grüße Jeany