In my store I have some grouped product that they show in a table and I change it to show the simple products of a group product in a drop down list. Now I want to get price of each simple product in option tag that I can use it for show the price in some where that I want.
Now I test this code for get the price but it doesn't show any thing. How can I get the price and tier price of product?
<select id="productsHolder"> <?php if ($_hasAssociatedProducts): ?> <?php foreach ($_associatedProducts as $_item): ?> <?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?> <option value="<?php echo $this->escapeHtml($_item->getName()) ?>" price="<?php echo $this->getPriceHtml($_item, true) ?>" tierprice="<?php echo $this->getTierPriceHtml($_item) ?>"> <?php echo $this->escapeHtml($_item->getName()) ?> </option> <?php endforeach; ?> </select>
Also I try
<?php echo $_product->getPrice(); ?> but it doesn't work.