1

Product Page

I need to make button near add to cart button without touching core template files. Kindly help me in this case?

I am developing a extension. When Install that extension, the button should be created. what should I do for that?

Problem in Detail

I am working on a shirt design plug in in which we can buy a shirt and we can design & buy that shirt too. I need to put a button for designing shirt. By clicking on it we can design shirt. I've done everything except adding button. If I add button by modifying core templates, I can not use plug in anywhere.

So only I am asking, Is there any way to add button in product without modifying core templates?

  • almost gave +1 for putting up Johny Bravo... Whoohaa... There's a pretty man in my room... Call 911 for help... Wait a second.... It is only me – Jeroen Mar 12 '15 at 20:01
  • 1
    You could add a dependency on Mage_Catalog and add a custom layoutfile for frontend. You can add a section for <catalog_product_view> and <reference name="product.info.addtocart"><action method="setTemplate"><template>myown/file.phtml</template></action></reference> – Jeroen Mar 12 '15 at 20:04
  • Yes, You are correct, I've already found it. Anyway thanks for trying to help me. – Vivek Aasaithambi Mar 13 '15 at 4:59
1

Just modify your themes template file to add a new button or change the existing 'add to cart' button depending on what you're wanting to do. No core files need to be touched for template edits.

The path to the template file is the below for the product detail page like your question title specifies yet your screenshot is showing the product list page.

/app/design/frontend/package/theme/template/catalog/product/view.phtml
  • I am developing a extension. When Install that extension, the button should be created. what should I do for that? – Vivek Aasaithambi Mar 10 '15 at 12:25
  • You should have specified that (and any other important details) in your original question then as this requires a completely different answer. Impossible to answer based on the minimal information you've provided, my best guess would be you'll need to package with a layout XML that references a template file in your extension and appends to product.info.addtocart but there are loads of ways depending on exactly what you want to achieve... Close voting. – zigojacko Mar 10 '15 at 13:23
  • I've updated my Question.. @zigojacko – Vivek Aasaithambi Mar 11 '15 at 5:29
  • What functionality do you expect to happen when said button is clicked? – zigojacko Mar 11 '15 at 9:00
  • need to redirect to tool page where we design shirts with product id @zigojacko – Vivek Aasaithambi Mar 11 '15 at 9:40

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