View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0007907 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2026-02-26 18:03 | 2026-02-27 11:36 |
| Reporter | suabo | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | acknowledged | Resolution | reopened | ||
| Product Version | 6.5.4 | ||||
| Summary | 0007907: Discount calculation differs unexpectedly | ||||
| Description | If you enter 0 in the field, the discount is deducted directly from the item and you will not see a discount. If you enter 1 here, the discount is no longer deducted directly from the item, but is also listed as such in the summary. This also means that a discount applies at item level for quantities of 0 or more, whereas the discount applies at shopping cart level for quantities of 1. An example: 1€ discount for quantities of 0 or more 2 items for 5€ in the shopping cart = 2€ discount 1€ discount for quantities of 1 or more 2 items for 5€ in the shopping cart = 1€ discount | ||||
| Steps To Reproduce | Create a discount and test it with 0 and 1 with 2 items in the shopping cart. | ||||
| Tags | No tags attached. | ||||
| Theme | Not defined | ||||
| Browser | Not defined | ||||
| PHP Version | Not defined | ||||
| Database Version | Not defined | ||||
|
|
Aus dem Slack-Channel: Marcel Grolms [15:05 Uhr] Hat einer in letzter Zeit ein Problem mit Rabatten festgestellt? Mir ist aufgefallen, dass diese zwar berechnet werden, aber die Methode getDiscounts() immer einen leeren Array liefert. Der Rabatt wird direkt vom Artikelpreis abgezogen und ist somit gar nicht mehr als solcher erkennbar. Ist das ein neues Feature oder war das schon immer so? Welche Rabatte sollten den in dem Array stehen, wenn nicht die Rabatte die bei Shopeinstellungen unter Rabatte zu finden sind? Ich bin gerade sehr verwirrt. Hoffe jemand kann Licht ins dunkel bringen. 13 AntwortenMarco Steinhäuser [15:46 Uhr] Wenn getDiscounts() eine basket-Funktion ist, gibt es zwei Möglichkeiten: entweder ist sie deprecated oder Du musst in den Einstellungen mit dem Anfangswert 0 und 1 rumspielen. Das war immer so ein "hidden Feature", von dem niemand wusste ^^ Marcel Grolms [16:16 Uhr] Wow, das ist wirklich der Punkt. Wenn man bei dem Feld ab Menge 0 stehen hat wird der Rabatt direkt vom Artikel abgezogen und man erkennt keinen Rabatt. Wenn man hier 1 einträgt, dann wird der Rabatt nicht mehr direkt vom Artikel abgezogen, sondern in der Summary auch als solcher aufgelistet. Das bedeutet auch, dass ein Rabatt bei einer Menge ab 0 auf Artikelebene gilt, wohingegen der Rabatt bei einer Menge von 1 dann auf Warenkorbebene. Ein Beispiel: 1€ Rabatt ab Menge 0 2 Artikel für 5 € im WK = Rabatt 2 € 1€ Rabatt ab Menge 1 2 Artikel für 5€ im WK = Rabatt 1€ Wenn das irgendwo ersichtlich wäre würde ich das ja als Feature durchgehen lassen... aber so wie das ist, ist es ein Bug. (bearbeitet) Marcel Grolms [16:22 Uhr] Bemerkt hab ich das übrigens, weil ich den Hinweis angepasst habe, dass ein Artikel nicht rabattfähig ist. Macht ja eigentlich keinen Sinn diesen anzuzeigen, wenn man gar keinen Rabatt bekommt. Das geht aber nur, wenn man den Rabatt ab Menge 1 eingestellt hat, da sonst wie zu beginn erwähnt getDiscounts() einen leeren Array liefert. Marco Steinhäuser [17:33 Uhr] Es ist möglicherweise einfach nur ein Stück fehlender Dokumentation Marcel Grolms [17:53 Uhr] Möglicherweise leben wir in einer Simulation... Marco Steinhäuser [17:54 Uhr] Ich kann die Matrix sehr empfehlen: Rote oder blaue Pille? :smile: Marcel Grolms [18:06 Uhr] Hab das mal gemeldet: https://bugs.oxid-esales.com/view.php?id=7907 Thomas Dartsch, D3 [18:19 Uhr] das ist aber so gewollt. Wenn man eine "0" einträgt, wird der Rabatt direkt am Artikel abgezogen. Mit Menge "1" dann erst im Warenkorb. It's not a bug, its a feature.Marcel Grolms [18:23 Uhr] Dann erwarte ich aber zumindest, dass es in dem Text steht, wenn man auf das ? klickt. Hier steht aber nix davon. Für bestehende Shopkonfigurationen verstehe ich ja, dass man das jetzt nicht einfach ändern sollte, aber man könnte dafür ja eine migration mitliefern, welche das dann in ein eigenes db feld korrigiert. Das Feature ist ja nicht das Problem, ist nur fragwürdig, wie es gestaltet ist. Thomas Dartsch, D3 [18:23 Uhr] das ist seit ewigen Zeiten schon so [18:24 Uhr]klar, den Hilfetext könnte man anpassen. Das Verhalten ist aber definitiv kein Bug.Marcel Grolms [18:25 Uhr] Wo wir hier so darüber sprechen erinnere ich mich auch wage, das schon mal gehört zu haben.... etwas traurig, dass man das nicht mal dokumentiert hat, wenn da jeder irgendwann mal drüber stolpert. Thomas Dartsch, D3 [18:27 Uhr] Slack ist kein offizieller Kommunikationskanal. Wenn nur hier darüber gesprochen wurde, kommt da selten etwas direkt bei OXID an. Der Bugtrack Eintrag kann ja ein guter Anfang sein, um OXID zu bitten den Hilfetext anzupassen. |
|
|
The behavior described is intended in OXID eShop and corresponds to the official documentation. Use the "Purchase value / purchase quantity – From" field in the discount to control where the discount is displayed: • From = 0 > The discounted price is displayed directly in the shop (item list/detail page). • From = 1 > The discount is only shown in the shopping cart (the "To" field must not be 0). In short: This behavior is not a bug, but a deliberate configuration decision that is controlled via the From fields for purchase value or purchase quantity. This can be found in the documentation here: https://docs.oxid-esales.com/eshop/de/latest/betrieb/rabatte/rabatte.html# rabatte-anlegen-und-verwalten:~:text=Um%20den%20Artikel%20bereits%20im%20Online%2DShop%20mit%20dem%20rabattierten%20Preis%20anzuzeigen%2C and here: https://docs.oxid-esales.com/eshop/de/latest/betrieb/rabatte/rabatte.html#rabatte-anlegen-und-verwalten:~:text=To%20display%20the%20discount%20only%20in%20the%20shopping%20cart, See also in the admin section under "Start Help." |
|
|
Can we please make this a feature request and include this information directly in the help text? This would have saved a lot of time for shop operators or developers who do not regularly work with discounts. In my opinion, these two lines would explain the hidden feature directly in the shop: • From = 0 > The discounted price is displayed directly in the shop (item list/detail page). • From = 1 > The discount is only shown in the shopping cart. Thank you. |