Trade Republic - Provisionsfrei Aktien handeln
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: Angebot und Staffelpreise

    AlexH

    • Neu im Forum
    • Beiträge: 45
    Angebot und Staffelpreise
    am: 26. März 2011, 08:37:23
    Bitte um Bestätigung

    wenn man einen Artikel mit Staffelpreisen hat und dieser auch noch im Angebot ist wird bei einer Bestellung nur der Preis ohne Berücksichtigung der Staffelmenge gerechnet (dafür aber mit dem Rabatt).

    l.g. Alex



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

    GTB

    • modified Team
    • Gravatar
    • Beiträge: 6.222
    • Geschlecht:
    Angebot und Staffelpreise
    Antwort #1 am: 26. März 2011, 08:43:54
    Bestätigt.

    AlexH

    • Neu im Forum
    • Beiträge: 45
    Angebot und Staffelpreise
    Antwort #2 am: 26. März 2011, 09:11:11
    liegt an der xtcPrice.php

    in der aktuellen version sind einige änderungen gegenüber einer früheren version
    (die änderungen dürften bei der letzten downloadversion noch nicht dabei gewesen sein denn sonst hätte ich kein backup der dateien)

    alt

    Code: PHP  [Auswählen]
    // check specialprice
                    if ($sPrice = $this->xtcCheckSpecial($pID, $qty)) {
                return $this->xtcFormatSpecial($pID, $this->xtcAddTax($sPrice['special'], $products_tax), $this->xtcAddTax($sPrice['normal'], $products_tax), $format, $vpeStatus, $this->xtcAddTax($sPrice['lowest'], $products_tax), $this->xtcAddTax($sPrice['highest'], $products_tax));
            }
    neu

    Code: PHP  [Auswählen]
    // check specialprice
                    if ($sPrice = $this->xtcCheckSpecial($pID))
                            return $this->xtcFormatSpecial($pID, $this->xtcAddTax($sPrice, $products_tax), $pPrice, $format, $vpeStatus);
     
    function xtcCheckSpecial
    alt

    Code: PHP  [Auswählen]
    function xtcCheckSpecial($pID, $qty) {
            if ($this->cStatus['customers_status_graduated_prices'] == '1') {
                $status_query = xtc_db_query("SELECT specials_id FROM " . TABLE_SPECIALS . " WHERE products_id=" . (int)$pID . " AND status=1");
                if (xtc_db_num_rows($status_query)> 0) {
                    $graduated_price_query = "SELECT quantity as qty,
                                                     personal_offer,
                                                     special_offer
                                              FROM "
    .TABLE_PERSONAL_OFFERS_BY.$this->actualGroup."
                                              WHERE products_id="
    . (int)$pID . "
                                              AND special_offer> 0.0
                                              ORDER BY quantity DESC"
    ;
                    $graduated_price_query = xtDBquery($graduated_price_query);
                    if (xtc_db_num_rows($graduated_price_query)) {
                        $i = 0;
                        $lowestPrice = 0.00;
                        $highestPrice = 0.00;
                        $sPrice = 0.00;
                        while ($graduated_price_data = xtc_db_fetch_array($graduated_price_query, true)) {
                            if ($i++ == 0 && $graduated_price_data['qty']> 1) {
                                $lowestPrice = $graduated_price_data['special_offer'];
                            }
                            if ($sPrice == 0.00 && $graduated_price_data['qty'] <= $qty) {
                                $sPrice = $graduated_price_data['special_offer'];
                                $pPrice = $graduated_price_data['personal_offer'];
                            }
                            $highestPrice = $graduated_price_data['special_offer'];
                        }
                        if ($sPrice != 0.00 )
                        return array('special' => $sPrice, 'lowest' => $lowestPrice, 'highest' => $highestPrice, 'normal' => $pPrice);
                    }
                } else {
                    return false;
                }
            }
            $product_query = "select specials_new_products_price from ".TABLE_SPECIALS." where products_id = " . (int)$pID . " and status=1";
            $product_query = xtDBquery($product_query);
            $product = xtc_db_fetch_array($product_query, true);
            if ($product['specials_new_products_price'] == 0) return false;
            return array('normal' => $product['specials_new_products_price'], 'lowest' => 0, 'highest' => 0);
        }
    neu

    Code: PHP  [Auswählen]
    function xtcCheckSpecial($pID) {
                    $product_query = "select specials_new_products_price from ".TABLE_SPECIALS." where products_id = '".$pID."' and status=1";
                    $product_query = xtDBquery($product_query);
                    $product = xtc_db_fetch_array($product_query, true);

                    return $product['specials_new_products_price'];

            }
    function xtcFormatSpecial
    alt

    Code: PHP  [Auswählen]
    function xtcFormatSpecial($pID, $sPrice, $pPrice, $format, $vpeStatus = 0, $lowest = 0, $highest = 0) {
            if ($discount = $this->xtcCheckDiscount($pID)) {
                $sPrice -= $sPrice / 100 * $discount;
                $lowest -= $lowest / 100 * $discount;
                $highest -= $highest / 100 * $discount;
            }
            if ($format) {
                if ($lowest == 0) {
                    $price = '<span class="productOldPrice">'.INSTEAD.$this->xtcFormat($pPrice, $format).'</span><br />'.ONLY.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format);
                } else {
                    $sPrice = $lowest;
                    $price = '<span class="productOldPrice">'.INSTEAD.$this->xtcFormat($pPrice, $format).'</span><br />'.NOW.FROM.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format);
                }
                if ($vpeStatus == 0) {
                    return $price;
                } else {
                    return array ('formated' => $price, 'plain' => $sPrice);
                }
            } else {
                return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']);
            }
        }
    neu

    Code: PHP  [Auswählen]
    function xtcFormatSpecial($pID, $sPrice, $pPrice, $format, $vpeStatus = 0) {
                    if ($format) {
    //BOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest!
                            //$price = '<span class="productOldPrice">'.INSTEAD.$this->xtcFormat($pPrice, $format).'</span><br />'.ONLY.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format);
                            //BOF - vr - 2009-12-11 avoid div / 0 if product price is 0
                            if (!isset($pPrice) || $pPrice == 0)
                              $discount = 0;
                            else
                              $discount = ($pPrice - $sPrice) / $pPrice * 100;
                            $price = '<span class="productOldPrice"><small>'.INSTEAD.'</small><del>'.$this->xtcFormat($pPrice, $format).'</del></span><br />'.ONLY.$this->checkAttributes($pID).$this->xtcFormat($sPrice, $format).'<br /><small>'.YOU_SAVE.round($discount).' % /'.$this->xtcFormat($pPrice-$sPrice, $format).'</small>';
                            //BOF - vr - 2009-12-11 avoid div / 0 if product price is 0
    //EOF - Dokuman - 2009-06-03 - show 'ab' / 'from' for the lowest price, not for the highest!
                            if ($vpeStatus == 0) {
                                    return $price;
                            } else {
                                    return array ('formated' => $price, 'plain' => $sPrice);
                            }
                    } else {
                            return round($sPrice, $this->currencies[$this->actualCurr]['decimal_places']);
                    }
            }
    bei der alten version verschwindet die anzeige " Sie sparen ..."
    wo genau der fehler liegt kann ich gerade nicht sagen da ich krank bin und null energie habe und mein hirn dementsprechend null leistet.
    bitte danke um hilfe

    l.g. Alex

    AlexH

    • Neu im Forum
    • Beiträge: 45
    Angebot und Staffelpreise
    Antwort #3 am: 26. März 2011, 10:20:30
    @GTB: du hast nicht zufällig ein Modul eingebaut welches es ermöglicht das du staffelpreise ohne separates speichern eingeben kannst ? also mehrere in einem rutsch sozusagen.

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.195
    • Geschlecht:
    Angebot und Staffelpreise
    Antwort #4 am: 26. März 2011, 10:23:03
    Wieso ist das Thema bereits auf "behoben" gesetzt?

    Bezüglich Modul schau mal hier: MODUL: Staffelpreise schneller ändern

    Das wurde in r1368:1369 bereits in den Trunk übernommen.

    Hattest du selber das Thema auf "behoben" gesetzt? :?

    Grüße

    Torsten

    AlexH

    • Neu im Forum
    • Beiträge: 45
    Angebot und Staffelpreise
    Antwort #5 am: 26. März 2011, 12:47:01
    hi, das mit dem behoben setzen ist wenn dann unabsichtlich passiert, sollte jetzt auf nicht behoben stehen, ABER ich bin mir nicht mehr ganz sicher, ob das problem wirklich von modified eCommerce Shopsoftware kommt.

    ich konnte es nun in 13 shops nachvollziehen aber leider sind da überall modifikationen drinnen . eine konstante ist unter anderem ein modul welches es erlaubt neben jedem staffelpreis direkt einen rabatt einzugeben.

    ich werde heute nacht mal einen shop offline stelen und ein ganz frisches modified eCommerce Shopsoftware 1.05 installieren und schauen ab welchem punkt dann dieser fehler auftritt.
    bei den derzeitigen test kann ich nämlich nicht genau feststellen woher die datei unterschiede kommen.
    l.g. Alex

    GTB

    • modified Team
    • Gravatar
    • Beiträge: 6.222
    • Geschlecht:
    Angebot und Staffelpreise
    Antwort #6 am: 26. März 2011, 13:04:45
    Ich habe ein Modul, das es ermöglicht die Staffelpreise mit vordefinierten Rabatten in % zuzuordnen. Entweder auf ein einzelnes Produkt oder gleich einer ganzen Kategorie. Zudem kann man bei jedem Produkt die Staffelpreise nicht nur mit Beträgen angeben sonder auch in %.

    Gruß Gerhard

    AlexH

    • Neu im Forum
    • Beiträge: 45
    Angebot und Staffelpreise
    Antwort #7 am: 26. März 2011, 20:42:11
    Hallo,
    also es liegt doch an modified eCommerce Shopsoftware und nicht an irgendwelchen Modulen:

    frisch installiertes modified eCommerce Shopsoftware
    artikel angelegt
    einzelpreis 10euro
    staffel ab 2stk 5
    staffel ab 3stk 4
    staffel ab 4stk 3
    staffel ab 5stk 2

    dann 50% sonderangebot
    wird korrekt angezeigt statt 10 - 5 staffeln darunter werden mit dem preis OHNE Rabatt angezeigt
    sobald man 1 stück in den warenkorb legt funzt es mit dem rabatt

    legt man jedoch 5 stück rein zahlt man per stück nicht 5x 1 (also die staffel inkl. rabatt) sondern man zahlt 5x 5 (der grundpreis von 1 stück minus rabatt mal anzahl)

    die files die ich oben gepostet habe sind keine alten files sondern änderungen mit denen die berechnung wieder passt jedoch wird die anzaige verändert (der bereich sie sparen entfällt)
    man muss also die 2 files so miteinander kombinieren das man die berechnung von dem einen übernimmt und die features des originalen nicht verliert. :-)

    fehler liegt aber direkt im modified eCommerce Shopsoftware in der auslieferungsversion denn wenn ich einen rabatt gebe muss der shop auch die staffeln berücksichtigen und den rabatt auf die staffeln übertragen

    l.g. Alex

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.147
    • Geschlecht:
    Re: Angebot und Staffelpreise
    Antwort #8 am: 22. April 2016, 10:19:06
    Ist das mit Sonderpreisen bei Staffelpreisen irgendwie lösbar in einer 1.06 SP2?

    Die aktuellste Version die ich fand (http://www.modified-shop.org/forum/index.php?topic=5331.msg282069#msg282069) setzt noch auf einer alten Version der /includes/classes/xtcPrice.php auf. Da ist noch $qty als zweiter Parameter in allen xtcCheckIrgendwas Funktionen.

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.147
    • Geschlecht:
    Re: Angebot und Staffelpreise
    Antwort #9 am: 22. April 2016, 10:20:40
    Weitere Frage ..... 2.0 hat den Bug immer noch?

    firstweb

    • Neu im Forum
    • Beiträge: 15
    Re: Angebot und Staffelpreise
    Antwort #10 am: 18. Juni 2019, 11:24:35
    Hallo,

    der Bug ist immer noch in der aktuellen Version 2.04.2 oder habe ich da was übersehen?
    2 Antworten
    2085 Aufrufe
    08. März 2018, 08:43:54 von alkim media
    2 Antworten
    1094 Aufrufe
    17. Februar 2019, 17:23:27 von Schreinermeister
    3 Antworten
    2398 Aufrufe
    01. April 2016, 11:10:30 von TSCH
    9 Antworten
    4546 Aufrufe
    09. Februar 2015, 12:23:29 von VersPack
               
    anything