User Guide & Reference Manual

Product Option Model

Product options are configurable options (e.g., "Size", "Color") for products, selected by the user before the product is added to their cart. Product options can be linked to a particular product or they can be shared amongst many products (i.e., all shirts share the same "Color" option instead of re-creating this option for each particular product).

Initialization


$this->load->model('store/product_option_model');
// methods at $this->product_option_model->x();

Method Reference

int new_option (string $name [, array $values = array() [, boolean $save = FALSE]])

Create a new product option.

Arguments:

array get_option (int $option_id)

Return an array of a particular product option, in the same format as get_options().

void delete_option (int $option_id)

Delete a product option.

array get_options ( [array $filters = array()])

Retrieve one or more product option arrays, based on optional filters.

Possible Filters:

Each returned product option has the following data: