0

I have many configurable products on a site and some of the options on those

products need to say Call for Price instead of having a price.

From a previous question I added the following code:

<?php if ($_product->getFinalPrice() == 0) : ?>
<h2>Call For Price</h2>
<?php else: ?>
    <?php echo $this->getPriceHtml($_product); ?>
<?php endif; ?>

This works for simple products but not for configurables because it doesn't change when the ajax updates the price.

  • Nothing so far, I'm still looking for the code where it changes the price through ajax. I'm more of a front end developer. – Ross Coulbeck Sep 8 '15 at 15:11
0

I know this is late answer but may be some one get help by my answer.

Create an Yes/No attribute (call_for_price) for Call For Price.

Now modify your price template files for do not show the price if it Call For Price is set to 'Yes'. Open price.phtml app/design/frontend/theme_package/theme/template/catalog/product/ of your template file if it not exist in your theme copy it from base theme. And find this line

$_product = $this->getProduct(); after this line just put this code:

$_product = $this->getProduct();
if($_product->getCallForPrice()==1){
    echo 'Call For price';
    return;
}

save the file clear your cache.

Done!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.