Diese Magento 2 Extension (Restricted Product Shipping Countries) beschränkt das Produktangebot auf bestimmte Länder und entfernt nicht versendbare Produkte automatisch aus dem Warenkorb, wenn die Versand- oder Rechnungsadresse nicht passt.
Conlabz_Rpsc prüft für jedes Produkt im Warenkorb, ob es in das Land der Versand- oder Rechnungsadresse geliefert werden darf:
- Am Produkt wird über das Attribut
rpsc_countrieseine Länderliste hinterlegt. - Über das Attribut
rpsc_access_control(oder eine globale Konfiguration) wird festgelegt, ob die Länderliste als Erlaubnisliste (nur diese Länder) oder Sperrliste (alle außer diese Länder) ausgewertet wird. - Ob die Prüfung auf Basis der Rechnungs- oder der Versandadresse erfolgt, ist pro Produkttyp konfigurierbar.
- Für virtuelle Warenkörbe (kein Versand nötig) wird die Prüfung übersprungen, wenn sie auf die Versandadresse basiert.
- Im Checkout können nicht versendbare Produkte per AJAX-Endpunkt (
rpsc/index/index) ermittelt und per weiterem Endpunkt (rpsc/index/delete) direkt aus dem Warenkorb entfernt werden.
Konfigurationspfade im Modul (Stores > Configuration > Checkout):
checkout/rpsc/hint_text– Hinweistext im Checkoutcheckout/rpsc/based_on– pro Produkttyp konfigurierbar, ob die Prüfung aufbillingodershippingbasiertcheckout/rpsc/access_control– globale Standardeinstellung für Erlaubnis- oder Sperrliste (0= aus Konfiguration,1= Erlaubnisliste,2= Sperrliste), pro Produkt über das Attributrpsc_access_controlüberschreibbar
Modulreihenfolge (etc/module.xml): Magento_Checkout.
composer require conlabz/magento2-module-rpsc
bin/magento module:enable Conlabz_Rpsc
bin/magento setup:upgradeBei Fragen zu dieser Extension: conlabz.de
Conlabz_Rpsc (Restricted Product Shipping Countries) checks every product in the cart against the country of the shipping or billing address:
- A country list is stored on the product via the
rpsc_countriesattribute. - The
rpsc_access_controlattribute (or a global configuration default) determines whether the country list is evaluated as an allow list (only these countries) or a deny list (all countries except these). - Whether the check is based on the billing or the shipping address is configurable per product type.
- For virtual carts (no shipping required), the check is skipped if it's based on the shipping address.
- In checkout, non-shippable products can be retrieved via an AJAX endpoint (
rpsc/index/index) and removed directly from the cart via a second endpoint (rpsc/index/delete).
Configuration paths shipped with the module (Stores > Configuration > Checkout):
checkout/rpsc/hint_text– hint text shown in checkoutcheckout/rpsc/based_on– configurable per product type, whether the check is based onbillingorshippingcheckout/rpsc/access_control– global default for allow list or deny list behavior (0= use config,1= allow list,2= deny list), overridable per product via therpsc_access_controlattribute
Module sequence (etc/module.xml): Magento_Checkout.
composer require conlabz/magento2-module-rpsc
bin/magento module:enable Conlabz_Rpsc
bin/magento setup:upgradeFor questions about this extension: conlabz.de
This extension is licensed under the MIT License. See LICENSE for details.