I have product with custom options.
I want to show the price = regular price + option value
In the price.phtml I have found this:
<div class="price-box">
<?php $_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice())); ?>
<?php $_price = $_taxHelper->getPrice($_product, $_convertedPrice); ?>
<?php $_regularPrice = $_taxHelper->getPrice($_product, $_convertedPrice, $_simplePricesTax); ?>
<?php $_finalPrice = $_taxHelper->getPrice($_product, $_convertedFinalPrice) ?>
<?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_convertedFinalPrice, true) ?>
<?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
<?php if ($_finalPrice >= $_price): ?>
Suppose the regular price of the product is 500 and Option value is +50
then in the product page how can i show 550 when the page is loaded (without clicking on the option radio button)
So far I tried this:
(this works fine in
app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php)
if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO
|| $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX
) {
$_productId = $this->getProduct()->getId();
$_product = Mage::getModel('catalog/product')->load($_productId);
$spl_price=$_product->getFinalPrice();
if($count==2)
{
$rent=$this->helper('core')->currencyByStore($_value->getPrice(true), $store, false);
}
else
{
$buy=$this->helper('core')->currencyByStore($_value->getPrice(true), $store, false);
}
$total_rent = $rent + $spl_price;
}
But doesn't work with price.phtml file.
And i tried to pass $total_rent in this:
<?php $_finalPrice = $_taxHelper->getPrice($$total_rent) ?>
but I suppose it doesn't work this way here.