6.4. But what do these options do? Where do they live?
If you know Perl, you know what a hash reference is. An Interchange shopping cart consists of an array of hash references. If you dump the structure of the main shopping cart you would see something like:
[ { mv_ip => '0', price_group => 'general', mv_ib => 'products', code => 'os28080', quantity => '1', }, { mv_ip => '1', price_group => 'general', mv_ib => 'products', code => 'os28080', size => 'L', color => 'black', quantity => '1', }, ]
Each key of the hash is an attribute. There are a number of special attributes:
Attribute | Description |
code | The item SKU |
sku | The SKU of the base item (in the case of matrix options) |
mv_ip | The line number of the shopping cart (minus 1) |
mv_ib | The database table the product was ordered from |
quantity | The number on order |
group | The order group for a master item or subitem |
mv_si | Subitem indicator |
mv_mi | Master item code |
mv_mp | Modular item |
mv_price | Price of the item (to directly set pricing) |
mv_order_route | Special order route for this item |
Any attribute besides the above is a product option or modifier, and can be displayed with [item-modifier attribute_name].