rapidez / customer-pricing
Support for the justbetter/magento2-customer-pricing magento extension
Installs: 1 004
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
pkg:composer/rapidez/customer-pricing
Requires
- php: ^8.1
- rapidez/core: ^2.0|^3.0|^4.0
This package is auto-updated.
Last update: 2025-10-03 12:40:23 UTC
README
This package adds Rapidez support for the justbetter/magento2-customer-pricing magento extension. This package will not work without this extension.
Installation
composer require rapidez/customer-pricing
Usage
This adds to the Product model:
- A
customerPricing
relation that retrieves all customer prices and tiers for the given product - The
customerPrice(int $customerId, int $quantity = 1)
function which returns a customer price at the given tier, or null when none is found. - The
customerTierPrices(int $customerId)
function which returns all of the tier prices for a given customer (if any).
This package also adds a simple frontend implementation that can be used by adding the customer-price
component onto your page. For example:
<customer-price v-bind:product-id="addToCart.simpleProduct.entity_id" v-bind:quantity="addToCart.qty" v-slot="{ customerPrice }" > <span>@{{ customerPrice || addToCart.price }}</span> </customer-price>
Requests made for this component get bundled together (collected over 100ms), allowing this to be used the same way in product listings.
License
GNU General Public License v3. Please see License File for more information.