How to delete Wishlist button in OpenCart

  1. Home
  2. Knowledge Base
  3. OpenCart
  4. How to delete Wishlist button in OpenCart

How to delete Wishlist button in OpenCart

This following tutorial will show how to delete the Wishlist button on categories and products pages in OpenCart2.x.

 

  1. Connect to server via FTP or open cPanel file manager.
  2. Open the catalog\view\theme\themeXXX\template\product\ directory on server. To delete button on the category page, open and edit the category.tpl file. Find and comment the line with the WishList code:
    <button class="product-btn" type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button>

    Comment the line:

    <!--<button class="product-btn" type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button>-->
  3. To delete the button on the product page, open and edit the product.tpl file. Find and comment the line with Wishlist code:
    <li><button class="btn btn-icon" onclick="wishlist.add('<?php echo $product_id; ?>');"><i class="fa fa-heart"></i> <span class="hidden-xs hidden-sm"><?php echo $button_wishlist; ?></span></button></li>
    Change line to the following:
    <!--<li><button class="btn btn-icon" onclick="wishlist.add('<?php echo $product_id; ?>');"><i class="fa fa-heart"></i> <span class="hidden-xs hidden-sm"><?php echo $button_wishlist; ?></span></button></li>-->
  4. Save changes. Refresh front-end with Ctrl/Cmd+F5 to see the changes.
Facebook Comments

Was this article helpful?

Related Articles