I'm new here and also I'm new in using Magento. :) I found this question Replace "Add to Cart" button with an "Enquire" button linking to the "Contact Us" page is very similar to my problem - I need to replace "Add to cart", but only for some products (not all). I think create a new Attribute is the right way, but I also need to edit the frontend side (I'm not so good with php). Can someone help me? Thanks!

1 Answer 1


Your best bet is to find a Magento professional that can help you if you aren't proficient in PHP.

However, if you want to attack it and get your hands dirty and learn a bit, you'll need to do a little research on how to create a module in Magento and add a block.

In your themes catalog/product/view.phtml file is a call to the add to cart block: echo $this->getChildHtml('addtocart').

A simple "if statement" around this block to where if your attribute is not set, output this otherwise output your own customer block should do what you want.

  • First of all thank you for your reply. I was thinking about an "if" function, the problem is I don't know how Magento works. Anyway, I'll try and do as you wrote. :)
    – Andrea A.
    Nov 13, 2015 at 18:03
  • Try to build the module out, there are lots of resources out there to guide you. Of course post questions if you run into issues. If this answer helped you, please choose it as the correct answer. Nov 13, 2015 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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