Ein Magento 1 Modul, das dem Kundengruppenpreis eine höhere Priorität gibt als allen anderen Preisen. A Magento 1 module that gives the customer group price a higher priority than all other prices.
Magento berechnet den Endpreis eines Produkts aus diesen Preisen:
- dem Basispreis
- dem Sonderpreis
- dem Gruppenpreis
- dem Preis der Katalogpreisregel
Magento verwendet dabei den niedrigsten dieser Preise. Dadurch kann ein Sonderpreis einen Gruppenpreis ersetzen.
Dieses Modul ändert diese Reihenfolge. Existiert ein Gruppenpreis für die Kundengruppe, verwendet das Modul diesen Gruppenpreis. Das Modul ignoriert alle niedrigeren Preise.
Das Modul ändert den Preis im Frontend und im Preisindex. Dadurch zeigen die Produktseite, die Kategorieliste, die Schichtnavigation und die Preissortierung denselben Preis.
Nutze modman oder Composer (empfohlen):
modman clone git@github.com:conlabz/magex_pricepriority.gitcomposer require conlabz/magex_pricepriorityOder kopiere den Inhalt des app-Verzeichnisses in das app-Verzeichnis deiner Magento-Installation.
Leere danach den Cache. Führe danach einen Reindex der Produktpreise durch.
Öffne im Admin-Panel System > Konfiguration > Katalog > Katalog > Preis.
Setze Always apply group price if present auf Yes.
Der Konfigurationspfad ist catalog/price/always_apply_group_price. Du kannst den Wert für den Standard-Scope, für eine Website oder für eine Store View setzen.
Ist der Wert No, macht das Modul nichts. Magento nutzt die Standard-Preisberechnung.
Nach einer Änderung der Konfiguration führe einen Reindex der Produktpreise durch.
| Feld | Wert |
|---|---|
| Modulname | Conlabz_PricePriority |
| Code-Pool | community |
| Version | 0.0.1 |
| Helper-Alias | pricepriority |
| Model-Alias | pricepriority |
| Event | Methode | Funktion |
|---|---|---|
catalog_product_get_final_price |
applyPrioritizedPrice |
Setzt den Gruppenpreis als Endpreis des Produkts. |
prepare_catalog_product_index_select |
applyPrioritizedPriceIndex |
Ändert die Spalten price, min_price und max_price der Index-Query. |
Beachte diese Grenzen:
- Das Modul ändert die Preisindex-Query per Reflection. Es schreibt in die private Eigenschaft
_partsvonVarien_Db_Select. Das ist eine Abhängigkeit von der internen Struktur des Magento-Cores. - Das Modul ändert keine Staffelpreise.
- Das Modul liest das Feld
website_pricedes Gruppenpreises. Es prüft nicht zusätzlich den Website-Scope. - Das Modul hat keine Auswirkung auf Preise, die sich bereits im Warenkorb oder in einer Bestellung befinden.
Magento calculates the final price of a product from these prices:
- the base price
- the special price
- the group price
- the catalog price rule price
Magento uses the lowest of these prices. Thus a special price can replace a group price.
This module changes the sequence. If a group price exists for the customer group, the module uses this group price. The module ignores all lower prices.
The module changes the price in the frontend and in the price index. Thus the product page, the category list, the layered navigation and the price sort show the same price.
Use modman or Composer (recommended):
modman clone git@github.com:conlabz/magex_pricepriority.gitcomposer require conlabz/magex_pricepriorityOr copy the contents of the app directory into the app directory of your Magento installation.
Then clear the cache. Then do a reindex of the product prices.
Open System > Configuration > Catalog > Catalog > Price in the admin panel.
Set Always apply group price if present to Yes.
The configuration path is catalog/price/always_apply_group_price. You can set the value for the default scope, for a website or for a store view.
If the value is No, the module does nothing. Magento uses the standard price calculation.
After a change of the configuration, do a reindex of the product prices.
| Item | Value |
|---|---|
| Module name | Conlabz_PricePriority |
| Code pool | community |
| Version | 0.0.1 |
| Helper alias | pricepriority |
| Model alias | pricepriority |
| Event | Method | Function |
|---|---|---|
catalog_product_get_final_price |
applyPrioritizedPrice |
Sets the group price as the final price of the product. |
prepare_catalog_product_index_select |
applyPrioritizedPriceIndex |
Changes the price, min_price and max_price columns of the index query. |
Obey these limits:
- The module changes the price index query with reflection. It writes into the private property
_partsofVarien_Db_Select. This is a dependency on the internal structure of the Magento core. - The module does not change tier prices.
- The module reads the field
website_priceof the group price. It does not do an additional test of the website scope. - The module has no effect on prices that are already in the shopping cart or in an order.
Diese Extension steht unter der MIT-Lizenz. Details siehe LICENSE.