productoption

package
v1.46.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package productoption is a product's option axis (e.g. "Size", "Color") as a first-class admin entity — the variant builder composes variants from an option's values. Medusa v2 parity (product-option).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type ProductOption

type ProductOption struct {
	mixin.Model[ProductOption]

	ProductId string `json:"productId"`
	Title     string `json:"title"` // "Size", "Color"

	Metadata  Map    `json:"metadata,omitempty" datastore:"-"`
	Metadata_ string `json:"-" datastore:",noindex"`
}

ProductOption is one option axis of a product.

func New

func (*ProductOption) Load

func (o *ProductOption) Load(ps []datastore.Property) (err error)

func (*ProductOption) Save

func (o *ProductOption) Save() ([]datastore.Property, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL