Magento Forum

   
How to Move the Add to Cart button on Product Listing page? 
 
Adam1991
Jr. Member
 
Total Posts:  19
Joined:  2013-01-08
 

Hey everyone, Im fairly new to Magento so forgive me for this but… Does anybody know how I can move the \"Add to Cart\\\” button above the price on the category menu\\\’s?

The problem I am having is that the \\\"Add to cart\\\” buttons do not align properly when I have \\\"Special Prices\\\”. E.g. The special prices enters a new line forcing the button down a line, but only for the products that have a special price. So my solution would be to move the button above the price but I cant seem to figure out how to do that… Would I have to edit catalog.xml or list.phtml or my CSS? Different people are telling me different things.

Anyways Thanks in Advance smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Adam1991
Jr. Member
 
Total Posts:  19
Joined:  2013-01-08
 

Here is a print screen of what i mean…

Image Attachments
un-aligned buttons.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
icemanarh
Jr. Member
 
Total Posts:  3
Joined:  2011-06-28
 

If I am understanding correctly.  You can easily move the Add to Cart button by editing the list.phtml page found in /default/*yourtemplate/template/catalog/product/list.phtml

Find this code

<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart'?></span></span></button></p>

Move above this line

<?php echo $this->getPriceHtml($_producttrue?>

That is for the list template, the grid can be found further down the page
Good luck!

_____________________________________________________

CB Radios and more at FTL Distributing - CB Radios CB Antennas

Adam1991 - 09 January 2013 03:09 AM

Hey everyone, Im fairly new to Magento so forgive me for this but… Does anybody know how I can move the \"Add to Cart\\\” button above the price on the category menu\\\’s?

The problem I am having is that the \\\"Add to cart\\\” buttons do not align properly when I have \\\"Special Prices\\\”. E.g. The special prices enters a new line forcing the button down a line, but only for the products that have a special price. So my solution would be to move the button above the price but I cant seem to figure out how to do that… Would I have to edit catalog.xml or list.phtml or my CSS? Different people are telling me different things.

Anyways Thanks in Advance smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Adam1991
Jr. Member
 
Total Posts:  19
Joined:  2013-01-08
 

YESS!

Thankyou so much!.. I\’ve been looking for a way around this for ages. I tried somthing similar but i moved the php if aswell last time and obviously it didnt work.

thanks again! :D

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top