cancel
Showing results for 
Search instead for 
Did you mean: 

Call for pricing help?

SOLVED

Call for pricing help?

I want to have certain products with Call for Pricing instead of showing price and add to cart;

I know somewhat how to code, but I dont know what files to edit.

I thought of making an attribute with name call_for_pricing and if set to yes will trigure it.

 

Here is the code which I haven't tested, since I dont know what files need to edit.

Before Add to Cart button and price I would think:

  <!-- Call For Price - begin -->
        <?php $attribute = $_product->getResource()->getAttribute('call_for_price'); ?>
            <?php $attribute_value = $attribute ->getFrontend()->getValue($_product); ?>
            <?php if ($attribute_value == 'Yes'): ?>
                //Please Call for pricing
            <?php else: ?>

and after add to cart button:

<?php endif; ?>
        <!-- Call For Price - end -->
1 REPLY

Re: Call for pricing help?

Hi @drillsar12,

 


You can set your own price template to add the custom button when the price is not available by using the following XML:

 

<layout>
    <default>
         <reference name="catalog_product_price_template">
            <action method="addPriceBlockType"><type>simple</type><block>catalog/product_price</block><template>killerprice/price.phtml</template></action>
            <!-- duplicate for each product type you need to handle i.e. change the value of the <type> node" -->
        </reference>
    </default>
</layout>
If my answer was useful, please give "Kudos" to this post.
If my answer helps you to resolve the problem, click on "Accept as Solution".