Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: VPE und Optionen

    Gradler

    • Viel Schreiber
    • Beiträge: 2.083
    • Geschlecht:
    VPE und Optionen
    am: 07. Juni 2012, 23:44:24
    Hallo,

    mal eine Frage eines Unwissenden - bin grad mal so am sinnieren - wenn man als Artikel z.B. Öl/Farben/sonst. Flüssigkeiten in verschiedenen Gebinden anbietet und z.B. 125ml, 250ml, 500ml, 750 ml usw. anbieten möchte und es sich immer um die selbe Substanz handelt, wie kriegt man dann den richtigen Literpreis?

    Anlage Artikel mit 125 ml - VPE 1000ml oder 1ltr - Preis z.B. 125 ml = 2,50 Euro d.h. Preis pro Liter = 20 Euro

    Optionen 125ml - Aufpreis = 0, 250ml Aufpreis = 2,00 Euro (wäre dann 18,00 Euro pro Liter), 500ml Aufpreis = 5,00 Euro (wäre dann 15,00 Euro pro Liter), 1000ml Aufpreis = 9,50 Euro (wäre dann 12,00 Euro pro Liter)

    Wie kriegt man den richtigen VPE Preis bei Optionen?

    Gerd

    Linkback: https://www.modified-shop.org/forum/index.php?topic=20453.0

    web0null

    • Experte
    • Beiträge: 1.998
    Re: VPE und Optionen
    Antwort #1 am: 11. Juni 2012, 15:27:44
    Hi Gradler.

    Hab da mal was probiert:

    Suche in der \includes\modules\product_attributes.php

    Code: PHP  [Auswählen]
    $products_options_data[$row]['DATA'][$col] = array (

    Füge davor ein:

    Code: PHP  [Auswählen]
    // VPE for Attributes prices
            if ($product->data['products_vpe_status'] == 1 && $product->data['products_vpe_value'] != 0.0 && $xtPrice->xtcFormat($attr_price, false)) {
                $vpe = ($xtPrice->xtcFormat($attr_price, false) + $products_price) * (1 / $product->data['products_vpe_value']);
                $vpe = $xtPrice->xtcFormat($vpe, true).TXT_PER.xtc_get_vpe_name($product->data['products_vpe']);
            }
            // VPE for Attributes prices

    Suche weiter (das 2. vorkommen von):

    Code: PHP  [Auswählen]
    'PREFIX' => $products_options['price_prefix']

    Ersetze es mit:

    Code: PHP  [Auswählen]
    'PREFIX' => $products_options['price_prefix'],
    'ATTRIBUTES_VPE_PRICE' => $vpe ? $vpe : ''

    Suche in der \templates\xtc5\module\product_options\product_options_dropdown.html

    Code: PHP  [Auswählen]
    <option value="{$item_data.ID}">&nbsp;{$item_data.TEXT} {if $item_data.PRICE !='' }{$item_data.PREFIX} {$item_data.PRICE}{/if}&nbsp; </option>

    Ersetze mit:

    Code: PHP  [Auswählen]
    <option value="{$item_data.ID}">&nbsp;{$item_data.TEXT} {if $item_data.PRICE !='' }{$item_data.PREFIX} {$item_data.PRICE}&nbsp;{$item_data.ATTRIBUTES_VPE_PRICE}{/if}&nbsp; </option>

    Ich habe das nur mal schnell ausprobiert, kann sein dass ich nicht alle Eventualitäten berücksichtigt habe.

    Hinweis: Ist natürlich nur sinnvoll wenn nur eine Option vorhanden ist, bei mehreren Optionen könnte man das mit meinem "Attribute Price Updater" http://www.modified-shop.org/forum/index.php?topic=20125.0 verwirklichen. (ich weiß Eigenwerbung st.... :whistle:)

    Gruß web0null

    web0null

    • Experte
    • Beiträge: 1.998
    Re: VPE und Optionen
    Antwort #2 am: 12. Juni 2012, 18:10:09
    Haaallo Gerd.
    Weil du gerade Online bist.
    Hast du das schon gesehen :-D

    Gradler

    • Viel Schreiber
    • Beiträge: 2.083
    • Geschlecht:
    Re: VPE und Optionen
    Antwort #3 am: 12. Juni 2012, 18:15:10
    Danke, hab's gesehen aber noch nicht probiert - kämpfe im Moment noch mit div. anderen Sachen die seit 1c nicht mehr so richtig wollen ...
    1 Antworten
    1395 Aufrufe
    21. Juli 2018, 12:17:09 von Alfred
    5 Antworten
    2649 Aufrufe
    23. April 2016, 23:28:36 von Kawabiker
    2 Antworten
    1858 Aufrufe
    09. Februar 2010, 14:39:20 von web4design
    23 Antworten
    10189 Aufrufe
    23. Juli 2011, 12:30:26 von MarcusS81