Given a collection obtained by (this is Magento 1.4):
$collection = Mage::getModel('catalog/product_option')
->getProductOptionCollection($_product);
This returns the collection of options associated with a single product. I would like to filter this down to only give me options that have a price_type
of percent
, so naturally, I try:
$collection = Mage::getModel('catalog/product_option')
->getProductOptionCollection($_product)
->addFieldToFilter('price_type', array('eq' => 'percent'));
This still returns the entire option collection, as if the filter did nothing at all. Is this an old issue with v.1.4?
price_type
todefault_option_price.price_type
?foreach
loops that gets the values from each option and just pushes those with['price_type'] == 'percent'
to a new array. This is an old site that will be gone soon and I'm not able to spend much time on it and I fear that some of the rewritten models (including options, products, values, etc) are what is giving me fits.