Skip to content

Repository files navigation

conlabz Deposit: Magento 2 Extension für Pfandbeträge

🇩🇪 Deutsch · 🇬🇧 English

Diese Magento 2 Extension verwaltet Pfandbeträge (z. B. Flaschenpfand), die automatisch als eigene Positionen zum Warenkorb hinzugefügt werden, mit landes- und kundengruppenspezifischen Regeln.

MIT License Magento 2

Deutsch

Funktion

Conlabz_Deposit fügt Warenkorbpositionen automatisch einen zugehörigen Pfandbetrag hinzu. Es gibt zwei Arten, wie ein Produkt mit Pfand verknüpft wird:

  • AttributeType (deposit_products): Das Produkt referenziert über ein Attribut eine oder mehrere SKUs von Pfand-Produkten (SKU pro Zeile).
  • PriceType (price): Das Produkt hat einen eigenen Pfandpreis über das Attribut deposit_price, der Pfandbetrag wird über ein Standard-Pfandprodukt in den Warenkorb gelegt.

Weitere Funktionen:

  • Einschränkung, für welche Länder ein Pfand berechnet wird (CanApplyForCountryPlugin, Prüfung gegen Rechnungs- oder Lieferadresse).
  • Ausschluss bestimmter Kundengruppen von der Pfandberechnung (CanApplyForCustomerGroupPlugin).
  • Eigener Produkttyp für Pfandprodukte (Model/Product/Type/Deposit).
  • Beobachtet Warenkorb-Events, um Pfand-Positionen automatisch hinzuzufügen und dem passenden Elternartikel zuzuordnen (Observer/AddDepositItemsObserver, Observer/SetDepositParentItemIdObserver).
  • Preis-Anzeige-Plugin, das den Pfandbetrag in der Preisdarstellung berücksichtigt (Plugin/Pricing/RenderPlugin).

Konfiguration

Konfigurationspfade im Modul (Stores > Configuration):

  • deposit/general/active – Modul aktiv/inaktiv
  • deposit/general/default_sku – SKU des Standard-Pfandprodukts (für PriceType)
  • deposit/general/configurable_use_simple – ob bei konfigurierbaren Produkten das einfache Kindprodukt für die Pfandermittlung genutzt wird
  • deposit/calculation/use_parent_tax_class – ob die Steuerklasse des Hauptartikels für den Pfandbetrag verwendet wird
  • deposit/calculation/specific_country – auf bestimmte Länder beschränken
  • deposit/calculation/country_based_on – Grundlage der Länderprüfung (Rechnungs- oder Lieferadresse)
  • deposit/calculation/disabled_customer_groups – Kundengruppen, für die kein Pfand berechnet wird

Abhängigkeiten

Modulreihenfolge (etc/module.xml): Magento_Catalog, Magento_Quote, Magento_Sales, Magento_Checkout.

Installation

composer require conlabz/magento2-module-deposit
bin/magento module:enable Conlabz_Deposit
bin/magento setup:upgrade

Support

Bei Fragen zu dieser Extension: conlabz.de


English

What it does

Conlabz_Deposit automatically adds a corresponding deposit amount as a separate cart item whenever a deposit-carrying product is added to the cart. Two ways of linking a product to a deposit are supported:

  • AttributeType (deposit_products): the product references one or more deposit product SKUs via an attribute (one SKU per line).
  • PriceType (price): the product has its own deposit price via the deposit_price attribute, and the deposit amount is added to the cart via a configured default deposit product.

Additional features:

  • Restricts which countries a deposit is calculated for (CanApplyForCountryPlugin, checked against the billing or shipping address).
  • Excludes specific customer groups from deposit calculation (CanApplyForCustomerGroupPlugin).
  • Dedicated product type for deposit products (Model/Product/Type/Deposit).
  • Observes cart events to automatically add deposit items and link them to the correct parent item (Observer/AddDepositItemsObserver, Observer/SetDepositParentItemIdObserver).
  • Price rendering plugin that includes the deposit amount in price display (Plugin/Pricing/RenderPlugin).

Configuration

Configuration paths shipped with the module (Stores > Configuration):

  • deposit/general/active – enable/disable the module
  • deposit/general/default_sku – SKU of the default deposit product (used by PriceType)
  • deposit/general/configurable_use_simple – whether to use the simple child product for deposit lookup on configurable products
  • deposit/calculation/use_parent_tax_class – whether to use the parent item's tax class for the deposit amount
  • deposit/calculation/specific_country – restrict deposit calculation to specific countries
  • deposit/calculation/country_based_on – whether the country check uses the billing or shipping address
  • deposit/calculation/disabled_customer_groups – customer groups excluded from deposit calculation

Dependencies

Module sequence (etc/module.xml): Magento_Catalog, Magento_Quote, Magento_Sales, Magento_Checkout.

Installation

composer require conlabz/magento2-module-deposit
bin/magento module:enable Conlabz_Deposit
bin/magento setup:upgrade

Support

For questions about this extension: conlabz.de


License

This extension is licensed under the MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages