Skip to main content

Add a bundle to the cart

bundle.js
// Add a whole bundle in one click
await porttera.bundles.add('summer-kit', {
  items: ['cap', 'tee', 'tote'],
  pricing: { type: 'percent', off: 15 }
});

Pricing object

FieldValuesNotes
typefixed · percentHow the bundle is priced.
pricenumberRequired when type is fixed.
offnumberPercentage off when type is percent.
Adding a bundle adds each component as its own line item, so inventory and fulfilment work exactly as they normally would.