|
Just getting started learning Magento. Need call for price feature. I have scoured the forums but have not found a solid solution yet.
What I need:
Have certain products display Call For Price rather than actual price.
Need to hide the price on specified product on all pages where the price may be displayed.
Need to still let the customer purchase the product online. Even on checkout it should say call for price, but still be able to see tax, shipping, totals, etc.
What I’ve done so far:
I’m using Magento ver. 1.2.0.1 with Modern template. I want to change this on a per product basis so I created a product attribute (Yes / No) call_for_price. The attribute is set to not show on product page so only the admin will see the attribute.
app/design/frontend/default/modern/template/catalog/product/price.phtml
From:
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
To:
<?php // Call For Price // $CFP = $_product->getCallForPrice(); $CFPT = "<b>Call For Price</b>"; ?> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php if($CFP == 0){ echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ;} else { echo $CFPT;}?></span>
This has worked great on the product page. Now I’m having trouble getting it to work on the category or list page.
app/design/frontend/default/modern/template/catalog/product/list.phtml
# Returns the correct product ID under each product in the grid
$_product->getId()
# From another post I found this, but it always returns “No” no matter if the attribute is set or not.
$_product->getResource()->getAttribute(’call_for_price’)->getFrontend()->getValue($_product)
I’ve been trying to figure out how to grab this attribute from this page… with no luck. IDEAS anyone???
======================================
Found it! Finally.
http://www.magentocommerce.com/wiki/how-to/add-attributes-to-product-grid and it works
=======================================
Correction.. new wiki item
http://www.magentocommerce.com/wiki/price_on_application?do=show
|