-
- woonde

-
Total Posts: 2
Joined: 2010-07-24
|
Hello i put some lines of code in 2 Files, please confirm that works:
please note that this workaround overwrites the fixed/percent value in bundle options configuration
in file: /app/code/core/Mage/Bundle/Model/Product/Price.php around line300 in function getSelectionPrice
public function getSelectionPrice($bundleProduct, $selectionProduct, $selectionQty = null, $multiplyQty = true) { if (is_null($selectionQty)) { $selectionQty = $selectionProduct->getSelectionQty(); } $bundled_product = new Mage_Catalog_Model_Product(); $bundled_product->load($selectionProduct->getProductId()); if ($multiplyQty) { $selectionPrice = $bundled_product->getFinalPrice(); }else{ $selectionPrice = $bundled_product->getFinalPrice() * $selectionQty; } return $selectionPrice; if ($bundleProduct->getPriceType() == self::PRICE_TYPE_DYNAMIC) { if ($multiplyQty) { $selectionPrice = $selectionProduct->getFinalPrice($selectionQty) * $selectionQty; } else { $selectionPrice = $selectionProduct->getFinalPrice($selectionQty); } return $selectionPrice; } else { if ($selectionProduct->getSelectionPriceType()) { // percent return $bundleProduct->getPrice() * ($selectionProduct->getSelectionPriceValue() / 100) * $selectionQty; } else { return $selectionProduct->getSelectionPriceValue() * $selectionQty; } } }
around line 86 in /app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php
i grabbed the products price from product itself.
foreach ($_option->getSelections() as $_selection) { $bundled_product = new Mage_Catalog_Model_Product(); $bundled_product->load($_selection->getProductId()); $_qty = !($_selection->getSelectionQty()*1)?'1':$_selection->getSelectionQty()*1; $selection = array ( 'qty' => $_qty, 'customQty' => $_selection->getSelectionCanChangeQty(), //'price' => Mage::helper('core')->currency($_selection->getFinalPrice(), false, false), 'price' => Mage::helper('core')->currency($bundled_product->getFinalPrice(), false, false), //'priceValue' => Mage::helper('core')->currency($_selection->getSelectionPriceValue(), false, false), 'priceValue' => Mage::helper('core')->currency($bundled_product->getFinalPrice(), false, false), 'priceType' => $_selection->getSelectionPriceType(), 'tierPrice' => $_selection->getTierPrice(), 'name' => $_selection->getName(), 'plusDisposition' => 0, 'minusDisposition' => 0, );
hope that helps!
best martin
|