I am trying to get product prices both inclusive and exclusive tax in custom export script.
To get product price with inclusive tax I used this code.
Mage::helper('tax')->getPrice($_product, $_product->getPrice());
This working fine for simple product.
But For Bundle product how we can get price inclusive tax.
Bundle product price type is dynamic.
And I have used this code to retrieve bundle product price.
$bundlePriceModel = Mage::getModel('bundle/product_price');
$selectionCollection = $_product->getTypeInstance(true)->getSelectionsCollection(
$_product->getTypeInstance(true)->getOptionsIds($_product), $_product
);
$itemPrice = 0;
foreach($selectionCollection as $_option) {
$itemPrice += $bundlePriceModel->getSelectionFinalTotalPrice($_product, $_option,1, $_option->getData('selection_qty'), true, true );
}