Auswahliste aus dem Warenkorb entfernen

Oxid 4.4.8
Hallo, folgendes Problem: Standardmäßig hat man bei Oxid auch im Warenkorb noch die Auswahlliste als Drop-Down-Menü, ich möchte da aber nur noch die Artikel als Text.

Nun habe ich die “product title & number” in der basket.tpl mit der aus der order.tpl ersetzt. Was ich als Non-Programmierer ganz schlau fand:D

Jetzt steht also nur noch der Artikeltext da, so wie es gut ist, wenn man die Bestellmenge aber ändert und aktualisiert, gehen alle Werte der Auswahlliste futsch bzw. auf den Anfangswert der Liste. Kann jemand helfen?

beste Grüße

[B]basket.tpl[/B]:

<!-- product title & number -->
[B]NEU aus order.tpl kopiert[/B]
<td>

        &lt;div class="art_title"&gt;&lt;a id="test_orderUrl_[{ $basketproduct-&gt;oxarticles__oxid-&gt;value }]_[{$smarty.foreach.testArt.iteration}]" rel="nofollow" href="[{ $basketproduct-&gt;getLink() }]"&gt;[{ $basketproduct-&gt;oxarticles__oxtitle-&gt;value }][{if $basketproduct-&gt;oxarticles__oxvarselect-&gt;value }], [{ $basketproduct-&gt;oxarticles__oxvarselect-&gt;value }][{/if }]&lt;/a&gt;[{if $basketitem-&gt;blSkipDiscounts }] &lt;sup&gt;&lt;a rel="nofollow" href="#SkipDiscounts_link" class="note"&gt;**&lt;/a&gt;&lt;/sup&gt;[{/if}]&lt;/div&gt;
        &lt;div class="art_num" id="test_orderArtNo_[{ $basketproduct-&gt;oxarticles__oxid-&gt;value }]_[{$smarty.foreach.testArt.iteration}]"&gt;[{ oxmultilang ident="ORDER_ARTICLENOMBER" }] [{ $basketproduct-&gt;oxarticles__oxartnum-&gt;value }]&lt;/div&gt;

        [{if $basketitem-&gt;isBundle() }]
        [{else}]
            [{foreach from=$basketitem-&gt;getChosenSelList() item=oList}]
              [{ $oList-&gt;name }] : [{ $oList-&gt;value }]&lt;br&gt;
            [{/foreach}]
        [{/if}]

      &lt;/td&gt;

[B]Das steht da normalerweise:[/B]
[{* <td>
<div class=“art_title”><a id=“test_basketTitle_[{ $basketproduct->oxarticles__oxid->value }][{$smarty.foreach.test_Contents.iteration}]" rel=“nofollow” href="[{ $basketproduct->getLink() }]">[{ $basketproduct->oxarticles__oxtitle->value }][{if $basketproduct->oxarticles__oxvarselect->value }], [{ $basketproduct->oxarticles__oxvarselect->value }][{/if }]</a>[{if $basketitem->isSkipDiscount() }] <sup><a rel=“nofollow” href="#SkipDiscounts_link" class=“note”>**</a></sup>[{/if}]</div>
<div class=“art_num” id="test_basketNo
[{ $basketproduct->oxarticles__oxid->value }]_[{$smarty.foreach.test_Contents.iteration}]”>[{ oxmultilang ident=“BASKET_ARTNOMBER” }] [{ $basketproduct->oxarticles__oxartnum->value }]</div>
[{if !$basketitem->isBundle() || !$basketitem->isDiscountArticle()}]

       [{if $basketproduct-&gt;selectlist }]
         &lt;div class="variants"&gt;
         [{foreach key=iSel from=$basketproduct-&gt;selectlist item=oList }]
           &lt;select id="test_basketSelect_[{ $basketproduct-&gt;oxarticles__oxid-&gt;value }]_[{$smarty.foreach.test_Contents.iteration}]_[{ $iSel }]" name="aproducts[[{ $basketindex }]][sel][[{ $iSel }]]"&gt;
             [{foreach key=iSelIdx from=$oList item=oSelItem }]
             [{if $oSelItem-&gt;name }]
               &lt;option value="[{ $iSelIdx }]"[{if $oSelItem-&gt;selected }]SELECTED[{/if }]&gt;[{ $oSelItem-&gt;name }]&lt;/option&gt;
             [{/if }]
             [{/foreach }]
           &lt;/select&gt;
         [{/foreach }]
         &lt;/div&gt;
       [{/if}]

      [{/if }]
  &lt;/td&gt;*}]

Statt dem Select kannst du ein input type hidden verwenden.

äh also ich muss statt dem folgendem input…? Keine Ahnung! Ich bemüh mich aber;)

<select id=“test_basketSelect_[{ $basketproduct->oxarticles__oxid->value }][{$smarty.foreach.test_Contents.iteration}][{ $iSel }]” name=“aproducts[[{ $basketindex }]][sel][[{ $iSel }]]”>
[{foreach key=iSelIdx from=$oList item=oSelItem }]
[{if $oSelItem->name }]
<option value="[{ $iSelIdx }]"[{if $oSelItem->selected }]SELECTED[{/if }]>[{ $oSelItem->name }]</option>
[{/if }]
[{/foreach }]
</select>

ich habe jetzt das hier gefunden
<input type=“hidden” name=“sel[[{$iSel}]]” value="[{$iPos}]">

aber wie man das jetzt wo sinnvoll einbaut weiß ich nicht

ungetestet:


[{if $basketproduct->selectlist }]
    [{foreach key=iSel from=$basketproduct->selectlist item=oList }]
        [{foreach key=iSelIdx from=$oList item=oSelItem }]
            [{if $oSelItem->selected }]
                <input type="hidden" value="[{ $iSelIdx }]"  name="aproducts[[{ $basketindex }]][sel][[{ $iSel }]]">
            [{/if }]
        [{/foreach }]
    [{/foreach }]
[{/if }]

funktioniert leider nicht ganz. Die Menge kann jetzt zwar aktualisiert werden und die Auswahlwerte bleiben bis zur order.tpl gespeichert, im Warenkorb werden die Werte aber nicht angezeigt.

Edit: die Werte aus der Auswahliste sollen im Warenkorb schon angezeigt werden, nur nicht mehr als Drop-Down, sorry wenn ich das nicht richtig erklärt habe.


[{if $basketproduct->selectlist }]
    [{foreach key=iSel from=$basketproduct->selectlist item=oList }]
        [{foreach key=iSelIdx from=$oList item=oSelItem }]
            [{if $oSelItem->selected }]
                [{ $oList.name }]: [{ $oSelItem->name }]
                <input type="hidden" value="[{ $iSelIdx }]"  name="aproducts[[{ $basketindex }]][sel][[{ $iSel }]]">
            [{/if }]
        [{/foreach }]
    [{/foreach }]
[{/if }]

wow, funktioniert einwandfrei, vielen Dank Frank für deine Mühe
beste Grüße