Product Catalog Price Options
Adds prices for product options to the pricing calculation. Used when products have configurable options that affect pricing.
Installation
import '@unchainedshop/plugins/pricing/product-catalog-price-options';
How It Works
- Reads the
configurationarray from the pricing context - Finds all entries with
key: 'option' - Looks up each option product by its ID
- Adds each option's price to the total
Configuration Format
Options are passed via the cart item configuration:
const configuration = [
{ key: 'option', value: 'product-id-of-option-1' },
{ key: 'option', value: 'product-id-of-option-2' },
];
Use Cases
- Add-on products (e.g., gift wrapping, extended warranty)
- Product customizations with price impact
- Configurable bundles
Adapter Details
| Property | Value |
|---|---|
| Key | shop.unchained.pricing.product-price-options |
| Version | 1.0 |
| Order Index | 1 |
| Source | pricing/product-catalog-price-options.ts |
Related
- Product Catalog Price - Base product pricing
- Product Discount - Apply discounts