- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
OpenCart 2.x. How to delete Wishlist button
June 23, 2015
OpenCart 2.x. How to delete Wishlist button
This following tutorial will show how to delete the Wishlist button on categories and products pages in OpenCart2.x.
-
Connect to server via FTP or open cPanel file manager.
-
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>-->
-
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>-->
-
Save changes. Refresh front-end with Ctrl/Cmd+F5 to see the changes.
Feel free to check the detailed video tutorial below: