2

I have already removed the "Add to Cart" button from both the Product Detail page and the Product List/Grid Page based on an attribute.

I now need to be able to remove the button from Wishlist and compare for those specific products based on an attribute, but can't find the button construction anywhere for these two pages.

I would appreciate any help.

4
  • You can't test for this here? app/design/frontend/base/default/template/wishlist/button/tocart.phtml
    – gtr1971
    Apr 21, 2015 at 15:30
  • use xDebug and you will know everything
    – zhartaunik
    Apr 21, 2015 at 16:59
  • 1
    @gtr1971 that file contains the button constructor for the 'Add All to Cart' but not the 'Add to Cart' Apr 21, 2015 at 19:18
  • Yep, I noticed that after Frank posted his answer. :-)
    – gtr1971
    Apr 21, 2015 at 19:31

2 Answers 2

1

app/design/frontend/[package]/[your template]/template/wishlist/item/column/cart.phtml

Check in there, you can remove the button from there.

0
0

enter image description here

to remove Add To Cart button number 1 : open your path

/app/design/frontend/rwd/default/template/wishlist/item/column/cart.phtml

or

/app/design/frontend/[yourtheme]/default/template/wishlist/item/column/cart.phtml

comment line 37

<?php if ($product->isSaleable()): ?>
   <button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" onclick="addWItemToCart(<?php echo $item->getId()?>);" class="button btn-cart"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
<?php else: ?>

becomes

<?php if ($product->isSaleable()): ?>
   <!-- <button type="button" title="<?php //echo Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" onclick="addWItemToCart(<?php //echo $item->getId()?>);" class="button btn-cart"><span><span><?php //echo $this->__('Add to Cart') ?></span></span></button> -->
<?php else: ?>

to remove Add All To Cart button number 2 : open your path

/app/design/frontend/rwd/default/template/wishlist/button/tocart.phtml

or

/app/design/frontend/[yourtheme]/default/template/wishlist/button/tocart.phtml

comment line 29

<?php if($this->getWishlist()->getItemsCount() && $this->getWishlist()->isSalable()): ?>
  <button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Add All to Cart')) ?>" onclick="addAllWItemsToCart()" class="button btn-add"><span><span><?php echo $this->__('Add All to Cart') ?></span></span></button>
<?php endif;?>

becomes

<?php if($this->getWishlist()->getItemsCount() && $this->getWishlist()->isSalable()): ?>
  <!-- <button type="button" title="<?php //echo Mage::helper('core')->quoteEscape($this->__('Add All to Cart')) ?>" onclick="addAllWItemsToCart()" class="button btn-add"><span><span><?php //echo $this->__('Add All to Cart') ?></span></span></button> -->
<?php endif;?>

enter image description here

the final result

enter image description here

Your Answer

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

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