1

I created a custom module that extends the core API with a new method that allows me to get a product collection based on specific filters. The method works so far, but I am having issues with the final price. This is what I have now:

$product_collection = Mage::getModel("catalog/product")->getCollection()
        ->addAttributeToSelect('entity_id')
        ->addAttributeToSelect('name')
        ->addAttributeToSelect('sku')
        ->addAttributeToSelect('price')
        ->addAttributeToSelect('final_price')
        ->addAttributeToSelect('status')
        ->addAttributeToSelect('manufacturer')
        ->addAttributeToSelect('season')
        ->addAttributeToSelect('product_category')
        ->addAttributeToSelect('activity')
        ->addAttributeToSelect('gender')
        ->addAttributeToSelect('material')
        ->addAttributeToSelect('color')
        ->setOrder('entity', 'DESC')
        ->setPageSize(10);

The above works just fine, but when I try adding ->addFinalPrice(), the collection comes up empty. I have used ->addFinalPrice() before in another module, and it works just fine, so I am at a loss as to what is different this time...

Anyone care to elaborate?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.