Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conlabz_PricePriority: Magento 1 Extension für Gruppenpreis-Priorisierung

🇩🇪 Deutsch · 🇬🇧 English

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.

License: MIT Magento 1

Inhaltsverzeichnis

Deutsch

Funktion

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.

Installation

Nutze modman oder Composer (empfohlen):

modman clone git@github.com:conlabz/magex_pricepriority.git
composer require conlabz/magex_pricepriority

Oder 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.

Konfiguration

Ö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.

Technische Daten

Feld Wert
Modulname Conlabz_PricePriority
Code-Pool community
Version 0.0.1
Helper-Alias pricepriority
Model-Alias pricepriority

Events

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.

Grenzen

Beachte diese Grenzen:

  • Das Modul ändert die Preisindex-Query per Reflection. Es schreibt in die private Eigenschaft _parts von Varien_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_price des 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.

English

Function

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.

Installation (English)

Use modman or Composer (recommended):

modman clone git@github.com:conlabz/magex_pricepriority.git
composer require conlabz/magex_pricepriority

Or 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.

Configuration

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.

Technical Data

Item Value
Module name Conlabz_PricePriority
Code pool community
Version 0.0.1
Helper alias pricepriority
Model alias pricepriority

Events

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.

Limits

Obey these limits:

  • The module changes the price index query with reflection. It writes into the private property _parts of Varien_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_price of 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.

Lizenz

Diese Extension steht unter der MIT-Lizenz. Details siehe LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages