https://github.com/rapidez/customer-pricing
https://github.com/rapidez/customer-pricing
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rapidez/customer-pricing
- Owner: rapidez
- License: gpl-3.0
- Created: 2024-09-17T10:52:54.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-10-03T12:40:19.000Z (10 months ago)
- Last Synced: 2025-10-03T23:11:22.569Z (10 months ago)
- Language: PHP
- Size: 25.4 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Rapidez Customer Pricing
This package adds Rapidez support for the [justbetter/magento2-customer-pricing magento extension](https://github.com/justbetter/magento2-customer-pricing). **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:
```blade
@{{ customerPrice || addToCart.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](LICENSE) for more information.