views:

325

answers:

1

I’m having a lot of trouble understanding how to create a module that will add an extra button to the shopping cart page. I found lots of info on payment modules and stand-a-lone page modules, but nothing for this.

I simply need to add a button underneath the regular “Checkout” button that can post item data to another website. I’ve created a module but can’t get Magento to recognize it and display the button on that spot. Any help would be greatly appreciated, even just sending me to an existing tutorial that I haven’t been able to find. Thanks.

A: 

A custom module is probably overkill for this. Module means a very specific thing in Magento. It's a mechanism for inserting custom code into Magento's standard operations. All you want to do is add a button to the cart page. Editing the file at

./base/default/template/checkout/cart.phtml
(substitute your theme/site name if not using base or default)

is the place you'll want to start looking. Just find the phtml file that corresponds to the place you want to insert your custom HTML and have at it.

Alan Storm
Thanks for the tip. That makes a lot of sense. I guess I was trying to do it as a module because we want other people to be able to make this change to their Magento installs without having technical knowledge. I was hoping there was a way to leverage Magento Connect so that someone could just upgrade their shopping cart page from the admin site without delving into the code at all. I'll just work on editing the cart.phtml and then finding a good way to document this so that non-technical users can make the same changes easily. Thanks for your answer.
SenorPuerco
It's possible to do this with a module, but not trivial and beyond the cope of a SO question.
Alan Storm