OPTIS Product Options - Developer Integration Guide
Overview
Data Structure
BSS_PO.currentSelectedOptions
BSS_PO.currentSelectedOptions = {
byOptionId: {}, // Options indexed by option ID
byLabel: {}, // Options indexed by label name
byOptionSetId: {}, // Options grouped by option set ID
allValues: [], // Flat array of all selected options
quantities: {}, // NEW: Quantity data for each option value
totalPriceAddOn: 0, // Total price add-on from all options
totalVariantPriceAddOn: 0, // Total variant-based price add-on
variantPriceAddOn: [], // Array of variant price add-ons
priceBreakdown: {}, // Detailed price breakdown by option
validation: { // Validation status for required options
isValid: true,
requiredOptions: [],
missingOptions: [],
validOptions: [],
errors: []
},
timestamp: "2023-..." // Last update timestamp
}NEW: Quantity Data Structure
Enhanced Option Value Structure
API Methods
Basic Data Access
NEW: Quantity Methods
Enhanced Price Information
Validation
Enhanced Formatted Output
NEW: Complete API Methods for Quantity Support
Event System
Listen for Option Changes with Quantity Information
Cart Page Integration
Detecting Option Changes on Cart Page
Enhanced Cart Data Structure
Practical Examples
Example 1: Quantity-Aware Price Calculator
Example 2: Inventory Management Integration
Example 3: Dynamic Pricing Based on Quantity
Troubleshooting
Common Issues
Best Practices
PreviousShow options on featured productsNextHow to Use "Upsell product"? Link Stock and Price of Shopify Variant to Option Value
Last updated