I am using configurable products and I have set the option in the backend of Magento to show prices Incl TAX and Excl Tax.
My problem is that with this inside the dropdown for the configurable products options it also shows both Incl TAX and Excl TAX.
I need it to show both options in the price area on the product page but only Excl Tax in the dropdown so it removes the Incl TAX I have attahced a screenshot the areas in red need to be removed.
I've had some external help with this and come up with a solution. This is based on Magento 1.5.1.0.
Locate the file configurable.phtml in app/design/frontend/default/YOURTEMPLATE/template/catalog/product/view/type/options/.
Replace this:
<script type="text/javascript">
var spConfig = new Product.Config(<?php echo $this->getJsonConfig(); ?>);
</script>
With this:
<?php
// get current drop down string
$currentstring = $this->getJsonConfig();
// create new string with true set to false using str_replace function (string replace)
$newstring = str_replace( '"showBothPrices":true,"', '"showBothPrices":false,"', $currentstring );
?>
<!-- render dropdown but with new var ($newstring) -->
<script type="text/javascript">
var spConfig = new Product.Config(<?php echo $newstring ?>);
</script>
This will only work for configurable products. If you want to do the same thing for custom options of simple products just change this:
<?php echo $this->getValuesHtml() ?>
For this:
<?php echo preg_replace("/\([^)]+\)/","", $this->getValuesHtml()); ?>
In this file: app/design/frontend/default/YOURTEMPLATE/template/catalog/product/view/options/type/select.phtml
Hope this helps