Reputation: 1267
Bundle product is not visible at the front end maybe due to js issue, after upgrading from 1.6 to 1.7.0.1
debugging with firebug i found the following js error
<script type="text/javascript">
var optionsPrice = new Product.OptionsPrice(
Fatal error: Call to undefined method Mage_Bundle_Model_Product_Price::getBasePrice() in /var/www/vhosts/stage.planetjill.com/httpdocs/app/code/core/Mage/Bundle/Model/Product/Price.php on line 117
</script>
the method in price.php
public function getFinalPrice($qty = null, $product)
{
if (is_null($qty) && !is_null($product->getCalculatedFinalPrice())) {
return $product->getCalculatedFinalPrice();
}
$finalPrice = $this->getBasePrice($product, $qty);
//$finalPrice = $product->getPrice();
$product->setFinalPrice($finalPrice);
Mage::dispatchEvent('catalog_product_get_final_price', array('product' => $product, 'qty' => $qty));
$finalPrice = $product->getData('final_price');
$finalPrice = $this->_applyOptionsPrice($product, $qty, $finalPrice);
$finalPrice += $this->getTotalBundleItemsPrice($product, $qty);
$product->setFinalPrice($finalPrice);
return max(0, $product->getData('final_price'));
}
if you see the commented line
//$finalPrice = $product->getPrice();
which was used in magento 1.6. If i use this line in place of
$finalPrice = $this->getBasePrice($product, $qty);
the bundle product is now visible but the price as configured is always set to 0 and addtocart button breaks.
Any solutions?
Upvotes: 1
Views: 1079
Reputation: 2790
I would check your template files, probably /app/design/xxx/xxx/bundle/catalog/product/view/price.phtml -- Make sure the call to $_product->getFinalPrice() is hooked up properly (ie. if you get_class_methods($this) it is the proper class that has getFinalPrice() accessible)
If it isn't you should grep through any modules that are installed and check to see if Mage_Bundle_Model_Product_Price is being rewritten.
Alternatively, go through and disable modules via the module's .xml file one by one until the problem is fixed. Isolate from there.
Upvotes: 1