Skip to main content

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

  1. Reads the configuration array from the pricing context
  2. Finds all entries with key: 'option'
  3. Looks up each option product by its ID
  4. 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

PropertyValue
Keyshop.unchained.pricing.product-price-options
Version1.0
Order Index1
Sourcepricing/product-catalog-price-options.ts